org.eclipse.xtext.service.GrammarProvider Java Examples

The following examples show how to use org.eclipse.xtext.service.GrammarProvider. 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: FragmentTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public FragmentTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pParserRuleFragments = new ParserRuleFragmentsElements();
	this.pPRFNamed = new PRFNamedElements();
	this.pPRFNamedRecursive = new PRFNamedRecursiveElements();
	this.pPRFNamedRecursiveFragment = new PRFNamedRecursiveFragmentElements();
	this.pPRFNamedRefFirst = new PRFNamedRefFirstElements();
	this.pPRFNamedWithAction = new PRFNamedWithActionElements();
	this.pPRFNamedWithFQN = new PRFNamedWithFQNElements();
	this.pPRFWithPredicate = new PRFWithPredicateElements();
	this.pFQN = new FQNElements();
	this.pFQN2 = new FQN2Elements();
	this.pSuffix = new SuffixElements();
	this.pSuffix2 = new Suffix2Elements();
	this.pPRFNamedFragment = new PRFNamedFragmentElements();
	this.pPRFNamedRef = new PRFNamedRefElements();
	this.pRecursiveFromFragment = new RecursiveFromFragmentElements();
	this.pNamedInParentheses = new NamedInParenthesesElements();
	this.pRecursiveFragment = new RecursiveFragmentElements();
	this.pNamedByAction = new NamedByActionElements();
}
 
Example #2
Source File: Bug288760TestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public Bug288760TestLanguageGrammarAccess(GrammarProvider grammarProvider) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.pWorkflowElement = new WorkflowElementElements();
	this.pAttribute = new AttributeElements();
	this.tML_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.ML_COMMENT");
	this.tSTART_TAG = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.START_TAG");
	this.tLT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.LT");
	this.tGT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.GT");
	this.tEQ = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.EQ");
	this.tEND_TAG_SHORT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.END_TAG_SHORT");
	this.tEND_TAG_START = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.END_TAG_START");
	this.tEND_TAG = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.END_TAG");
	this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.ID");
	this.tINT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.INT");
	this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.STRING");
	this.tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.WS");
	this.tANY_OTHER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.editor.contentassist.Bug288760TestLanguage.ANY_OTHER");
}
 
Example #3
Source File: Bug304681TestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public Bug304681TestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pPackageDefinition = new PackageDefinitionElements();
	this.pObject = new ObjectElements();
	this.pFeature = new FeatureElements();
	this.pAttribute = new AttributeElements();
	this.pReference = new ReferenceElements();
	this.pPackageDefinition2 = new PackageDefinition2Elements();
	this.pObject2 = new Object2Elements();
	this.pFeature2 = new Feature2Elements();
	this.pAttribute2 = new Attribute2Elements();
	this.pReference2 = new Reference2Elements();
	this.pConstraintDefinition = new ConstraintDefinitionElements();
}
 
Example #4
Source File: UnorderedGroupsTestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public UnorderedGroupsTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pSimpleModel = new SimpleModelElements();
	this.pMandatoryModel = new MandatoryModelElements();
	this.pLoopedModel = new LoopedModelElements();
	this.pGroupLoopedModel = new GroupLoopedModelElements();
	this.pLoopedAlternativeModel = new LoopedAlternativeModelElements();
	this.pBug304681Model = new Bug304681ModelElements();
	this.pBug304681Feature = new Bug304681FeatureElements();
	this.pBug304681Attribute = new Bug304681AttributeElements();
	this.pBug304681Reference = new Bug304681ReferenceElements();
}
 
Example #5
Source File: BacktrackingLexerTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public BacktrackingLexerTestLanguageGrammarAccess(GrammarProvider grammarProvider) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.pModel = new ModelElements();
	this.pAb = new AbElements();
	this.pXb = new XbElements();
	this.tCharA = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.CharA");
	this.tCharb = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.Charb");
	this.tCharX = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.CharX");
	this.tYc = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.Yc");
	this.tCharY = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.CharY");
	this.tCharC = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.CharC");
	this.eEnumName = new EnumNameElements();
	this.tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.WS");
	this.tSL_COMMENT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.lexer.BacktrackingLexerTestLanguage.SL_COMMENT");
}
 
Example #6
Source File: GH1462TestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public GH1462TestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pRoot = new RootElements();
	this.pRule1 = new Rule1Elements();
	this.pRule2 = new Rule2Elements();
	this.pRule3 = new Rule3Elements();
	this.pRule4 = new Rule4Elements();
	this.pRule5 = new Rule5Elements();
	this.pRule6 = new Rule6Elements();
	this.pRule7 = new Rule7Elements();
	this.pRule8 = new Rule8Elements();
	this.pRule9 = new Rule9Elements();
	this.pRule10 = new Rule10Elements();
	this.pRule11 = new Rule11Elements();
	this.pRule12 = new Rule12Elements();
	this.pInteger = new IntegerElements();
	this.pMaybeEmpty = new MaybeEmptyElements();
	this.pWrapper = new WrapperElements();
}
 
