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.TextReplacerContext
This class is extension for TextReplacerContext that relies on bsl preferences
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected boolean
     
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    BslTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document)
    Calls super's constructor with given parameters
    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
  • Method Summary

    Modifier and Type
    Method
    Description
    getIndentationString(int indentationLevel)
     
    int
     
    protected int
     
    void
     
    org.eclipse.xtext.formatting2.ITextReplacerContext
    withDocument(org.eclipse.xtext.formatting2.IFormattableDocument document)
     
    org.eclipse.xtext.formatting2.ITextReplacerContext
    withIndentation(int indentation)
     
    org.eclipse.xtext.formatting2.ITextReplacerContext
    withReplacer(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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • nextReplacerIsChild

      protected boolean nextReplacerIsChild
  • Constructor Details

    • 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 be null
    • 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 be null
      previous - The previous context, can be null
      indentation - The indentation level for this context
      replacer - The replacer, bound to this context, can be null
  • Method Details

    • getLeadingCharsInLineCount

      public int getLeadingCharsInLineCount()
      Specified by:
      getLeadingCharsInLineCount in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      getLeadingCharsInLineCount in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • setNextReplacerIsChild

      public void setNextReplacerIsChild()
      Specified by:
      setNextReplacerIsChild in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      setNextReplacerIsChild in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • withDocument

      public org.eclipse.xtext.formatting2.ITextReplacerContext withDocument(org.eclipse.xtext.formatting2.IFormattableDocument document)
      Specified by:
      withDocument in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      withDocument in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • withIndentation

      public org.eclipse.xtext.formatting2.ITextReplacerContext withIndentation(int indentation)
      Specified by:
      withIndentation in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      withIndentation in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • withReplacer

      public org.eclipse.xtext.formatting2.ITextReplacerContext withReplacer(org.eclipse.xtext.formatting2.ITextReplacer replacer)
      Specified by:
      withReplacer in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      withReplacer in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • getIndentationString

      public String getIndentationString(int indentationLevel)
      Specified by:
      getIndentationString in interface org.eclipse.xtext.formatting2.ITextReplacerContext
      Overrides:
      getIndentationString in class org.eclipse.xtext.formatting2.internal.TextReplacerContext
    • logicalLength

      protected int logicalLength(String text)
      Overrides:
      logicalLength in class org.eclipse.xtext.formatting2.internal.TextReplacerContext