Class XbaseFormatter

    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.eclipse.xtext.formatting2.AbstractJavaFormatter

        org.eclipse.xtext.formatting2.AbstractJavaFormatter.EObjectErrorHandler
    • Field Summary

      • Fields inherited from class org.eclipse.xtext.formatting2.AbstractFormatter2

        textRegionExtensions
    • Constructor Summary

      Constructors 
      Constructor Description
      XbaseFormatter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void _format​(org.eclipse.xtext.common.types.JvmFormalParameter expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference array, org.eclipse.xtext.formatting2.IFormattableDocument document)  
      protected void _format​(org.eclipse.xtext.common.types.JvmTypeConstraint constraint, org.eclipse.xtext.formatting2.IFormattableDocument document)  
      protected void _format​(XAssignment expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XBasicForLoopExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XBinaryOperation expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XBlockExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XCastedExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void _format​(XClosure expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XCollectionLiteral literal, org.eclipse.xtext.formatting2.IFormattableDocument document)  
      protected void _format​(XConstructorCall expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XDoWhileExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XFeatureCall expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XForLoopExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XIfExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XInstanceOfExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void _format​(XMemberFeatureCall expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XPostfixOperation expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void _format​(XReturnExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XSwitchExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XSynchronizedExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XThrowExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XTryCatchFinallyExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XTypeLiteral expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XVariableDeclaration expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XWhileExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected org.eclipse.xtext.AbstractRule binaryOperationPrecedence​(org.eclipse.emf.ecore.EObject op)  
      protected XClosure builder​(java.util.List<XExpression> params)  
      protected java.lang.Iterable<XExpression> explicitParams​(java.util.List<XExpression> params)  
      void format​(java.lang.Object expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatBody​(XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void formatBodyInline​(XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void formatBodyParagraph​(XExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void formatBuilderWithLeadingGap​(XClosure closure, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatClosureParams​(XClosure expr, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open, org.eclipse.xtext.formatting2.IFormattableDocument format, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super org.eclipse.xtext.formatting2.IHiddenRegionFormatter> init)  
      protected void formatCommaSeparatedList​(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> elements, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatExpressionsMultiline​(java.util.Collection<? extends XExpression> expressions, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatExpressionsSingleline​(java.util.Collection<? extends XExpression> expressions, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatFeatureCallParams​(java.util.List<XExpression> params, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open, org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatFeatureCallTypeParameters​(XAbstractFeatureCall expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      XbaseGrammarAccess getGrammar()  
      protected boolean isMultilineOrInNewLine​(org.eclipse.emf.ecore.EObject obj)  
      protected boolean isSingleLineBlock​(XBlockExpression expr)  
      protected boolean prependNewLineIfMultiline​(org.eclipse.emf.ecore.EObject obj)  
      • Methods inherited from class org.eclipse.xtext.formatting2.AbstractJavaFormatter

        allRegionsFor, allSemanticRegions, autowrap, createPolymorhicDispatcher, formatUsingPolymorphicDispatcher, grammarElement, highPriority, immediatelyFollowing, immediatelyPreceding, indent, isMultiline, lowPriority, newLine, nextHiddenRegion, noAutowrap, noIndentation, noSpace, oneSpace, previousHiddenRegion, regionFor, regionForEObject, semanticRegions
      • Methods inherited from class org.eclipse.xtext.formatting2.AbstractFormatter2

        _format, _format, _format, _format, createCommentReplacer, createFormattableRootDocument, createFormattableSubDocument, createHiddenRegionFormatter, createHiddenRegionFormatter, createHiddenRegionFormatting, createHiddenRegionFormattingMerger, createHiddenRegionReplacer, createTextReplacerContext, createTextReplacerMerger, createWhitespaceReplacer, format, getPreference, getPreferences, getRequest, getTextRegionAccess, handleTraceMissing, initalize, initialize, isInRequestedRange, postProcess, reset, shouldFormat
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XbaseFormatter

        public XbaseFormatter()
    • Method Detail

      • _format

        protected void _format​(XCollectionLiteral literal,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument document)
      • formatCommaSeparatedList

        protected void formatCommaSeparatedList​(java.util.Collection<? extends org.eclipse.emf.ecore.EObject> elements,
                                                org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open,
                                                org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close,
                                                @Extension
                                                org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(org.eclipse.xtext.common.types.JvmGenericArrayTypeReference array,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument document)
      • _format

        protected void _format​(org.eclipse.xtext.common.types.JvmTypeConstraint constraint,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument document)
      • _format

        protected void _format​(XVariableDeclaration expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XAssignment expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatFeatureCallParams

        protected void formatFeatureCallParams​(java.util.List<XExpression> params,
                                               org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open,
                                               org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close,
                                               @Extension
                                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatBuilderWithLeadingGap

        protected void formatBuilderWithLeadingGap​(XClosure closure,
                                                   @Extension
                                                   org.eclipse.xtext.formatting2.IFormattableDocument format)
      • explicitParams

        protected java.lang.Iterable<XExpression> explicitParams​(java.util.List<XExpression> params)
      • _format

        protected void _format​(XConstructorCall expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatFeatureCallTypeParameters

        protected void formatFeatureCallTypeParameters​(XAbstractFeatureCall expr,
                                                       @Extension
                                                       org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XFeatureCall expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XMemberFeatureCall expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • binaryOperationPrecedence

        protected org.eclipse.xtext.AbstractRule binaryOperationPrecedence​(org.eclipse.emf.ecore.EObject op)
      • _format

        protected void _format​(XBinaryOperation expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • prependNewLineIfMultiline

        protected boolean prependNewLineIfMultiline​(org.eclipse.emf.ecore.EObject obj)
      • _format

        protected void _format​(XSynchronizedExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XIfExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XForLoopExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XBasicForLoopExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XWhileExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XDoWhileExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XBlockExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • isSingleLineBlock

        protected boolean isSingleLineBlock​(XBlockExpression expr)
      • _format

        protected void _format​(XTypeLiteral expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XThrowExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XReturnExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XTryCatchFinallyExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(org.eclipse.xtext.common.types.JvmFormalParameter expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

        protected void _format​(XSwitchExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatClosureParams

        protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatClosureParams​(XClosure expr,
                                                                                                 org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open,
                                                                                                 @Extension
                                                                                                 org.eclipse.xtext.formatting2.IFormattableDocument format,
                                                                                                 org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super org.eclipse.xtext.formatting2.IHiddenRegionFormatter> init)
      • _format

        protected void _format​(XClosure expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatBody

        protected void formatBody​(XExpression expr,
                                  boolean forceMultiline,
                                  @Extension
                                  org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • formatBodyInline

        protected void formatBodyInline​(XExpression expr,
                                        boolean forceMultiline,
                                        @Extension
                                        org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • formatBodyParagraph

        protected void formatBodyParagraph​(XExpression expr,
                                           @Extension
                                           org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • _format

        protected void _format​(XInstanceOfExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • _format

        protected void _format​(XCastedExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • _format

        protected void _format​(XPostfixOperation expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument doc)
      • formatExpressionsMultiline

        protected void formatExpressionsMultiline​(java.util.Collection<? extends XExpression> expressions,
                                                  org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open,
                                                  org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close,
                                                  @Extension
                                                  org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatExpressionsSingleline

        protected void formatExpressionsSingleline​(java.util.Collection<? extends XExpression> expressions,
                                                   org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion open,
                                                   org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion close,
                                                   @Extension
                                                   org.eclipse.xtext.formatting2.IFormattableDocument format)
      • isMultilineOrInNewLine

        protected boolean isMultilineOrInNewLine​(org.eclipse.emf.ecore.EObject obj)
      • format

        public void format​(java.lang.Object expr,
                           org.eclipse.xtext.formatting2.IFormattableDocument format)
        Overrides:
        format in class XtypeFormatter