Example #7
Source File: ConcreteTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public ConcreteTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		AbstractTestLanguageGrammarAccess gaAbstractTestLanguage,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaAbstractTestLanguage = gaAbstractTestLanguage;
	this.gaTerminals = gaTerminals;
	this.pRootRule = new RootRuleElements();
	this.pConcreteParserRule = new ConcreteParserRuleElements();
	this.pOverridableParserRule = new OverridableParserRuleElements();
	this.pCallOverridenParserRule = new CallOverridenParserRuleElements();
	this.pOverridableParserRule2 = new OverridableParserRule2Elements();
	this.pExtendableParserRule = new ExtendableParserRuleElements();
	this.pSubrule1 = new Subrule1Elements();
	this.pSubrule2 = new Subrule2Elements();
	this.pSubrule3 = new Subrule3Elements();
	this.pCallExtendedParserRule = new CallExtendedParserRuleElements();
	this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.grammarinheritance.ConcreteTestLanguage.ID");
}
 
Example #8
Source File: XmlGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public XmlGrammarAccess(GrammarProvider grammarProvider) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.pXmlDocument = new XmlDocumentElements();
	this.pContent = new ContentElements();
	this.pTag = new TagElements();
	this.pAttribute = new AttributeElements();
	this.tTAG_START_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.TAG_START_OPEN");
	this.tTAG_END_OPEN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.TAG_END_OPEN");
	this.tTAG_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.TAG_CLOSE");
	this.tTAG_EMPTY_CLOSE = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.TAG_EMPTY_CLOSE");
	this.tATTR_EQ = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.ATTR_EQ");
	this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.ID");
	this.tSTRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.STRING");
	this.tWS = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.WS");
	this.tPCDATA = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.ui.tests.xmleditor.Xml.PCDATA");
}
 
Example #9
Source File: ArithmeticsGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public ArithmeticsGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModule = new ModuleElements();
	this.pImport = new ImportElements();
	this.pStatement = new StatementElements();
	this.pDefinition = new DefinitionElements();
	this.pDeclaredParameter = new DeclaredParameterElements();
	this.pAbstractDefinition = new AbstractDefinitionElements();
	this.pEvaluation = new EvaluationElements();
	this.pExpression = new ExpressionElements();
	this.pAddition = new AdditionElements();
	this.pMultiplication = new MultiplicationElements();
	this.pPrimaryExpression = new PrimaryExpressionElements();
	this.tNUMBER = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.example.arithmetics.Arithmetics.NUMBER");
	this.tINT = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.example.arithmetics.Arithmetics.INT");
}
 
Example #10
Source File: StatemachineGrammarAccess.java    From xtext-web with Eclipse Public License 2.0 6 votes vote down vote up
@Inject
public StatemachineGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pStatemachine = new StatemachineElements();
	this.pSignal = new SignalElements();
	this.pInputSignal = new InputSignalElements();
	this.pOutputSignal = new OutputSignalElements();
	this.pState = new StateElements();
	this.pTransition = new TransitionElements();
	this.pCondition = new ConditionElements();
	this.pEvent = new EventElements();
	this.pCommand = new CommandElements();
	this.pQualifiedName = new QualifiedNameElements();
	this.tBOOLEAN = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.web.example.statemachine.Statemachine.BOOLEAN");
}
 
Example #11
Source File: MetamodelRefTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.metamodelreferencing.tests.MetamodelRefTestLanguage".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: BeeLangTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.testlanguages.backtracking.BeeLangTestLanguage".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: ConditionModelGrammarAccess.java    From bonita-studio with GNU General Public License v2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.bonitasoft.studio.condition.ConditionModel".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: Bug332217TestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.ui.tests.editor.contentassist.Bug332217TestLanguage".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: AbstractTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public AbstractTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pInheritedParserRule = new InheritedParserRuleElements();
	this.pAbstractCallOverridenParserRule = new AbstractCallOverridenParserRuleElements();
	this.pOverridableParserRule = new OverridableParserRuleElements();
	this.pOverridableParserRule2 = new OverridableParserRule2Elements();
	this.pAbstractCallExtendedParserRule = new AbstractCallExtendedParserRuleElements();
	this.pExtendableParserRule = new ExtendableParserRuleElements();
	this.tREAL = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.grammarinheritance.AbstractTestLanguage.REAL");
	this.tID = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.grammarinheritance.AbstractTestLanguage.ID");
}
 
