Package com.e1c.g5.v8.dt.formatter.bsl
Class BslTextReplacerContext
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.TextReplacerContext
-
- com.e1c.g5.v8.dt.formatter.bsl.BslTextReplacerContext
-
- All Implemented Interfaces:
org.eclipse.xtext.formatting2.ITextReplacerContext
public class BslTextReplacerContext extends org.eclipse.xtext.formatting2.internal.TextReplacerContextThis class is extension forTextReplacerContextthat relies on bsl preferences
-
-
Field Summary
Fields Modifier and Type Field Description protected booleannextReplacerIsChild
-
Constructor Summary
Constructors Modifier Constructor Description BslTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document)Calls super's constructor with given parametersprotectedBslTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document, org.eclipse.xtext.formatting2.ITextReplacerContext previous, int indentation, org.eclipse.xtext.formatting2.ITextReplacer replacer)Calls super's constructor with given parameters
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetIndentationString(int indentationLevel)intgetLeadingCharsInLineCount()protected intlogicalLength(String text)voidsetNextReplacerIsChild()org.eclipse.xtext.formatting2.ITextReplacerContextwithDocument(org.eclipse.xtext.formatting2.IFormattableDocument document)org.eclipse.xtext.formatting2.ITextReplacerContextwithIndentation(int indentation)org.eclipse.xtext.formatting2.ITextReplacerContextwithReplacer(org.eclipse.xtext.formatting2.ITextReplacer replacer)-
Methods inherited from class org.eclipse.xtext.formatting2.internal.TextReplacerContext
addReplacement, canAutowrap, createTextReplacementsSet, getDocument, getFormatter, getIndentation, getIndentationString, getLocalReplacements, getLocalReplacementsReverse, getNewLinesString, getPreviousContext, getRegion, getReplacementsUntil, getReplacer, isAutowrap, isIdentityEdit, isInRequestedRange, isInsideFormattedRegion, isInUndefinedRegion, isWrapInRegion, isWrapSincePrevious, setAutowrap, setCanAutowrap, toString, toStringLocal
-
-
-
-
Constructor Detail
-
BslTextReplacerContext
public BslTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document)
Calls super's constructor with given parameters- Parameters:
document- The document on which this context is working, cannot benull
-
BslTextReplacerContext
protected BslTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document, org.eclipse.xtext.formatting2.ITextReplacerContext previous, int indentation, org.eclipse.xtext.formatting2.ITextReplacer replacer)Calls super's constructor with given parameters- Parameters:
document- The document on which this context is working, cannot benullprevious- The previous context, can benullindentation- The indentation level for this contextreplacer- The replacer, bound to this context, can benull
-
-
Method Detail
-
getLeadingCharsInLineCount
public int getLeadingCharsInLineCount()
- Specified by:
getLeadingCharsInLineCountin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
getLeadingCharsInLineCountin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
setNextReplacerIsChild
public void setNextReplacerIsChild()
- Specified by:
setNextReplacerIsChildin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
setNextReplacerIsChildin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
withDocument
public org.eclipse.xtext.formatting2.ITextReplacerContext withDocument(org.eclipse.xtext.formatting2.IFormattableDocument document)
- Specified by:
withDocumentin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
withDocumentin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
withIndentation
public org.eclipse.xtext.formatting2.ITextReplacerContext withIndentation(int indentation)
- Specified by:
withIndentationin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
withIndentationin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
withReplacer
public org.eclipse.xtext.formatting2.ITextReplacerContext withReplacer(org.eclipse.xtext.formatting2.ITextReplacer replacer)
- Specified by:
withReplacerin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
withReplacerin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
getIndentationString
public String getIndentationString(int indentationLevel)
- Specified by:
getIndentationStringin interfaceorg.eclipse.xtext.formatting2.ITextReplacerContext- Overrides:
getIndentationStringin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
logicalLength
protected int logicalLength(String text)
- Overrides:
logicalLengthin classorg.eclipse.xtext.formatting2.internal.TextReplacerContext
-
-