當前位置: 首頁>>代碼示例>>Java>>正文


Java FormattingConfig.setIndentation方法代碼示例

本文整理匯總了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());
}
 
開發者ID:occiware,項目名稱:OCCI-Studio,代碼行數:19,代碼來源:OCCIFormatter.java

示例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());
}
 
開發者ID:eclipse,項目名稱:xtext-extras,代碼行數:17,代碼來源:SimpleAntlrFormatter.java

示例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());
}
 
開發者ID:catedrasaes-umu,項目名稱:NoSQLDataEngineering,代碼行數:19,代碼來源:ODMParameterFormatter.java

示例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());
}
 
開發者ID:catedrasaes-umu,項目名稱:idl4emf,代碼行數:19,代碼來源:IDLFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:ApiDescriptionLanguageFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:ExpressionsFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:TaoFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:ChainFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:AttributionFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:KoanFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:ScriptFormatter.java

示例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());
}
 
開發者ID:jesusc,項目名稱:eclectic,代碼行數:19,代碼來源:StreamDescLanguageFormatter.java

示例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());
}
 
開發者ID:diverse-project,項目名稱:k3,代碼行數:19,代碼來源:CoreFormatter.java

示例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());
}
 
開發者ID:diverse-project,項目名稱:k3,代碼行數:19,代碼來源:InitFormatter.java

示例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());
}
 
開發者ID:diverse-project,項目名稱:k3,代碼行數:19,代碼來源:EvolFormatter.java


注:本文中的org.eclipse.xtext.formatting.impl.FormattingConfig.setIndentation方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。