Class BslFormatter2

java.lang.Object
org.eclipse.xtext.formatting2.AbstractFormatter2
com.e1c.g5.v8.dt.formatter.bsl.BslFormatter2
All Implemented Interfaces:
org.eclipse.xtext.formatting2.IFormatter2

public class BslFormatter2 extends org.eclipse.xtext.formatting2.AbstractFormatter2
This class implements ProvidableFormatter with recursive formatting on given Object. It is implied that any model object manages its explicit children as if they were solid and calls specific format methods on them depending on their instance. It is implied that for explicit instance of class A formatA() called after formatB() (if it exists), where B extends EObject and is super type of A
  • Field Details

    • serviceProvider

      @Inject protected ServiceProvider serviceProvider
      The service provider for this formatter containing objects that are needed to perform proper formatting
    • errors

      protected final Set<org.eclipse.emf.ecore.EObject> errors
      EObjects that are parsed with errors
    • optionProvider

      @Inject protected DelegateOptionProvider optionProvider
      The delegate option provider that is used to get preferences
  • Constructor Details

    • BslFormatter2

      public BslFormatter2()
  • Method Details

    • format

      public void format(Object object, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Specified by:
      format in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createWhitespaceReplacer

      public org.eclipse.xtext.formatting2.ITextReplacer createWhitespaceReplacer(org.eclipse.xtext.formatting2.regionaccess.ITextSegment hiddens, org.eclipse.xtext.formatting2.IHiddenRegionFormatting formatting)
      Overrides:
      createWhitespaceReplacer in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createCommentReplacer

      public org.eclipse.xtext.formatting2.ITextReplacer createCommentReplacer(org.eclipse.xtext.formatting2.regionaccess.IComment comment)
      Overrides:
      createCommentReplacer in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createHiddenRegionReplacer

      public org.eclipse.xtext.formatting2.ITextReplacer createHiddenRegionReplacer(org.eclipse.xtext.formatting2.regionaccess.IHiddenRegion region, org.eclipse.xtext.formatting2.IHiddenRegionFormatting formatting)
      Overrides:
      createHiddenRegionReplacer in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createFormattableRootDocument

      public org.eclipse.xtext.formatting2.IFormattableDocument createFormattableRootDocument()
      Overrides:
      createFormattableRootDocument in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createHiddenRegionFormatting

      public org.eclipse.xtext.formatting2.IHiddenRegionFormatting createHiddenRegionFormatting()
      Overrides:
      createHiddenRegionFormatting in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • createTextReplacerContext

      public org.eclipse.xtext.formatting2.ITextReplacerContext createTextReplacerContext(org.eclipse.xtext.formatting2.IFormattableDocument document)
      Overrides:
      createTextReplacerContext in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • formatXtextResource

      protected void formatXtextResource(org.eclipse.xtext.resource.XtextResource resource, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats XtextResource Probably just gets resourse's Module and calls format on it. It must run #findAllUnproducingAndErrors(EObject) to collect errors properly. Or do it by itself
      Parameters:
      resource - The resource to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatModule

      protected void formatModule(Module module, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats regions between Module components and calls format on them
      Parameters:
      module - The module to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatMethod

      protected void formatMethod(Method method, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Method object.
      Parameters:
      method - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatProcedure

      protected void formatProcedure(Procedure procedure, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formatting on procedure generally done in formatMethod(Method, IFormattableDocument). This is hook-up for some specific formatting.
      Parameters:
      procedure - The procedure to format, cannot be null
      document - The document to accumulate text edits, cannot be null
      See Also:
    • formatFunction

      protected void formatFunction(Function function, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formatting on function generally done in formatMethod(Method, IFormattableDocument). This is hook-up for some specific formatting.
      Parameters:
      function - The function to format, cannot be null
      document - The formattable document to add text replaces to, cannot be null
      See Also:
    • formatPreprocessor

      protected void formatPreprocessor(Preprocessor preprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Preprocessor object
      Parameters:
      preprocessor - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItem

      protected void formatPreprocessorItem(PreprocessorItem preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats PreprocessorItem object
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemExpression

      protected void formatPreprocessorItemExpression(PreprocessorItemExpression preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemDeclareStatement

      protected void formatPreprocessorItemDeclareStatement(PreprocessorItemDeclareStatement preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemDeclareStatementImpl

      protected void formatPreprocessorItemDeclareStatementImpl(PreprocessorItemDeclareStatementImpl preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemStatements

      protected void formatPreprocessorItemStatements(PreprocessorItemStatements preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemMethodStatement

      protected void formatPreprocessorItemMethodStatement(PreprocessorItemMethodStatement preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemModule

      protected void formatPreprocessorItemModule(PreprocessorItemModule preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats PreprocessorItemModule object
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemAllTypeStatements

      protected void formatPreprocessorItemAllTypeStatements(PreprocessorItemAllTypeStatements preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemStatementsImpl

      protected void formatPreprocessorItemStatementsImpl(PreprocessorItemStatementsImpl preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format
      document - The document to accumulate text edits
    • formatPreprocessorItemAllTypeStatementsImpl

      protected void formatPreprocessorItemAllTypeStatementsImpl(PreprocessorItemAllTypeStatementsImpl preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format
      document - The document to accumulate text edits
    • formatPreprocessorItemMethodStatementImpl

      protected void formatPreprocessorItemMethodStatementImpl(PreprocessorItemMethodStatementImpl preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorItemModuleImpl

      protected void formatPreprocessorItemModuleImpl(PreprocessorItemModuleImpl preprocessorItem, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorItem - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorConditional

      protected void formatPreprocessorConditional(PreprocessorConditional preprocessorConditional, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorConditional - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorIfConditional

      protected void formatPreprocessorIfConditional(PreprocessorIfConditional preprocessorIfConditional, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorIfConditional - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorElseIfConditional

      protected void formatPreprocessorElseIfConditional(PreprocessorIfConditional preprocessorElseIfConditional, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorElseIfConditional - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorExpression

      protected void formatPreprocessorExpression(PreprocessorExpression preprocessorExpression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats PreprocessorExpression object
      Parameters:
      preprocessorExpression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBinaryPreprocessorExpression

      protected void formatBinaryPreprocessorExpression(BinaryPreprocessorExpression preprocessorExpression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorExpression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBracketPreprocessorExpression

      protected void formatBracketPreprocessorExpression(BracketPreprocessorExpression preprocessorExpression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorExpression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorLiteralExpression

      protected void formatPreprocessorLiteralExpression(PreprocessorLiteralExpression preprocessorExpression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorExpression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatUnaryPreprocessorExpression

      protected void formatUnaryPreprocessorExpression(UnaryPreprocessorExpression preprocessorExpression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorExpression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPreprocessorConditionalImpl

      protected void formatPreprocessorConditionalImpl(PreprocessorConditionalImpl preprocessorConditional, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      preprocessorConditional - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatDeclareStatement

      protected void formatDeclareStatement(DeclareStatement declareStatement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats DeclareStatement object
      Parameters:
      declareStatement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatStatement

      protected void formatStatement(Statement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats PreprocessorStatementItemModuleImpl object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatVariable

      protected void formatVariable(Variable variable, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Variable object
      Parameters:
      variable - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatExplicitVariable

      protected void formatExplicitVariable(ExplicitVariable explicitVariable, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ExplicitVariable object
      Parameters:
      explicitVariable - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatImplicitVariable

      protected void formatImplicitVariable(ImplicitVariable implicitVariable, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ImplicitVariable object
      Parameters:
      implicitVariable - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatFormalParam

      protected void formatFormalParam(FormalParam formalParam, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats FormalParam object
      Parameters:
      formalParam - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatLabel

      protected void formatLabel(Label label, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Label object
      Parameters:
      label - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatExpression

      protected void formatExpression(Expression expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Expression object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBinaryExpression

      protected void formatBinaryExpression(BinaryExpression expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats BinaryExpression object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBinaryExpressionWithGroupWrapAndAligment

      protected void formatBinaryExpressionWithGroupWrapAndAligment(BinaryExpression expression, org.eclipse.xtext.formatting2.IFormattableDocument document, int offset, int groupID, com.e1c.g5.v8.dt.formatter.bsl.BslFormatter2.binaryOperationPriority priority, com.e1c.g5.v8.dt.formatter.bsl.BslFormatter2.binaryOperationKind operationKind)
      Formats binary expression with group offset
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
      offset - The offset for alignment wrap
      groupID - The groupID for group wrap
      priority - The operation priority
      operationKind - The kind of operation. eg. arithmetic or logical operations
    • formatBinaryExpressionSimply

      protected void formatBinaryExpressionSimply(BinaryExpression expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats expression with simple indent on wrap
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatFeatureAccess

      protected void formatFeatureAccess(FeatureAccess expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats FeatureAccess object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatStaticFeatureAccess

      protected void formatStaticFeatureAccess(StaticFeatureAccess expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats StaticFeatureAccess object
      Parameters:
      expression - The object to format
      document - The document to accumulate text edits
    • formatDynamicFeatureAccess

      protected void formatDynamicFeatureAccess(DynamicFeatureAccess expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats DynamicFeatureAccess object
      Parameters:
      expression - The object to format
      document - The document to accumulate text edits
    • formatFunctionStyleCreator

      protected void formatFunctionStyleCreator(FunctionStyleCreator expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats FunctionStyleCreator object
      Parameters:
      expression - The object to format
      document - The document to accumulate text edits
    • formatIndexAccess

      protected void formatIndexAccess(IndexAccess expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats IndexAccess object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatInvocation

      protected void formatInvocation(Invocation expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Invocation object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatOperatorStyleCreator

      protected void formatOperatorStyleCreator(OperatorStyleCreator expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats OperatorStyleCreator object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatType

      protected void formatType(Type type, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Type object
      Parameters:
      type - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatExtendedCollectionType

      protected void formatExtendedCollectionType(ExtendedCollectionType type, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ExtendedCollectionType object
      Parameters:
      type - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPropertyType

      protected void formatPropertyType(PropertyType type, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats PropertyType object
      Parameters:
      type - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatExtendedType

      protected void formatExtendedType(ExtendedType type, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ExtendedType object
      Parameters:
      type - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatTypeImpl

      protected void formatTypeImpl(TypeImpl type, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats TypeImpl object
      Parameters:
      type - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatUnaryExpression

      protected void formatUnaryExpression(UnaryExpression expression, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats UnaryExpression object
      Parameters:
      expression - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatRegionPreprocessor

      protected void formatRegionPreprocessor(RegionPreprocessor regionPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      regionPreprocessor - The preprocessor region to format, cannot be null
      document - The formattable document to add text replaces to, cannot be null
    • formatRegionPreprocessorExpression

      protected void formatRegionPreprocessorExpression(RegionPreprocessorExpression regionPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formatting of this object type is generally implemented in formatRegionPreprocessor(RegionPreprocessor, IFormattableDocument). This is hook-up for some specific formatting on this object.
      Parameters:
      regionPreprocessor - The preprocessor region to format, cannot be null
      document - The formattable document to add text replaces to, cannot be null
      See Also:
    • formatRegionPreprocessorDeclareStatement

      protected void formatRegionPreprocessorDeclareStatement(RegionPreprocessorDeclareStatement regionPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formatting of this object type is generally implemented in formatRegionPreprocessor(RegionPreprocessor, IFormattableDocument). This is hook-up for some specific formatting on this object.
      Parameters:
      regionPreprocessor - The preprocessor region to format, cannot be null
      document - The formattable document to add text replaces on, cannot be null
      See Also:
    • formatRegionPreprocessorStatement

      protected void formatRegionPreprocessorStatement(RegionPreprocessorStatement regionPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formatting of this object type is generally implemented in formatRegionPreprocessor(RegionPreprocessor, IFormattableDocument). This is hook-up for some specific formatting on this object.
      Parameters:
      regionPreprocessor - The preprocessor region to format, cannot be null
      document - The formattable document to add text replaces on, cannot be null
      See Also:
    • formatIfPreprocessor

      protected void formatIfPreprocessor(IfPreprocessor ifPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats IfPreprocessor object
      Parameters:
      ifPreprocessor - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatIfPreprocessorDeclareStatement

      protected void formatIfPreprocessorDeclareStatement(IfPreprocessorDeclareStatement ifPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      ifPreprocessor - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatIfPreprocessorExpression

      protected void formatIfPreprocessorExpression(IfPreprocessorExpression ifPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      ifPreprocessor - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatIfPreprocessorStatement

      protected void formatIfPreprocessorStatement(IfPreprocessorStatement ifPreprocessor, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Parameters:
      ifPreprocessor - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatDeclareStatementImpl

      protected void formatDeclareStatementImpl(DeclareStatementImpl declareStatement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats DeclareStatementImpl object
      Parameters:
      declareStatement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatLabeledStatement

      protected void formatLabeledStatement(LabeledStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats LabeledStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatUnlabeledStatement

      protected void formatUnlabeledStatement(UnlabeledStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats UnlabeledStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatLoopStatement

      protected void formatLoopStatement(LoopStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats LoopStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatForStatement

      protected void formatForStatement(ForStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ForStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatForToStatement

      protected void formatForToStatement(ForToStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ForToStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatForEachStatement

      protected void formatForEachStatement(ForEachStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ForEachStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatWhileStatement

      protected void formatWhileStatement(WhileStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats WhileStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatSimpleStatement

      protected void formatSimpleStatement(SimpleStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats SimpleStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatIfStatement

      protected void formatIfStatement(IfStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats IfStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatConditional

      protected void formatConditional(Conditional conditional, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Conditional object
      Parameters:
      conditional - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatTryExceptStatement

      protected void formatTryExceptStatement(TryExceptStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats TryExceptStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatGotoStatement

      protected void formatGotoStatement(GotoStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats GotoStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBreakStatement

      protected void formatBreakStatement(BreakStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats BreakStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatContinueStatement

      protected void formatContinueStatement(ContinueStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ContinueStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatReturnStatement

      protected void formatReturnStatement(ReturnStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ReturnStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatRaiseStatement

      protected void formatRaiseStatement(RaiseStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats RaiseStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatExecuteStatement

      protected void formatExecuteStatement(ExecuteStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats ExecuteStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatAddHandlerStatement

      protected void formatAddHandlerStatement(AddHandlerStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats AddHandlerStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatRemoveHandlerStatement

      protected void formatRemoveHandlerStatement(RemoveHandlerStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats RemoveHandlerStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatEmptyStatement

      protected void formatEmptyStatement(EmptyStatement statement, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats EmptyStatement object
      Parameters:
      statement - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatLiteral

      protected void formatLiteral(Literal literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Literal object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatStringLiteral

      protected void formatStringLiteral(StringLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats StringLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatNullLiteral

      protected void formatNullLiteral(NullLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats NullLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatUndefinedLiteral

      protected void formatUndefinedLiteral(UndefinedLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats UndefinedLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatBooleanLiteral

      protected void formatBooleanLiteral(BooleanLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats BooleanLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatNumberLiteral

      protected void formatNumberLiteral(NumberLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats NumberLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatDateLiteral

      protected void formatDateLiteral(DateLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats DateLiteral object
      Parameters:
      literal - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • formatPragma

      protected void formatPragma(Pragma pragma, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Formats Pragma object
      Parameters:
      pragma - The object to format, cannot be null
      document - The document to accumulate text edits, cannot be null
    • createIndentOnAutowrapFormatter

      protected org.eclipse.xtext.formatting2.IAutowrapFormatter createIndentOnAutowrapFormatter()
      Creates IAutowrapFormatterFormatter that indents line that was wrapped
      Returns:
      new instance of IAutowrapFormatter, cannot be null
    • createWhitespaceReplacer

      protected BslWhitespaceReplacer createWhitespaceReplacer(org.eclipse.xtext.formatting2.regionaccess.ITextSegment hiddens, org.eclipse.xtext.formatting2.IHiddenRegionFormatting formatting, boolean forceWrap)
      Creates WhitespaceReplacer that has to be able to perform forceWrap
      Parameters:
      hiddens - The hidden regions that replacer has to manage
      formatting - The formatting information
      forceWrap - Whether force wrap shall be performed
      Returns:
      The instance of BslWhitespaceReplacer
    • getBooleanPreference

      protected Boolean getBooleanPreference(String preferenceKey)
      Get boolean preference from option provider with a given preferenceKey
      Parameters:
      preferenceKey - The key of the preference, cannot be null
      Returns:
      The value of the preference with the given key, can be null
    • getIntegerPreference

      protected Integer getIntegerPreference(String preferenceKey)
      Get integer preference from option provider with a given preferenceKey
      Parameters:
      preferenceKey - The key of the preference, cannot be null
      Returns:
      The value of the preference with the given key, can be null
    • getStringPreference

      protected String getStringPreference(String preferenceKey)
      Get string preference from option provider with a given preferenceKey
      Parameters:
      preferenceKey - The key of the preference, cannot be null
      Returns:
      The value of the preference with the given key, can be null
    • initialize

      protected void initialize(org.eclipse.xtext.formatting2.FormatterRequest request)
      Overrides:
      initialize in class org.eclipse.xtext.formatting2.AbstractFormatter2
    • reset

      protected void reset()
      Overrides:
      reset in class org.eclipse.xtext.formatting2.AbstractFormatter2