Package com._1c.g5.v8.dt.ql.formatting
Class QlFormatter
- java.lang.Object
-
- org.eclipse.xtext.formatting.impl.AbstractFormatter
-
- org.eclipse.xtext.formatting.impl.BaseFormatter
-
- org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
- com._1c.g5.v8.dt.ql.formatting.QlFormatter
-
- All Implemented Interfaces:
org.eclipse.xtext.formatting.IFormatter
,org.eclipse.xtext.formatting.IFormatterExtension
- Direct Known Subclasses:
QlDcsFormatter
,RightQlFormatter
public class QlFormatter extends org.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
This class contains custom formatting description. see : http://www.eclipse.org/Xtext/documentation.html#formatting on how and when to use it Also seeorg.eclipse.xtext.xtext.XtextFormattingTokenSerializer
as an example
-
-
Constructor Summary
Constructors Constructor Description QlFormatter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
commonFormatRule(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common rule of formatting (for punctuation)protected void
configureFormatting(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Formating all part of queryorg.eclipse.xtext.parsetree.reconstr.ITokenStream
createFormatterStream(String indent, org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces)
org.eclipse.xtext.parsetree.reconstr.ITokenStream
createFormatterStream(org.eclipse.emf.ecore.EObject context, String indent, org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces)
protected org.eclipse.xtext.formatting.impl.FormattingConfig
createFormattingConfig()
protected org.eclipse.xtext.formatting.IElementMatcherProvider.IElementMatcher<org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementPattern>
createMatcher()
protected void
formatAbstractQuerySchemaFields(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting select fieldsprotected void
formatAbstractQuerySchemaSource(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for source of queryprotected void
formatACastingType(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for cast operatorprotected void
formatBetweenExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Between expressionprotected void
formatCaseBody(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for case operatorprotected void
formatCaseOperationExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for case operatorprotected void
formatCastOperationExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for 'in' operatorprotected void
formatComment(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for commentprotected void
formatCommonUnaryNegOperatorExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for unary operatorprotected void
formatDateLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for date literalprotected void
formatFunctionExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for function expressionprotected void
formatInExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for In expressionprotected void
formatLikeExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Like expressionprotected void
formatLinkExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Link expressionprotected void
formatLogicalAND(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical operator ANDprotected void
formatLogicalComparison(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical comparison operatorprotected void
formatLogicalMultiplicant(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for operatorprotected void
formatLogicalOrExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical operator ORprotected void
formatNestedTable(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Nested tableprotected void
formatOtherSelector(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting other operator selectorprotected void
formatParameterExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for parameter literalprotected void
formatPrimaryExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for PrimaryExpressionprotected void
formatQuerySchema(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting around anything queryprotected void
formatQuerySchemaGroupingSets(org.eclipse.xtext.formatting.impl.FormattingConfig c)
protected void
formatQuerySchemaNestedQuery(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting nested queryprotected void
formatQuerySchemaOrderExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for order expressionprotected void
formatQuerySchemaQuerySourceJoin(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for joins in sourceprotected void
formatQuerySchemaSelectQuery(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting select queryprotected void
formatQuerySchemaSource(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for source of queryprotected void
formatQuerySchemaTable(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting table in sourceprotected void
formatQuerySchemaTotalControlPoint(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for control total pointsprotected void
formatTopSelector(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting top operator selectorprotected void
formatTypeLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for type literalprotected void
formatValueLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for value literal
-
-
-
Method Detail
-
createFormatterStream
public org.eclipse.xtext.parsetree.reconstr.ITokenStream createFormatterStream(String indent, org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces)
- Specified by:
createFormatterStream
in interfaceorg.eclipse.xtext.formatting.IFormatter
- Overrides:
createFormatterStream
in classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
createFormatterStream
public org.eclipse.xtext.parsetree.reconstr.ITokenStream createFormatterStream(org.eclipse.emf.ecore.EObject context, String indent, org.eclipse.xtext.parsetree.reconstr.ITokenStream out, boolean preserveWhitespaces)
- Specified by:
createFormatterStream
in interfaceorg.eclipse.xtext.formatting.IFormatterExtension
- Overrides:
createFormatterStream
in classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
createFormattingConfig
protected org.eclipse.xtext.formatting.impl.FormattingConfig createFormattingConfig()
- Overrides:
createFormattingConfig
in classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
createMatcher
protected org.eclipse.xtext.formatting.IElementMatcherProvider.IElementMatcher<org.eclipse.xtext.formatting.impl.AbstractFormattingConfig.ElementPattern> createMatcher()
- Overrides:
createMatcher
in classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
-
configureFormatting
protected void configureFormatting(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Formating all part of query- Specified by:
configureFormatting
in classorg.eclipse.xtext.formatting.impl.AbstractDeclarativeFormatter
- Parameters:
c
- configuration
-
commonFormatRule
protected void commonFormatRule(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common rule of formatting (for punctuation)- Parameters:
c
- configuration
-
formatQuerySchema
protected void formatQuerySchema(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting around anything query- Parameters:
c
- configuration
-
formatQuerySchemaSelectQuery
protected void formatQuerySchemaSelectQuery(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting select query- Parameters:
c
- configuration
-
formatTopSelector
protected void formatTopSelector(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting top operator selector- Parameters:
c
- configuration
-
formatOtherSelector
protected void formatOtherSelector(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting other operator selector- Parameters:
c
- configuration
-
formatAbstractQuerySchemaFields
protected void formatAbstractQuerySchemaFields(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting select fields- Parameters:
c
- configuration
-
formatAbstractQuerySchemaSource
protected void formatAbstractQuerySchemaSource(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for source of query- Parameters:
c
- configuration
-
formatQuerySchemaTable
protected void formatQuerySchemaTable(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting table in source- Parameters:
c
- configuration
-
formatQuerySchemaNestedQuery
protected void formatQuerySchemaNestedQuery(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting nested query- Parameters:
c
- configuration
-
formatQuerySchemaSource
protected void formatQuerySchemaSource(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for source of query- Parameters:
c
- configuration
-
formatQuerySchemaQuerySourceJoin
protected void formatQuerySchemaQuerySourceJoin(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for joins in source- Parameters:
c
- configuration
-
formatQuerySchemaOrderExpression
protected void formatQuerySchemaOrderExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for order expression- Parameters:
c
- configuration
-
formatQuerySchemaTotalControlPoint
protected void formatQuerySchemaTotalControlPoint(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for control total points- Parameters:
c
- configuration
-
formatDateLiteralExpression
protected void formatDateLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for date literal- Parameters:
c
- configuration
-
formatFunctionExpression
protected void formatFunctionExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for function expression- Parameters:
c
- configuration
-
formatTypeLiteralExpression
protected void formatTypeLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for type literal- Parameters:
c
- configuration
-
formatParameterExpression
protected void formatParameterExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for parameter literal- Parameters:
c
- configuration
-
formatValueLiteralExpression
protected void formatValueLiteralExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for value literal- Parameters:
c
- configuration
-
formatCaseOperationExpression
protected void formatCaseOperationExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for case operator- Parameters:
c
- configuration
-
formatCaseBody
protected void formatCaseBody(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for case operator- Parameters:
c
- configuration
-
formatCastOperationExpression
protected void formatCastOperationExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Rule formatting for 'in' operator- Parameters:
c
- configuration
-
formatACastingType
protected void formatACastingType(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for cast operator- Parameters:
c
- configuration
-
formatCommonUnaryNegOperatorExpression
protected void formatCommonUnaryNegOperatorExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for unary operator- Parameters:
c
- configuration
-
formatLogicalOrExpression
protected void formatLogicalOrExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical operator OR- Parameters:
c
- configuration
-
formatLogicalAND
protected void formatLogicalAND(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical operator AND- Parameters:
c
- configuration
-
formatLogicalMultiplicant
protected void formatLogicalMultiplicant(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for operator- Parameters:
c
- configuration
-
formatLogicalComparison
protected void formatLogicalComparison(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for logical comparison operator- Parameters:
c
- configuration
-
formatLinkExpression
protected void formatLinkExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Link expression- Parameters:
c
- configuration
-
formatBetweenExpression
protected void formatBetweenExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Between expression- Parameters:
c
- configuration
-
formatLikeExpression
protected void formatLikeExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Like expression- Parameters:
c
- configuration
-
formatInExpression
protected void formatInExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for In expression- Parameters:
c
- configuration
-
formatNestedTable
protected void formatNestedTable(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for Nested table- Parameters:
c
- configuration
-
formatComment
protected void formatComment(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for comment- Parameters:
c
- configuration, cannot benull
-
formatPrimaryExpression
protected void formatPrimaryExpression(org.eclipse.xtext.formatting.impl.FormattingConfig c)
Common Rule formatting for PrimaryExpression- Parameters:
c
- configuration, cannot benull
-
formatQuerySchemaGroupingSets
protected void formatQuerySchemaGroupingSets(org.eclipse.xtext.formatting.impl.FormattingConfig c)
-
-