本文整理匯總了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());
}