当前位置: 首页>>代码示例>>Java>>正文


Java Grammar.getUsedGrammars方法代码示例

本文整理汇总了Java中org.eclipse.xtext.Grammar.getUsedGrammars方法的典型用法代码示例。如果您正苦于以下问题:Java Grammar.getUsedGrammars方法的具体用法?Java Grammar.getUsedGrammars怎么用?Java Grammar.getUsedGrammars使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.xtext.Grammar的用法示例。


在下文中一共展示了Grammar.getUsedGrammars方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: collectAbstractElements

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
@Override
public void collectAbstractElements(Grammar grammar, EStructuralFeature feature,
		IFollowElementAcceptor followElementAcceptor) {
	for (Grammar superGrammar : grammar.getUsedGrammars()) {
		collectAbstractElements(superGrammar, feature, followElementAcceptor);
	}
	EClass declarator = feature.getEContainingClass();
	for (ParserRule rule : GrammarUtil.allParserRules(grammar)) {
		for (Assignment assignment : GrammarUtil.containedAssignments(rule)) {
			if (assignment.getFeature().equals(feature.getName())) {
				EClassifier classifier = GrammarUtil.findCurrentType(assignment);
				EClassifier compType = EcoreUtil2.getCompatibleType(declarator, classifier);
				if (compType == declarator) {
					followElementAcceptor.accept(assignment);
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:20,代码来源:PatchedFollowElementComputer.java

示例2: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.cmf.occi.core.xtext.OCCI".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:16,代码来源:OCCIGrammarAccess.java

示例3: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("de.baernreuther.dsls.Pkmntcgo".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:rehne93,项目名称:pokemon-tcgo-deck-generator,代码行数:16,代码来源:PkmntcgoGrammarAccess.java

示例4: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.ts.Types".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:TypesGrammarAccess.java

示例5: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.ts.TypeExpressions".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:TypeExpressionsGrammarAccess.java

示例6: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.common.unicode.Unicode".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:UnicodeGrammarAccess.java

示例7: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.regex.RegularExpression".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:RegularExpressionGrammarAccess.java

示例8: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.N4JS".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:N4JSGrammarAccess.java

示例9: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.n4js.n4mf.N4MF".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:16,代码来源:N4MFGrammarAccess.java

示例10: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.xtext.example.mydsl.MyDsl".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:fatalerrortan,项目名称:Xtext_Xtend_HTML_Generator,代码行数:16,代码来源:MyDslGrammarAccess.java

示例11: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("com.hribol.bromium.dsl.Bromium".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:hristo-vrigazov,项目名称:bromium,代码行数:16,代码来源:BromiumGrammarAccess.java

示例12: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("gw4e.eclipse.dsl.DSLPolicies".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:16,代码来源:DSLPoliciesGrammarAccess.java

示例13: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("com.wamas.ide.launching.LcDsl".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:mduft,项目名称:lcdsl,代码行数:16,代码来源:LcDslGrammarAccess.java

示例14: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.gemoc.Dsl".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:16,代码来源:DslGrammarAccess.java

示例15: internalFindGrammar

import org.eclipse.xtext.Grammar; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.xtext.dsl.restaurante.Restaurante".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
开发者ID:vicegd,项目名称:org.xtext.dsl.restaurante,代码行数:16,代码来源:RestauranteGrammarAccess.java


注:本文中的org.eclipse.xtext.Grammar.getUsedGrammars方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。