Examples of HTMLFormatProcessorImpl


Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

      ele.setAttribute(ICSSPropertyID.ATTR_PREFIX, prefix);
      if (nodes != null && nodes.length > 0) {
        nodes[0] = ele;
      }
      model.getDocument().insertBefore(ele, ref[0]);
      new HTMLFormatProcessorImpl().formatNode(ele);
    }
    else {//xml format
      //find root element
      boolean tldRefExists = false;
      Element root = getRootElement(model);
      if (root != null){       
        NamedNodeMap attrs = root.getAttributes();
        for (int i=0;i<attrs.getLength();i++){
          Attr a = (Attr)attrs.item(i);
          //is the taglib uri already declared?
          if (a.getValue().equals(uri)){
            tldRefExists = true;
            break;
          }
        }
        if (!tldRefExists){
          //create attribute
          Attr a = model.getDocument().createAttribute("xmlns:"+prefix); //$NON-NLS-1$
          a.setValue(uri);
          root.setAttributeNode(a);
          new HTMLFormatProcessorImpl().formatNode(root);
         
          //duplicating what non-xml case does... no callerd making use of this currently
          if (nodes != null && nodes.length > 0) {
            nodes[0] = a;
          }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

   * called by child classes
   *
   * @param node
   */
  public final void formatNode(Node node) {
    new HTMLFormatProcessorImpl().formatNode(node);
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

    // generic one
    if (!(formatter instanceof MultiPassContentFormatter))
      formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IXMLPartitions.XML_DEFAULT);

    MultiPassContentFormatter multiFormatter = (MultiPassContentFormatter) formatter;
    multiFormatter.setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
    multiFormatter.setSlaveStrategy(new FormattingStrategyJSPJava(), IJSPPartitions.JSP_CONTENT_JAVA);

    return formatter;
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

   * @param node
   */
  public void formatNode(Node node) {
    // XXX: there should have some other way to get the FormatProcessor.
    // currently hardcoded to HTMLFormatProcessorImpl().
    new HTMLFormatProcessorImpl().formatNode(node);
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

    return fCleanupPreferences;
  }
 
  protected IStructuredFormatProcessor getFormatProcessor() {
    return new HTMLFormatProcessorImpl();
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

    // generic one
    if (!(formatter instanceof MultiPassContentFormatter))
      formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IXMLPartitions.XML_DEFAULT);

    MultiPassContentFormatter multiFormatter = (MultiPassContentFormatter) formatter;
    multiFormatter.setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
    multiFormatter.setSlaveStrategy(new FormattingStrategyJSPJava(), IJSPPartitions.JSP_CONTENT_JAVA);

    return formatter;
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

   * @param node
   */
  public void formatNode(Node node) {
    // XXX: there should have some other way to get the FormatProcessor.
    // currently hardcoded to HTMLFormatProcessorImpl().
    new HTMLFormatProcessorImpl().formatNode(node);
  }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

      ele.setAttribute(ICSSPropertyID.ATTR_PREFIX, prefix);
      if (nodes != null && nodes.length > 0) {
        nodes[0] = ele;
      }
      model.getDocument().insertBefore(ele, ref[0]);
      new HTMLFormatProcessorImpl().formatNode(ele);
    }
    else {//xml format
      //find root element
      boolean tldRefExists = false;
      Element root = getRootElement(model);
      if (root != null){       
        NamedNodeMap attrs = root.getAttributes();
        for (int i=0;i<attrs.getLength();i++){
          Attr a = (Attr)attrs.item(i);
          //is the taglib uri already declared?
          if (a.getValue().equals(uri)){
            tldRefExists = true;
            break;
          }
        }
        if (!tldRefExists){
          //create attribute
          Attr a = model.getDocument().createAttribute("xmlns:"+prefix); //$NON-NLS-1$
          a.setValue(uri);
          root.setAttributeNode(a);
          new HTMLFormatProcessorImpl().formatNode(root);
         
          //duplicating what non-xml case does... no callerd making use of this currently
          if (nodes != null && nodes.length > 0) {
            nodes[0] = a;
          }
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

        undoManager = structuredDocument.getUndoManager();
        undoManager.beginRecording(this, "php format document", //$NON-NLS-1$
            "format PHP document", 0, document.getLength()); //$NON-NLS-1$

        // html format
        HTMLFormatProcessorImpl htmlFormatter = new HtmlFormatterForPhpCode();

        try {
          htmlFormatter.formatDocument(document);
        } catch (Exception e) {
          // TODO: handle exception
        }
        // php format
        PHPVersion version = ProjectOptions.getPhpVersion(project);
View Full Code Here

Examples of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl

        undoManager = structuredDocument.getUndoManager();
        undoManager.beginRecording(this, "php format document", //$NON-NLS-1$
            "format PHP document", 0, document.getLength()); //$NON-NLS-1$

        // html format
        HTMLFormatProcessorImpl htmlFormatter = new HtmlFormatterForPhpCode();

        try {
          htmlFormatter.formatDocument(document);
        } catch (Exception e) {
          // TODO: handle exception
        }
        // php format
        // PHPVersion version = ProjectOptions.getPhpVersion(project);
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.