Package org.eclipse.wst.sse.ui.internal.format

Examples of org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy


    // 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


    // 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

    if (usedFormatter == null) {
      usedFormatter = new MultiPassContentFormatter(
          getConfiguredDocumentPartitioning(sourceViewer),
          IHTMLPartitions.HTML_DEFAULT);
      ((MultiPassContentFormatter) usedFormatter)
          .setMasterStrategy(new StructuredFormattingStrategy(
              new PhpFormatProcessorImpl()));
    }

    return usedFormatter;
  }
View Full Code Here

    } else {
      formatter = new MultiPassContentFormatter(
          IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
          IHTMLPartitions.HTML_DEFAULT);
      ((MultiPassContentFormatter) formatter)
          .setMasterStrategy(new StructuredFormattingStrategy(
              new PhpFormatProcessorImpl()));
    }

  }
View Full Code Here

      phpFormatter = new MultiPassContentFormatter(
          IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
          IHTMLPartitions.HTML_DEFAULT);
      ((MultiPassContentFormatter) phpFormatter)
          .setMasterStrategy(new StructuredFormattingStrategy(
              new PhpFormatProcessorImpl()));
    }
    return phpFormatter;
  }
View Full Code Here

      if (fActiveFormatter == null) {
        fActiveFormatter = new MultiPassContentFormatter(
            IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
            IHTMLPartitions.HTML_DEFAULT);
        ((MultiPassContentFormatter) fActiveFormatter)
            .setMasterStrategy(new StructuredFormattingStrategy(
                new PhpFormatProcessorImpl()));
      }
    }
    return fActiveFormatter;
  }
View Full Code Here

    {
        if (isFormatFile()) {
            MultiPassContentFormatter pdtFormatter = new MultiPassContentFormatter(
                    IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
                    IHTMLPartitions.HTML_DEFAULT);
            pdtFormatter.setMasterStrategy(new StructuredFormattingStrategy(
                    new HTMLFormatProcessorImpl()));
            pdtFormatter.format(document, region);
        } else {
            StructuredTextMultiPassContentFormatter pdtFormatter = new StructuredTextMultiPassContentFormatter(
                    IStructuredPartitioning.DEFAULT_STRUCTURED_PARTITIONING,
                    IHTMLPartitions.HTML_DEFAULT);
            pdtFormatter.setMasterStrategy(new StructuredFormattingStrategy(
                    new TwigFormatProcessorImpl()));
            pdtFormatter.format(document, region);
            // pdtFormatter.format(document, region);
        }
View Full Code Here

TOP

Related Classes of org.eclipse.wst.sse.ui.internal.format.StructuredFormattingStrategy

Copyright © 2018 www.massapicom. 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.