Examples of DocumentProvider


Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

  }

  private TaglibInfo extractInfo(String basePath, InputStream tldContents) {
    TaglibInfo info = new TaglibInfo();
    if (tldContents != null) {
      DocumentProvider provider = new DocumentProvider();
      provider.setInputStream(tldContents);
      provider.setValidating(false);
      provider.setRootElementName(JSP12TLDNames.TAGLIB);
      provider.setBaseReference(basePath);
      Node child = provider.getRootElement();
      if (child == null || child.getNodeType() != Node.ELEMENT_NODE || !child.getNodeName().equals(JSP12TLDNames.TAGLIB)) {
        return null;
      }
      child = child.getFirstChild();
      while (child != null) {
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

      return;
    InputStream webxmlContents = null;
    Document document = null;
    try {
      webxmlContents = ((IFile) webxml).getContents(false);
      DocumentProvider provider = new DocumentProvider();
      provider.setInputStream(webxmlContents);
      provider.setValidating(false);
      provider.setRootElementName("web-app"); //$NON-NLS-1$
      provider.setBaseReference(webxml.getParent().getFullPath().toString());
      document = provider.getDocument(false);
    }
    catch (CoreException e) {
      Logger.log(Logger.ERROR_DEBUG, EMPTY_STRING, e); //$NON-NLS-1$
    }
    finally {
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param baselocation
   * @param input
   * @return
   */
  public CMDocument buildCMDocument(String baselocation, InputStream input) {
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setInputStream(input);
    if (baselocation != null)
      provider.setBaseReference(baselocation);
    return loadDocument(baselocation, provider.getRootElement());
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param fileName
   * @return
   */
  protected CMDocument buildCMDocumentFromFile(String fileName) {
    // load the taglib descriptor file
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setBaseReference(fileName);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setFileName(fileName);
    Node rootElement = provider.getRootElement();
    return loadDocument(fileName, rootElement);
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param contentFileName -
   *            the path within the JAR for a valid taglib descriptor
   */
  protected CMDocument buildCMDocumentFromJar(String jarFileName, String contentFileName) {
    // load the taglib descriptor file
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setBaseReference(jarFileName);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setJarFileName(jarFileName);
    provider.setFileName(contentFileName);
    CMDocument document = loadDocument("jar:file://" + jarFileName + "!" + contentFileName, provider.getRootElement()); //$NON-NLS-1$ //$NON-NLS-2$
    // TODO: Add the tags declared in META-INF/tags, see JSP 2.0 section
    // 8.4.1
    return document;
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param fileName
   * @return
   */
  protected CMDocument buildCMDocumentFromFile(String fileName) {
    // load the taglib descriptor file
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setBaseReference(fileName);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setFileName(fileName);
    Node rootElement = provider.getRootElement();
    return loadDocument(fileName, rootElement);
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param contentFileName -
   *            the path within the JAR for a valid taglib descriptor
   */
  protected CMDocument buildCMDocumentFromJar(String jarFileName, String contentFileName) {
    // load the taglib descriptor file
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setBaseReference(jarFileName);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setJarFileName(jarFileName);
    provider.setFileName(contentFileName);
    CMDocument document = loadDocument("jar:file://" + jarFileName + "!" + contentFileName, provider.getRootElement()); //$NON-NLS-1$ //$NON-NLS-2$
    // TODO: Add the tags declared in META-INF/tags, see JSP 2.0 section
    // 8.4.1
    return document;
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

   * @param baselocation
   * @param input
   * @return
   */
  public CMDocument buildCMDocument(String baselocation, InputStream input) {
    DocumentProvider provider = new DocumentProvider();
    provider.setValidating(false);
    provider.setRootElementName(JSP11TLDNames.TAGLIB);
    provider.setInputStream(input);
    if (baselocation != null)
      provider.setBaseReference(baselocation);
    return loadDocument(baselocation, provider.getRootElement());
  }
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

  }

  private TaglibInfo extractInfo(String basePath, InputStream tldContents) {
    TaglibInfo info = new TaglibInfo();
    if (tldContents != null) {
      DocumentProvider provider = new DocumentProvider();
      provider.setInputStream(tldContents);
      provider.setValidating(false);
      provider.setRootElementName(JSP12TLDNames.TAGLIB);
      provider.setBaseReference(basePath);
      Node child = provider.getRootElement();
      if (child == null || child.getNodeType() != Node.ELEMENT_NODE || !child.getNodeName().equals(JSP12TLDNames.TAGLIB)) {
        return null;
      }
      child = child.getFirstChild();
      while (child != null) {
View Full Code Here

Examples of org.eclipse.jst.jsp.core.internal.util.DocumentProvider

      return;
    InputStream webxmlContents = null;
    Document document = null;
    try {
      webxmlContents = ((IFile) webxml).getContents(false);
      DocumentProvider provider = new DocumentProvider();
      provider.setInputStream(webxmlContents);
      provider.setValidating(false);
      provider.setRootElementName("web-app"); //$NON-NLS-1$
      provider.setBaseReference(webxml.getParent().getFullPath().toString());
      document = provider.getDocument(false);
    }
    catch (CoreException e) {
      Logger.log(Logger.ERROR_DEBUG, "", e); //$NON-NLS-1$
    }
    finally {
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.