use of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl in project webtools.sourceediting by eclipse.
the class HTMLNodeActionManager method reformat.
public void reformat(Node newElement, boolean deep) {
try {
// tell the model that we are about to make a big model change
fModel.aboutToChangeModel();
// format selected node
IStructuredFormatProcessor formatProcessor = new HTMLFormatProcessorImpl();
formatProcessor.formatNode(newElement);
} finally {
// tell the model that we are done with the big model change
fModel.changedModel();
}
}
use of org.eclipse.wst.html.core.internal.format.HTMLFormatProcessorImpl in project webtools.sourceediting by eclipse.
the class StructuredTextViewerConfigurationHTML method getContentFormatter.
public IContentFormatter getContentFormatter(ISourceViewer sourceViewer) {
IContentFormatter formatter = super.getContentFormatter(sourceViewer);
// generic one
if (!(formatter instanceof MultiPassContentFormatter))
formatter = new MultiPassContentFormatter(getConfiguredDocumentPartitioning(sourceViewer), IHTMLPartitions.HTML_DEFAULT);
((MultiPassContentFormatter) formatter).setMasterStrategy(new StructuredFormattingStrategy(new HTMLFormatProcessorImpl()));
return formatter;
}
Aggregations