Examples of IntroContentParser


Examples of org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser

        // content attribute is defined. It either points to an XHTML file, or
        // an introContent.xml file. Process each case. Assume it is an
        // introContent file.
        // INTRO: XHTML file is loaded needlessly when we have XHTML content and
        // SWT presentation.
        IntroContentParser parser = new IntroContentParser(content);
        Document dom = parser.getDocument();
        if (dom == null) {
            // bad xml. This could be bad XHTML or bad intro XML. Parser would
            // have logged fact. Load dom for invalid page, and make sure to
            // force an extract on parent folder to enabling jarring.
            Bundle introBundle = Platform.getBundle(IIntroConstants.PLUGIN_ID);
            ModelUtil.ensureFileURLsExist(introBundle, INVALID_CONTENT);

            String invalidContentFilePath = BundleUtil
                .getResolvedResourceLocation(INVALID_CONTENT, introBundle);
            parser = new IntroContentParser(invalidContentFilePath);
            dom = parser.getDocument();
            // make sure to override all attributes to resolve the Invalid
            // Page page correctly.
            content = invalidContentFilePath;
            this.base = INVALID_CONTENT_BASE;
            setBundle(introBundle);
        }

        // parse content depending on type. Make sure to set the loaded flag
        // accordingly, otherwise content file will always be parsed.
        if (parser.hasXHTMLContent()) {
            loadXHTMLContent(dom);
            // make sure to use correct base.
            init(element, getBundle(), initialBase);
            super.loadChildren();
        } else
View Full Code Here

Examples of org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser

   * @return the elements to be inserted
   */
    public Element[] getElements() {
      // only applicable when content attribute is specified
        if (isXHTMLContent()) {
            IntroContentParser parser = new IntroContentParser(contentFile);
            Document dom = parser.getDocument();
            if (dom != null) {
              // parser content should be XHTML because defining content here
              // means that we want XHTML extension.
              if (parser.hasXHTMLContent()) {
            if (contentId != null) {
              // id specified, only get that element
              return new Element[] { ModelUtil.getElementById(dom, contentId) };
            }
            else {
View Full Code Here

Examples of org.eclipse.ui.internal.intro.impl.model.loader.IntroContentParser

            .getBundleFromConfigurationElement(cfgElement);
        ModelUtil.ensureFileURLsExist(domBundle, content);

        // Resolve.
        content = BundleUtil.getResourceLocation(content, cfgElement);
        Document document = new IntroContentParser(content).getDocument();

        return document;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.