Class XtendFormatter

  • All Implemented Interfaces:
    org.eclipse.xtext.formatting2.IFormatter2

    public class XtendFormatter
    extends org.eclipse.xtext.xbase.annotations.formatting2.XbaseWithAnnotationsFormatter
    • 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
      XtendFormatter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void _format​(AnonymousClass anonymousClass, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(RichString rs, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendAnnotationType annotationType, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendClass clazz, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendConstructor func, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendEnum enumeration, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendField field, org.eclipse.xtext.formatting2.IFormattableDocument document)  
      protected void _format​(XtendFile xtendFile, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendFunction func, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendInterface interfaze, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(XtendParameter param, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(org.eclipse.xtext.common.types.JvmFormalParameter expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(org.eclipse.xtext.xbase.XIfExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void _format​(org.eclipse.xtext.xbase.XVariableDeclaration expr, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected org.eclipse.xtext.xbase.XClosure builder​(java.util.List<org.eclipse.xtext.xbase.XExpression> params)  
      void format​(java.lang.Object anonymousClass, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatAnnotations​(XtendAnnotationTarget target, org.eclipse.xtext.formatting2.IFormattableDocument document, org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super org.eclipse.xtext.formatting2.IHiddenRegionFormatter> configKey)  
      protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatBody​(XtendTypeDeclaration type, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected void formatBody​(org.eclipse.xtext.xbase.XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void formatBodyInline​(org.eclipse.xtext.xbase.XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)  
      protected void formatModifiers​(XtendMember member, org.eclipse.xtext.formatting2.IFormattableDocument document)
      Always put existing modifiers into this fixed order
      protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatTypeParameters​(XtendMember member, java.util.List<? extends org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters, org.eclipse.xtext.formatting2.IFormattableDocument format)  
      protected boolean isSingleLineBlock​(org.eclipse.xtext.xbase.XBlockExpression expr)  
      • Methods inherited from class org.eclipse.xtext.xbase.annotations.formatting2.XbaseWithAnnotationsFormatter

        _format
      • Methods inherited from class org.eclipse.xtext.xbase.formatting2.XbaseFormatter

        _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, _format, binaryOperationPrecedence, explicitParams, formatBodyParagraph, formatBuilderWithLeadingGap, formatClosureParams, formatCommaSeparatedList, formatExpressionsMultiline, formatExpressionsSingleline, formatFeatureCallParams, formatFeatureCallTypeParameters, getGrammar, isMultilineOrInNewLine, prependNewLineIfMultiline
      • Methods inherited from class org.eclipse.xtext.xbase.formatting2.XtypeFormatter

        _format, _format, _format, _format, _format, _format
      • 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

      • XtendFormatter

        public XtendFormatter()
    • Method Detail

      • _format

        protected void _format​(XtendFile xtendFile,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatAnnotations

        protected void formatAnnotations​(XtendAnnotationTarget target,
                                         @Extension
                                         org.eclipse.xtext.formatting2.IFormattableDocument document,
                                         org.eclipse.xtext.xbase.lib.Procedures.Procedure1<? super org.eclipse.xtext.formatting2.IHiddenRegionFormatter> configKey)
      • _format

        protected void _format​(XtendClass clazz,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatTypeParameters

        protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatTypeParameters​(XtendMember member,
                                                                                                  java.util.List<? extends org.eclipse.xtext.common.types.JvmTypeParameter> typeParameters,
                                                                                                  @Extension
                                                                                                  org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatBody

        protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatBody​(XtendTypeDeclaration type,
                                                                                        @Extension
                                                                                        org.eclipse.xtext.formatting2.IFormattableDocument format)
      • _format

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

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

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

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

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

        protected void _format​(XtendField field,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument document)
      • _format

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

        protected void _format​(org.eclipse.xtext.xbase.XVariableDeclaration expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
        Overrides:
        _format in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • _format

        protected void _format​(org.eclipse.xtext.xbase.XIfExpression expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
        Overrides:
        _format in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • _format

        protected void _format​(org.eclipse.xtext.common.types.JvmFormalParameter expr,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
        Overrides:
        _format in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • _format

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

        protected void _format​(AnonymousClass anonymousClass,
                               @Extension
                               org.eclipse.xtext.formatting2.IFormattableDocument format)
      • formatModifiers

        protected void formatModifiers​(XtendMember member,
                                       @Extension
                                       org.eclipse.xtext.formatting2.IFormattableDocument document)
        Always put existing modifiers into this fixed order
      • isSingleLineBlock

        protected boolean isSingleLineBlock​(org.eclipse.xtext.xbase.XBlockExpression expr)
        Overrides:
        isSingleLineBlock in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • formatBodyInline

        protected void formatBodyInline​(org.eclipse.xtext.xbase.XExpression expr,
                                        boolean forceMultiline,
                                        @Extension
                                        org.eclipse.xtext.formatting2.IFormattableDocument doc)
        Overrides:
        formatBodyInline in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • formatBody

        protected void formatBody​(org.eclipse.xtext.xbase.XExpression expr,
                                  boolean forceMultiline,
                                  @Extension
                                  org.eclipse.xtext.formatting2.IFormattableDocument doc)
        Overrides:
        formatBody in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • builder

        protected org.eclipse.xtext.xbase.XClosure builder​(java.util.List<org.eclipse.xtext.xbase.XExpression> params)
        Overrides:
        builder in class org.eclipse.xtext.xbase.formatting2.XbaseFormatter
      • format

        public void format​(java.lang.Object anonymousClass,
                           org.eclipse.xtext.formatting2.IFormattableDocument format)
        Overrides:
        format in class org.eclipse.xtext.xbase.annotations.formatting2.XbaseWithAnnotationsFormatter