Class XbaseFormatter
- java.lang.Object
-
- org.eclipse.xtext.formatting2.AbstractFormatter2
-
- org.eclipse.xtext.formatting2.AbstractJavaFormatter
-
- org.eclipse.xtext.xbase.formatting2.XtypeFormatter
-
- org.eclipse.xtext.xbase.formatting2.XbaseFormatter
-
- All Implemented Interfaces:
org.eclipse.xtext.formatting2.IFormatter2
- Direct Known Subclasses:
XbaseWithAnnotationsFormatter
public class XbaseFormatter extends XtypeFormatter
-
-
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.AbstractRulebinaryOperationPrecedence(org.eclipse.emf.ecore.EObject op)protected XClosurebuilder(java.util.List<XExpression> params)protected java.lang.Iterable<XExpression>explicitParams(java.util.List<XExpression> params)voidformat(java.lang.Object expr, org.eclipse.xtext.formatting2.IFormattableDocument format)protected voidformatBody(XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)protected voidformatBodyInline(XExpression expr, boolean forceMultiline, org.eclipse.xtext.formatting2.IFormattableDocument doc)protected voidformatBodyParagraph(XExpression expr, org.eclipse.xtext.formatting2.IFormattableDocument doc)protected voidformatBuilderWithLeadingGap(XClosure closure, org.eclipse.xtext.formatting2.IFormattableDocument format)protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegionformatClosureParams(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 voidformatCommaSeparatedList(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 voidformatExpressionsMultiline(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 voidformatExpressionsSingleline(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 voidformatFeatureCallParams(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 voidformatFeatureCallTypeParameters(XAbstractFeatureCall expr, org.eclipse.xtext.formatting2.IFormattableDocument format)XbaseGrammarAccessgetGrammar()protected booleanisMultilineOrInNewLine(org.eclipse.emf.ecore.EObject obj)protected booleanisSingleLineBlock(XBlockExpression expr)protected booleanprependNewLineIfMultiline(org.eclipse.emf.ecore.EObject obj)-
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
-
-
-
-
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)
-
builder
protected XClosure builder(java.util.List<XExpression> params)
-
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:
formatin classXtypeFormatter
-
getGrammar
@Pure public XbaseGrammarAccess getGrammar()
-
-