Java Code Examples for org.eclipse.xtext.service.GrammarProvider#getGrammar()
The following examples show how to use
org.eclipse.xtext.service.GrammarProvider#getGrammar() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: EncodingTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.parser.encoding.EncodingTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 2
Source File: IndentationAwareTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.parser.indentation.IndentationAwareTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 3
Source File: ReferringTestLanguageGrammarAccess.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ui.tests.refactoring.ReferringTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 4
Source File: TwoParametersTestLanguageGrammarAccess.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ui.tests.editor.contentassist.TwoParametersTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 5
Source File: DummyTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.dummy.DummyTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 6
Source File: DatatypeRuleTestLanguageGrammarAccess.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ui.tests.editor.contentassist.DatatypeRuleTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 7
Source File: GrammarAccessTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.generator.grammarAccess.GrammarAccessTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 8
Source File: MultiRuleEnumTestLanguageGrammarAccess.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.enumrules.MultiRuleEnumTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 9
Source File: RefactoringTestLanguage1GrammarAccess.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.common.types.xtext.ui.RefactoringTestLanguage1".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 10
Source File: Bug347012TestLanguageGrammarAccess.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ui.tests.editor.contentassist.Bug347012TestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 11
Source File: HiddenTerminalsTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.parser.terminalrules.HiddenTerminalsTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 12
Source File: EcoreReferenceTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.metamodelreferencing.tests.EcoreReferenceTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 13
Source File: Bug250313GrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.valueconverter.Bug250313".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 14
Source File: SimpleBeeLangTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.testlanguages.backtracking.SimpleBeeLangTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 15
Source File: RenameTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ide.tests.testlanguage.RenameTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 16
Source File: ExpressionGrammarAccess.java From dsl-devkit with Eclipse Public License 1.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("com.avaloq.tools.ddk.xtext.expression.Expression".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 17
Source File: Bug304681TestLanguageGrammarAccess.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.ui.tests.editor.contentassist.Bug304681TestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 18
Source File: EnumAndReferenceTestLanguageGrammarAccess.java From xtext-extras with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.enumrules.EnumAndReferenceTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 19
Source File: ImportUriTestLanguageGrammarAccess.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) { Grammar grammar = grammarProvider.getGrammar(this); while (grammar != null) { if ("org.eclipse.xtext.linking.ImportUriTestLanguage".equals(grammar.getName())) { return grammar; } List<Grammar> grammars = grammar.getUsedGrammars(); if (!grammars.isEmpty()) { grammar = grammars.iterator().next(); } else { return null; } } return grammar; }
Example 20
Source File: TypeExpressionsGrammarAccess.java From n4js with Eclipse Public License 1.0 | 5 votes |
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; }