protected void formatBrackets(final FormattingConfig c, final String left, final String right) { List<Pair<Keyword, Keyword>> _findKeywordPairs = this._kronusGrammarAccess.findKeywordPairs(left, right); for (final Pair<Keyword, Keyword> pair : _findKeywordPairs) { { FormattingConfig.NoSpaceLocator _setNoSpace = c.setNoSpace(); Keyword _first = pair.getFirst(); _setNoSpace.before(_first); FormattingConfig.NoSpaceLocator _setNoSpace_1 = c.setNoSpace(); Keyword _first_1 = pair.getFirst(); _setNoSpace_1.after(_first_1); FormattingConfig.NoSpaceLocator _setNoSpace_2 = c.setNoSpace(); Keyword _second = pair.getSecond(); _setNoSpace_2.before(_second); } } }
@Override protected void configureFormatting(FormattingConfig c) { org.eclipse.cmf.occi.core.xtext.services.OCCIGrammarAccess f = (org.eclipse.cmf.occi.core.xtext.services.OCCIGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
public void configure(FormattingConfig c, XbaseGrammarAccess ga) { xtypeFormatter.configure(c, ga.getXtypeGrammarAccess()); configureXUnaryOperation(c, ga.getXUnaryOperationAccess()); configureXPostfixOperation(c, ga.getXPostfixOperationAccess()); configureXMemberFeatureCall(c, ga.getXMemberFeatureCallAccess()); configureXClosure(c, ga.getXClosureAccess()); configureXShortClosure(c, ga.getXShortClosureAccess()); configureXParenthesizedExpression(c, ga.getXParenthesizedExpressionAccess()); configureXIfExpression(c, ga.getXIfExpressionAccess()); configureXSynchronizedExpression(c, ga.getXSynchronizedExpressionAccess()); configureXSwitchExpression(c, ga.getXSwitchExpressionAccess()); configureXCasePart(c, ga.getXCasePartAccess()); configureXForLoopExpression(c, ga.getXForLoopExpressionAccess()); configureXBasicForLoopExpression(c, ga.getXBasicForLoopExpressionAccess()); configureXWhileExpression(c, ga.getXWhileExpressionAccess()); configureXDoWhileExpression(c, ga.getXDoWhileExpressionAccess()); configureXBlockExpression(c, ga.getXBlockExpressionAccess()); configureXFeatureCall(c, ga.getXFeatureCallAccess()); configureXConstructorCall(c, ga.getXConstructorCallAccess()); configureXTypeLiteral(c, ga.getXTypeLiteralAccess()); configureXTryCatchFinallyExpression(c, ga.getXTryCatchFinallyExpressionAccess()); configureXCatchClause(c, ga.getXCatchClauseAccess()); }
@Override protected void configureFormatting(FormattingConfig c) { c.setLinewrap(2, 2, 2).before(getGrammarAccess().getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(getGrammarAccess().getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(getGrammarAccess().getML_COMMENTRule()); c.setSpace("\n\n").before(getGrammarAccess().getSL_COMMENTRule()); c.setIndentation(getGrammarAccess().getParenthesizedAccess().getOPENTerminalRuleCall_0(), getGrammarAccess().getParenthesizedAccess().getRightParenthesisKeyword_2()); c.setIndentation(getGrammarAccess().getRuleAccess().getColonKeyword_3(), getGrammarAccess().getRuleAccess().getSemicolonKeyword_5()); c.setLinewrap().after(getGrammarAccess().getAlternativesAccess().getVerticalLineKeyword_1_1_0()); c.setNoSpace().before(getGrammarAccess().getAtomAccess().getCardinalityAssignment_0_1_1()); c.setLinewrap().around(getGrammarAccess().getAlternativesRule()); c.setLinewrap().after(getGrammarAccess().getRuleAccess().getColonKeyword_3()); c.setLinewrap().before(getGrammarAccess().getRuleAccess().getSemicolonKeyword_5()); c.setLinewrap(2).after(getGrammarAccess().getRuleAccess().getSemicolonKeyword_5()); c.setLinewrap().between(getGrammarAccess().getML_COMMENTRule(), getGrammarAccess().getAntlrGrammarAccess().getGrammarKeyword_0()); }
@Override protected void configureFormatting(FormattingConfig c) { es.um.nosql.schemainference.dslparameter.services.ODMParameterGrammarAccess f = (es.um.nosql.schemainference.dslparameter.services.ODMParameterGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
/** * Configure XIssueExpressions formatting. * * @param c * the formatting configuration * @param elements * the accessible formattable parser elements */ public void configureXIssueExpression(final FormattingConfig c, final XIssueExpressionElements elements) { c.setSpace(" ").after(elements.getOnKeyword_3_0()); c.setNoSpace().around(elements.getNumberSignKeyword_3_1_0_0()); c.setNoSpace().around(elements.getNumberSignKeyword_3_1_1_1_0()); c.setNoSpace().around(elements.getLeftSquareBracketKeyword_3_2_0()); c.setNoSpace().before(elements.getRightSquareBracketKeyword_3_2_2()); c.setNoSpace().after(elements.getLeftParenthesisKeyword_5_1()); c.setNoSpace().before(elements.getCommaKeyword_5_3_0()); c.setNoSpace().before(elements.getRightParenthesisKeyword_5_4()); c.setNoSpace().after(elements.getLeftParenthesisKeyword_6_2()); c.setNoSpace().before(elements.getCommaKeyword_6_4_0()); c.setNoSpace().before(elements.getRightParenthesisKeyword_6_5()); }
/** {@inheritDoc} */ @Override protected void configureFormatting(final FormattingConfig config) { final ValidGrammarAccess grammarAccess = (ValidGrammarAccess) getGrammarAccess(); config.setAutoLinewrap(MAX_LINE_LENGTH); // Comments config.setLinewrap(0, 1, 2).before(grammarAccess.getSL_COMMENTRule()); config.setLinewrap(0, 1, 2).before(grammarAccess.getML_COMMENTRule()); config.setLinewrap(0, 1, 1).after(grammarAccess.getML_COMMENTRule()); configureCategoryFormatting(config, grammarAccess.getCategoryAccess()); configureNativeRuleFormatting(config, grammarAccess.getNativeRuleAccess()); configureNativeContextFormatting(config, grammarAccess.getNativeContextAccess()); configureQuickFixFormatting(config, grammarAccess.getQuickFixAccess()); configureImportFormatting(config, grammarAccess.getImportAccess()); }
/** * Entry point for Check Configuration formatting. * * @param c * the formatting configuration * @param g * the grammar access */ private void configure(final FormattingConfig c, final CheckCfgGrammarAccess g) { super.configure(c, g.getXbaseGrammarAccess()); // Comments c.setLinewrap(0, 1, 2).before(g.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(g.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(g.getML_COMMENTRule()); // AutoLineWrap c.setAutoLinewrap(LINE_WRAP_LENGTH); configureCheckConfiguration(c, g.getCheckConfigurationAccess()); configureLanguageValidatorConfiguration(c, g.getConfiguredLanguageValidatorAccess()); configureConfiguredCatalog(c, g.getConfiguredCatalogAccess()); configureConfiguredCheck(c, g.getConfiguredCheckAccess()); // configureConfiguredParameter(c, g.getConfiguredParameterAccess()); }
@Override protected void configureFormatting(FormattingConfig c) { // It's usually a good idea to activate the following three statements. // They will add and preserve newlines around comments //c.setLinewrap(0, 1, 2).before(((PlanGrammarAccess) getGrammarAccess()).getML_COMMENTRule()); //c.setLinewrap(0, 1, 1).after(((PlanGrammarAccess) getGrammarAccess()).getML_COMMENTRule()); //c.setLinewrap(0, 1, 1).after(((PlanGrammarAccess) getGrammarAccess()).getOPENCURLYRule()); c.setLinewrap().after( (EObject) ((PlanGrammarAccess) getGrammarAccess()).getENDLINERule()); c.setLinewrap().after( (EObject) ((PlanGrammarAccess) getGrammarAccess()).getOPENCURLYRule()); c.setIndentationIncrement().after(((PlanGrammarAccess) getGrammarAccess()).getOPENCURLYRule()); c.setLinewrap().before( (EObject) ((PlanGrammarAccess) getGrammarAccess()).getSL_COMMENTRule()); //c.setLinewrap().around( (EObject) ((PlanGrammarAccess) getGrammarAccess()).getML_COMMENTRule()); c.setIndentationDecrement().before(((PlanGrammarAccess) getGrammarAccess()).getCLOSEDCURLYRule()); c.setLinewrap(2).after(((PlanGrammarAccess) getGrammarAccess()).getCLOSEDCURLYRule()); }
private void formatDesigns(FormattingConfig config, PhdlGrammarAccess access) { config.setLinewrap(1, 2, 2).around(access.getDesignRule()); config.setLinewrap(1, 2, 2).around(access.getDesignElementRule()); DesignElements elements = access.getDesignAccess(); config.setLinewrap(1, 1, 2).after(elements.getLeftCurlyBracketKeyword_2()); config.setLinewrap(1).before(elements.getRightCurlyBracketKeyword_4()); config.setLinewrap(1, 2, 2).after(elements.getRightCurlyBracketKeyword_4()); config.setIndentationIncrement().after(elements.getLeftCurlyBracketKeyword_2()); config.setIndentationDecrement().before(elements.getRightCurlyBracketKeyword_4()); formatInstances(config, access); formatConnections(config, access); formatConcatenations(config, access); formatIndices(config, access); formatSlices(config, access); formatQualifiers(config, access); formatArrays(config, access); formatConnectionAssigns(config, access); }
private void formatInstances(FormattingConfig config, PhdlGrammarAccess access) { InstanceElements elements = access.getInstanceAccess(); config.setLinewrap(1, 1, 2).after(elements.getLeftCurlyBracketKeyword_0_5()); config.setLinewrap(1, 1, 2).after(elements.getLeftCurlyBracketKeyword_1_6()); config.setLinewrap(1).before(elements.getRightCurlyBracketKeyword_0_7()); config.setLinewrap(1).before(elements.getRightCurlyBracketKeyword_1_8()); config.setIndentationIncrement().after(elements.getLeftCurlyBracketKeyword_0_5()); config.setIndentationIncrement().after(elements.getLeftCurlyBracketKeyword_1_6()); config.setIndentationDecrement().before(elements.getRightCurlyBracketKeyword_0_7()); config.setIndentationDecrement().before(elements.getRightCurlyBracketKeyword_1_8()); config.setLinewrap(1, 1, 2).between(access.getInstanceElementRule(), access.getInstanceElementRule()); formatRefAttrs(config, access); // formatNewAttrs(config, access); formatPinAssigns(config, access); formatSubAttrs(config, access); formatPortAssigns(config, access); }
@Override protected void configureFormatting(FormattingConfig c) { org.csu.idl.xtext.services.IDLGrammarAccess f = (org.csu.idl.xtext.services.IDLGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.services.ApiDescriptionLanguageGrammarAccess f = (org.eclectic.services.ApiDescriptionLanguageGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.syntax.services.ExpressionsGrammarAccess f = (org.eclectic.frontend.syntax.services.ExpressionsGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.services.TaoGrammarAccess f = (org.eclectic.frontend.services.TaoGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.services.ChainGrammarAccess f = (org.eclectic.frontend.services.ChainGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.services.AttributionGrammarAccess f = (org.eclectic.frontend.services.AttributionGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.services.KoanGrammarAccess f = (org.eclectic.frontend.services.KoanGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.frontend.services.ScriptGrammarAccess f = (org.eclectic.frontend.services.ScriptGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.eclectic.streamdesc.services.StreamDescLanguageGrammarAccess f = (org.eclectic.streamdesc.services.StreamDescLanguageGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.kermeta.language.sample.cellularautomata.rules.services.CoreGrammarAccess f = (org.kermeta.language.sample.cellularautomata.rules.services.CoreGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.kermeta.language.sample.cellularautomata.rules.services.InitGrammarAccess f = (org.kermeta.language.sample.cellularautomata.rules.services.InitGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { org.kermeta.language.sample.cellularautomata.rules.services.EvolGrammarAccess f = (org.kermeta.language.sample.cellularautomata.rules.services.EvolGrammarAccess) getGrammarAccess(); for(Pair<Keyword, Keyword> pair: f.findKeywordPairs("{", "}")) { c.setIndentation(pair.getFirst(), pair.getSecond()); c.setLinewrap(1).after(pair.getFirst()); c.setLinewrap(1).before(pair.getSecond()); c.setLinewrap(1).after(pair.getSecond()); } for(Keyword comma: f.findKeywords(",")) { c.setNoLinewrap().before(comma); c.setNoSpace().before(comma); c.setLinewrap().after(comma); } c.setLinewrap(0, 1, 2).before(f.getSL_COMMENTRule()); c.setLinewrap(0, 1, 2).before(f.getML_COMMENTRule()); c.setLinewrap(0, 1, 1).after(f.getML_COMMENTRule()); }
@Override protected void configureFormatting(FormattingConfig c) { c.setNoSpace().around(grammarAccess.getConstRefAccess().getColonColonKeyword_1_1()); c.setNoSpace().around(grammarAccess.getElementRefAccess().getFullStopKeyword_2_0()); c.setNoSpace().around(grammarAccess.getPreAccess().getLeftParenthesisKeyword_2()); c.setNoSpace().around(grammarAccess.getPreAccess().getRightParenthesisKeyword_4()); c.setNoSpace().around(grammarAccess.getRandomElementAccess().getFullStopKeyword_2()); c.setNoSpace().around(grammarAccess.getRandomIntegerAccess().getFullStopKeyword_2()); c.setNoSpace().around(grammarAccess.getRandomRealAccess().getFullStopKeyword_2()); c.setNoSpace().around(grammarAccess.getSetAccess().getLeftCurlyBracketKeyword_1()); c.setNoSpace().around(grammarAccess.getSetAccess().getRightCurlyBracketKeyword_3()); c.setNoSpace().around(grammarAccess.getIntervalAccess().getLeftClosedAssignment_1_0()); c.setNoSpace().around(grammarAccess.getIntervalAccess().getLeftParenthesisKeyword_1_1()); c.setNoSpace().around(grammarAccess.getIntervalAccess().getRightClosedAssignment_5_0()); c.setNoSpace().around(grammarAccess.getIntervalAccess().getRightParenthesisKeyword_5_1()); c.setNoSpace().before(grammarAccess.getIntervalAccess().getCommaKeyword_3()); c.setNoSpace().around(grammarAccess.getNegativeAccess().getHyphenMinusKeyword_1()); }
@Override protected void configureFormatting(FormattingConfig c) { // It's usually a good idea to activate the following three statements. // They will add and preserve newlines around comments // c.setLinewrap(0, 1, 2).before(getGrammarAccess().getSL_COMMENTRule()); // c.setLinewrap(0, 1, 2).before(getGrammarAccess().getML_COMMENTRule()); // c.setLinewrap(0, 1, 1).after(getGrammarAccess().getML_COMMENTRule()); }
public void configureXMemberFeatureCall(FormattingConfig c, XMemberFeatureCallElements ele) { c.setNoSpace().around(ele.getFullStopKeyword_1_0_0_0_1_0()); c.setNoSpace().around(ele.getExplicitStaticColonColonKeyword_1_0_0_0_1_1_0()); c.setNoSpace().around(ele.getFullStopKeyword_1_1_0_0_1_0()); c.setNoSpace().around(ele.getNullSafeAssignment_1_1_0_0_1_1()); c.setNoSpace().around(ele.getExplicitStaticColonColonKeyword_1_1_0_0_1_2_0()); c.setNoSpace().around(ele.getLessThanSignKeyword_1_1_1_0()); c.setNoSpace().before(ele.getCommaKeyword_1_1_1_2_0()); c.setNoSpace().around(ele.getGreaterThanSignKeyword_1_1_1_3()); c.setNoSpace().around(ele.getExplicitOperationCallAssignment_1_1_3_0()); c.setNoSpace().before(ele.getCommaKeyword_1_1_3_1_1_1_0()); c.setNoSpace().before(ele.getRightParenthesisKeyword_1_1_3_2()); }
public void configureXIfExpression(FormattingConfig c, XIfExpressionElements ele) { c.setNoSpace().around(ele.getLeftParenthesisKeyword_2()); c.setNoSpace().before(ele.getRightParenthesisKeyword_4()); c.setLinewrap().around(ele.getThenAssignment_5()); c.setIndentationIncrement().before(ele.getThenAssignment_5()); c.setIndentationDecrement().after(ele.getThenAssignment_5()); c.setLinewrap().around(ele.getElseAssignment_6_1()); c.setIndentationIncrement().before(ele.getElseAssignment_6_1()); c.setIndentationDecrement().after(ele.getElseAssignment_6_1()); }
public void configureXSynchronizedExpression(FormattingConfig c, XSynchronizedExpressionElements ele) { c.setNoSpace().around(ele.getLeftParenthesisKeyword_0_0_2()); c.setNoSpace().before(ele.getRightParenthesisKeyword_2()); c.setLinewrap().around(ele.getExpressionAssignment_3()); c.setIndentationIncrement().before(ele.getExpressionAssignment_3()); c.setIndentationDecrement().after(ele.getExpressionAssignment_3()); }
public void configureXSwitchExpression(FormattingConfig c, XSwitchExpressionElements ele) { c.setNoSpace().around(ele.getColonKeyword_2_1_0_0_1()); c.setNoSpace().around(ele.getColonKeyword_2_0_0_0_2()); c.setNoLinewrap().before(ele.getLeftCurlyBracketKeyword_3()); c.setLinewrap().after(ele.getLeftCurlyBracketKeyword_3()); c.setIndentationIncrement().after(ele.getLeftCurlyBracketKeyword_3()); c.setNoSpace().before(ele.getColonKeyword_5_1()); c.setIndentationIncrement().before(ele.getDefaultAssignment_5_2()); c.setLinewrap().around(ele.getDefaultAssignment_5_2()); c.setIndentationDecrement().after(ele.getDefaultAssignment_5_2()); c.setLinewrap().before(ele.getRightCurlyBracketKeyword_6()); c.setIndentationDecrement().before(ele.getRightCurlyBracketKeyword_6()); }
public void configureXCasePart(FormattingConfig c, XCasePartElements ele) { c.setNoSpace().before(ele.getColonKeyword_3_0_0()); c.setNoSpace().before(ele.getFallThroughCommaKeyword_3_1_0()); c.setIndentationIncrement().before(ele.getThenAssignment_3_0_1()); c.setLinewrap().around(ele.getThenAssignment_3_0_1()); c.setIndentationDecrement().after(ele.getThenAssignment_3_0_1()); }
public void configureXForLoopExpression(FormattingConfig c, XForLoopExpressionElements ele) { c.setNoSpace().around(ele.getLeftParenthesisKeyword_0_0_2()); c.setNoSpace().around(ele.getColonKeyword_0_0_4()); c.setNoSpace().around(ele.getRightParenthesisKeyword_2()); c.setIndentationIncrement().before(ele.getEachExpressionAssignment_3()); c.setLinewrap().around(ele.getEachExpressionAssignment_3()); c.setIndentationDecrement().after(ele.getEachExpressionAssignment_3()); }
public void configureXBasicForLoopExpression(FormattingConfig c, XBasicForLoopExpressionElements ele) { c.setNoSpace().around(ele.getLeftParenthesisKeyword_2()); c.setNoSpace().before(ele.getCommaKeyword_3_1_0()); c.setNoSpace().before(ele.getSemicolonKeyword_4()); c.setNoSpace().before(ele.getCommaKeyword_7_1_0()); c.setNoSpace().before(ele.getSemicolonKeyword_6()); c.setNoSpace().around(ele.getRightParenthesisKeyword_8()); c.setIndentationIncrement().before(ele.getEachExpressionAssignment_9()); c.setLinewrap().around(ele.getEachExpressionAssignment_9()); c.setIndentationDecrement().after(ele.getEachExpressionAssignment_9()); }
public void configureXWhileExpression(FormattingConfig c, XWhileExpressionElements ele) { c.setNoSpace().around(ele.getLeftParenthesisKeyword_2()); c.setNoSpace().before(ele.getRightParenthesisKeyword_4()); c.setIndentationIncrement().before(ele.getBodyAssignment_5()); c.setLinewrap().around(ele.getBodyAssignment_5()); c.setIndentationDecrement().after(ele.getBodyAssignment_5()); }
public void configureXBlockExpression(FormattingConfig c, XBlockExpressionElements ele) { c.setLinewrap().after(ele.getLeftCurlyBracketKeyword_1()); c.setIndentationIncrement().after(ele.getLeftCurlyBracketKeyword_1()); c.setLinewrap().after(ele.getExpressionsAssignment_2_0()); c.setNoSpace().before(ele.getSemicolonKeyword_2_1()); c.setLinewrap().after(ele.getSemicolonKeyword_2_1()); c.setLinewrap().before(ele.getRightCurlyBracketKeyword_3()); c.setIndentationDecrement().before(ele.getRightCurlyBracketKeyword_3()); }
public void configureXDoWhileExpression(FormattingConfig c, XDoWhileExpressionElements ele) { c.setLinewrap().after(ele.getDoKeyword_1()); c.setIndentationIncrement().after(ele.getDoKeyword_1()); c.setLinewrap().before(ele.getDoKeyword_1()); c.setIndentationDecrement().before(ele.getWhileKeyword_3()); c.setNoSpace().around(ele.getLeftParenthesisKeyword_4()); c.setNoSpace().before(ele.getRightParenthesisKeyword_6()); }
public void configureXFeatureCall(FormattingConfig c, XFeatureCallElements ele) { c.setNoSpace().around(ele.getLessThanSignKeyword_1_0()); c.setNoSpace().before(ele.getCommaKeyword_1_2_0()); c.setNoSpace().around(ele.getGreaterThanSignKeyword_1_3()); c.setNoSpace().around(ele.getExplicitOperationCallAssignment_3_0()); c.setNoSpace().before(ele.getCommaKeyword_3_1_1_1_0()); c.setNoSpace().before(ele.getRightParenthesisKeyword_3_2()); }
public void configureXConstructorCall(FormattingConfig c, XConstructorCallElements ele) { c.setNoSpace().around(ele.getLessThanSignKeyword_3_0()); c.setNoSpace().before(ele.getCommaKeyword_3_2_0()); c.setNoSpace().around(ele.getGreaterThanSignKeyword_3_3()); c.setNoSpace().around(ele.getExplicitConstructorCallLeftParenthesisKeyword_4_0_0()); c.setNoSpace().before(ele.getCommaKeyword_4_1_1_1_0()); c.setNoSpace().before(ele.getRightParenthesisKeyword_4_2()); }