本文整理汇总了Java中org.eclipse.xtext.formatting.impl.FormattingConfig.setIndentation方法的典型用法代码示例。如果您正苦于以下问题:Java FormattingConfig.setIndentation方法的具体用法?Java FormattingConfig.setIndentation怎么用?Java FormattingConfig.setIndentation使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.formatting.impl.FormattingConfig
的用法示例。
在下文中一共展示了FormattingConfig.setIndentation方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例2: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例3: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例4: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例5: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例6: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例7: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例8: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例9: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例10: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例11: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例12: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例13: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例14: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}
示例15: configureFormatting
import org.eclipse.xtext.formatting.impl.FormattingConfig; //导入方法依赖的package包/类
@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());
}