Search in sources :

Example 71 with Parameter

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

the class HiddenTokenSequencerTestLanguageSemanticSequencer 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 == HiddentokensequencertestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case HiddentokensequencertestPackage.DOMAIN_MODEL:
                sequence_DomainModel(context, (DomainModel) semanticObject);
                return;
            case HiddentokensequencertestPackage.ENTITY:
                sequence_Entity(context, (Entity) semanticObject);
                return;
            case HiddentokensequencertestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Entity(org.eclipse.xtext.serializer.hiddentokensequencertest.Entity) Action(org.eclipse.xtext.Action) DomainModel(org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel) Model(org.eclipse.xtext.serializer.hiddentokensequencertest.Model) DomainModel(org.eclipse.xtext.serializer.hiddentokensequencertest.DomainModel) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 72 with Parameter

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

the class TransientValuesTestSemanticSequencer 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 == TransientvaluestestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case TransientvaluestestPackage.TEST_LIST:
                sequence_TestList(context, (TestList) semanticObject);
                return;
            case TransientvaluestestPackage.TEST_OPTIONAL:
                sequence_TestOptional(context, (TestOptional) semanticObject);
                return;
            case TransientvaluestestPackage.TEST_REQUIRED:
                sequence_TestRequired(context, (TestRequired) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) TestRequired(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestRequired) Action(org.eclipse.xtext.Action) Parameter(org.eclipse.xtext.Parameter) TestOptional(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestOptional) TestList(org.eclipse.xtext.parsetree.transientvalues.transientvaluestest.TestList) EPackage(org.eclipse.emf.ecore.EPackage)

Example 73 with Parameter

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

the class EObjectAtOffsetTestLanguageSemanticSequencer 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 == EObjectAtOffsetTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case EObjectAtOffsetTestLanguagePackage.BAR:
                if (rule == grammarAccess.getAbstractBarRule()) {
                    sequence_AbstractBar_Bar(context, (Bar) semanticObject);
                    return;
                } else if (action == grammarAccess.getAbstractBarAccess().getFooBarBarAction_3_0() || rule == grammarAccess.getBarRule()) {
                    sequence_Bar(context, (Bar) semanticObject);
                    return;
                } else
                    break;
            case EObjectAtOffsetTestLanguagePackage.FOO:
                sequence_Foo(context, (Foo) semanticObject);
                return;
            case EObjectAtOffsetTestLanguagePackage.FOO_BAR:
                sequence_AbstractBar(context, (FooBar) semanticObject);
                return;
            case EObjectAtOffsetTestLanguagePackage.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) FooBar(org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.FooBar) Bar(org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.Bar) Foo(org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.Foo) Model(org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage) FooBar(org.eclipse.xtext.resource.eObjectAtOffsetTestLanguage.FooBar)

Example 74 with Parameter

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

the class LiveContainerBuilderIntegerationTestLanguageSemanticSequencer 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 == LiveContainerBuilderIntegerationTestLanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case LiveContainerBuilderIntegerationTestLanguagePackage.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.resource.liveContainerBuilderIntegerationTestLanguage.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 75 with Parameter

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

the class LocationProviderTestLanguageSemanticSequencer 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 == LocationprovidertestPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case LocationprovidertestPackage.BUS:
                if (rule == grammarAccess.getBusRule()) {
                    sequence_Bus(context, (Bus) semanticObject);
                    return;
                } else if (rule == grammarAccess.getComponentRule()) {
                    sequence_Bus_Component(context, (Bus) semanticObject);
                    return;
                } else
                    break;
            case LocationprovidertestPackage.DATA:
                sequence_Data(context, (Data) semanticObject);
                return;
            case LocationprovidertestPackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case LocationprovidertestPackage.MODE:
                sequence_Mode(context, (Mode) semanticObject);
                return;
            case LocationprovidertestPackage.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case LocationprovidertestPackage.PORT:
                sequence_Port(context, (Port) semanticObject);
                return;
            case LocationprovidertestPackage.PROCESSOR:
                if (rule == grammarAccess.getComponentRule()) {
                    sequence_Component_Processor(context, (Processor) semanticObject);
                    return;
                } else if (rule == grammarAccess.getProcessorRule()) {
                    sequence_Processor(context, (Processor) semanticObject);
                    return;
                } else
                    break;
            case LocationprovidertestPackage.TRANSITION:
                sequence_Transition(context, (Transition) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Bus(org.eclipse.xtext.resource.locationprovidertest.Bus) Action(org.eclipse.xtext.Action) Processor(org.eclipse.xtext.resource.locationprovidertest.Processor) Element(org.eclipse.xtext.resource.locationprovidertest.Element) Mode(org.eclipse.xtext.resource.locationprovidertest.Mode) Port(org.eclipse.xtext.resource.locationprovidertest.Port) Data(org.eclipse.xtext.resource.locationprovidertest.Data) EPackage(org.eclipse.emf.ecore.EPackage) Model(org.eclipse.xtext.resource.locationprovidertest.Model) Transition(org.eclipse.xtext.resource.locationprovidertest.Transition) Parameter(org.eclipse.xtext.Parameter)

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