Search in sources :

Example 96 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug299237TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Bug299237TestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug299237TestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.antlr.bug299237Test.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 97 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug406914TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Bug406914TestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug406914TestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.antlr.bug406914Test.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 98 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug443221TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Bug443221TestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug443221TestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Model(org.eclipse.xtext.parser.antlr.bug443221Test.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 99 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class AbstractIgnoreCaseLinkingTestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == IgnoreCaseLinkingTestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case IgnoreCaseLinkingTestPackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case IgnoreCaseLinkingTestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Element(org.eclipse.xtext.linking.ignoreCaseLinkingTest.Element) Model(org.eclipse.xtext.linking.ignoreCaseLinkingTest.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 100 with Parameter

use of org.eclipse.xtext.Parameter in project xtext-core by eclipse.

the class Bug313089TestLanguageSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Bug313089Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug313089Package.BAR:
                sequence_Bar(context, (Bar) semanticObject);
                return;
            case Bug313089Package.BAZ:
                sequence_Baz(context, (Baz) semanticObject);
                return;
            case Bug313089Package.FOO:
                sequence_Foo(context, (Foo) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) Bar(org.eclipse.xtext.linking.bug313089.Bar) Foo(org.eclipse.xtext.linking.bug313089.Foo) Parameter(org.eclipse.xtext.Parameter) Baz(org.eclipse.xtext.linking.bug313089.Baz) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

Parameter (org.eclipse.xtext.Parameter)146 ParserRule (org.eclipse.xtext.ParserRule)137 Action (org.eclipse.xtext.Action)127 EPackage (org.eclipse.emf.ecore.EPackage)123 NamedArgument (org.eclipse.xtext.NamedArgument)7 EClass (org.eclipse.emf.ecore.EClass)6 ISerializationContext (org.eclipse.xtext.serializer.ISerializationContext)6 AbstractElement (org.eclipse.xtext.AbstractElement)5 AbstractRule (org.eclipse.xtext.AbstractRule)5 RuleCall (org.eclipse.xtext.RuleCall)5 EObject (org.eclipse.emf.ecore.EObject)4 ParserRuleParameters (org.eclipse.xtext.parser.parameters.parametersTestLanguage.ParserRuleParameters)4 Scenario (org.eclipse.xtext.parser.parameters.parametersTestLanguage.Scenario)4 ImmutableSet (com.google.common.collect.ImmutableSet)3 Group (org.eclipse.xtext.Group)3 ConditionEvaluator (org.eclipse.xtext.xtext.ConditionEvaluator)3 Set (java.util.Set)2 Assignment (org.eclipse.xtext.Assignment)2 EnumRule (org.eclipse.xtext.EnumRule)2 Grammar (org.eclipse.xtext.Grammar)2