本文整理汇总了Java中org.eclipse.xtext.service.GrammarProvider.getGrammar方法的典型用法代码示例。如果您正苦于以下问题:Java GrammarProvider.getGrammar方法的具体用法?Java GrammarProvider.getGrammar怎么用?Java GrammarProvider.getGrammar使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.xtext.service.GrammarProvider
的用法示例。
在下文中一共展示了GrammarProvider.getGrammar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例2: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例3: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例4: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例5: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例6: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例7: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例8: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例9: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例10: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例11: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例12: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例13: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
Grammar grammar = grammarProvider.getGrammar(this);
while (grammar != null) {
if ("com.ms.qaTools.saturn.Kronus".equals(grammar.getName())) {
return grammar;
}
List<Grammar> grammars = grammar.getUsedGrammars();
if (!grammars.isEmpty()) {
grammar = grammars.iterator().next();
} else {
return null;
}
}
return grammar;
}
示例14: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的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;
}
示例15: internalFindGrammar
import org.eclipse.xtext.service.GrammarProvider; //导入方法依赖的package包/类
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
Grammar grammar = grammarProvider.getGrammar(this);
while (grammar != null) {
if ("org.eclipse.gemoc.gexpressions.xtext.GExpressions".equals(grammar.getName())) {
return grammar;
}
List<Grammar> grammars = grammar.getUsedGrammars();
if (!grammars.isEmpty()) {
grammar = grammars.iterator().next();
} else {
return null;
}
}
return grammar;
}