public class JsRegionProcessor extends StructuredDocumentProcessor.RegionProcessor<org.eclipse.wst.jsdt.core.formatter.CodeFormatter>
CodeFormatter:
Note that the closing tag is indented by Eclipse using the embedded formatters indentation, whereas the opening tag indentation is configured by the HTML preferences. This is more a bug than a feature, but Spotless formatter output shall be identical to the one of Eclipse.
document, firstLine, indentationLevel, lastLine, region| Constructor and Description |
|---|
JsRegionProcessor(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument document,
org.eclipse.jface.text.ITypedRegion scriptRegion,
java.lang.String htmlIndent) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyFirst(org.eclipse.wst.jsdt.core.formatter.CodeFormatter formatter)
First application of modifications
|
protected void |
applySecond(org.eclipse.wst.jsdt.core.formatter.CodeFormatter formatter)
Second application of modifications (based on new regions)
|
static java.util.function.BiFunction<org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument,org.eclipse.jface.text.ITypedRegion,JsRegionProcessor> |
createFactory(java.lang.String htmlIndent)
Factory for
StructuredDocumentProcessor |
fixDelimiter, fixTagIndent, getFirstLine, getLastLinepublic JsRegionProcessor(org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument document,
org.eclipse.jface.text.ITypedRegion scriptRegion,
java.lang.String htmlIndent)
protected void applyFirst(org.eclipse.wst.jsdt.core.formatter.CodeFormatter formatter)
throws org.eclipse.text.edits.MalformedTreeException,
org.eclipse.jface.text.BadLocationException
StructuredDocumentProcessor.RegionProcessorapplyFirst in class StructuredDocumentProcessor.RegionProcessor<org.eclipse.wst.jsdt.core.formatter.CodeFormatter>org.eclipse.text.edits.MalformedTreeExceptionorg.eclipse.jface.text.BadLocationExceptionprotected void applySecond(org.eclipse.wst.jsdt.core.formatter.CodeFormatter formatter)
throws org.eclipse.text.edits.MalformedTreeException,
org.eclipse.jface.text.BadLocationException
StructuredDocumentProcessor.RegionProcessorapplySecond in class StructuredDocumentProcessor.RegionProcessor<org.eclipse.wst.jsdt.core.formatter.CodeFormatter>org.eclipse.text.edits.MalformedTreeExceptionorg.eclipse.jface.text.BadLocationExceptionpublic static java.util.function.BiFunction<org.eclipse.wst.sse.core.internal.provisional.text.IStructuredDocument,org.eclipse.jface.text.ITypedRegion,JsRegionProcessor> createFactory(java.lang.String htmlIndent)
StructuredDocumentProcessor