Example #16
Source File: UnicodeTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public UnicodeTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pAbstractString = new AbstractStringElements();
	this.pGString = new GStringElements();
	this.pQuotedString = new QuotedStringElements();
	this.tGERMAN_STRING = (TerminalRule) GrammarUtil.findRuleForName(getGrammar(), "org.eclipse.xtext.parser.terminalrules.UnicodeTestLanguage.GERMAN_STRING");
}
 
Example #17
Source File: ReferenceGrammarUiTestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public ReferenceGrammarUiTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pSpielplatz = new SpielplatzElements();
	this.pPerson = new PersonElements();
	this.pKind = new KindElements();
	this.pErwachsener = new ErwachsenerElements();
	this.pSpielzeug = new SpielzeugElements();
	this.pFarbe = new FarbeElements();
	this.pFamilie = new FamilieElements();
}
 
Example #18
Source File: ExpressionGrammarAccess.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
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 #19
Source File: PartialSerializationTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.ide.tests.testlanguage.PartialSerializationTestLanguage".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: XmlGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.ui.tests.xmleditor.Xml".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
Example #21
Source File: Bug296889ExTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public Bug296889ExTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pExpression = new ExpressionElements();
	this.pPreop = new PreopElements();
	this.pPostop = new PostopElements();
	this.pVariable = new VariableElements();
	this.pDataTypeExpression = new DataTypeExpressionElements();
	this.pDataTypePreop = new DataTypePreopElements();
	this.pDataTypePostop = new DataTypePostopElements();
	this.pDataTypeVariable = new DataTypeVariableElements();
}
 
Example #22
Source File: LangATestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public LangATestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pMain = new MainElements();
	this.pImport = new ImportElements();
	this.pType = new TypeElements();
}
 
Example #23
Source File: MyDslGrammarAccess.java    From M2Doc with Eclipse Public License 1.0 5 votes vote down vote up
@Inject
public MyDslGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pGreeting = new GreetingElements();
}
 
Example #24
Source File: ValidGrammarAccess.java    From dsl-devkit with Eclipse Public License 1.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("com.avaloq.tools.ddk.xtext.valid.Valid".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
Example #25
Source File: EntitiesGrammarAccess.java    From xtext-web with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public EntitiesGrammarAccess(GrammarProvider grammarProvider,
		XbaseGrammarAccess gaXbase,
		XtypeGrammarAccess gaXtype) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaXbase = gaXbase;
	this.gaXtype = gaXtype;
	this.pEntities = new EntitiesElements();
	this.pAbstractElement = new AbstractElementElements();
	this.pPackageDeclaration = new PackageDeclarationElements();
	this.pEntity = new EntityElements();
	this.pFeature = new FeatureElements();
	this.pProperty = new PropertyElements();
	this.pOperation = new OperationElements();
}
 
Example #26
Source File: DomainModelTestLanguageGrammarAccess.java    From xtext-eclipse with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.ui.tests.editor.contentassist.DomainModelTestLanguage".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
Example #27
Source File: AssignmentsTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public AssignmentsTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pSingleValue = new SingleValueElements();
	this.pMultiValue = new MultiValueElements();
	this.pSingleDatatype = new SingleDatatypeElements();
	this.pMultiDatatype = new MultiDatatypeElements();
	this.pIdDatatype = new IdDatatypeElements();
	this.pStringDatatype = new StringDatatypeElements();
}
 
Example #28
Source File: DatatypeRulesTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.parser.datatyperules.DatatypeRulesTestLanguage".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}
 
Example #29
Source File: DummyTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
@Inject
public DummyTestLanguageGrammarAccess(GrammarProvider grammarProvider,
		TerminalsGrammarAccess gaTerminals) {
	this.grammar = internalFindGrammar(grammarProvider);
	this.gaTerminals = gaTerminals;
	this.pModel = new ModelElements();
	this.pElement = new ElementElements();
}
 
Example #30
Source File: AbstractIgnoreCaseLinkingTestLanguageGrammarAccess.java    From xtext-core with Eclipse Public License 2.0 5 votes vote down vote up
protected Grammar internalFindGrammar(GrammarProvider grammarProvider) {
	Grammar grammar = grammarProvider.getGrammar(this);
	while (grammar != null) {
		if ("org.eclipse.xtext.linking.AbstractIgnoreCaseLinkingTestLanguage".equals(grammar.getName())) {
			return grammar;
		}
		List<Grammar> grammars = grammar.getUsedGrammars();
		if (!grammars.isEmpty()) {
			grammar = grammars.iterator().next();
		} else {
			return null;
		}
	}
	return grammar;
}