当前位置: 首页>>代码示例>>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;未经允许,请勿转载。