Search in sources :

Example 76 with Parameter

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

the class AbstractUnassignedTextTestLanguageSemanticSequencer 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 == UnassignedtextPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case UnassignedtextPackage.CASE_INSENSITIVE_KEYWORD_RULE:
                sequence_CaseInsensitiveKeywordRule(context, (CaseInsensitiveKeywordRule) semanticObject);
                return;
            case UnassignedtextPackage.COMMON_TERMINALS_RULE:
                sequence_CommonTerminalsRule(context, (CommonTerminalsRule) semanticObject);
                return;
            case UnassignedtextPackage.DATATYPE_RULE:
                sequence_DatatypeRule(context, (DatatypeRule) semanticObject);
                return;
            case UnassignedtextPackage.MULTI_RULE:
                sequence_MultiRule(context, (MultiRule) semanticObject);
                return;
            case UnassignedtextPackage.PLURAL_RULE:
                sequence_PluralRule(context, (PluralRule) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) PluralRule(org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.PluralRule) Action(org.eclipse.xtext.Action) MultiRule(org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.MultiRule) CommonTerminalsRule(org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.CommonTerminalsRule) Parameter(org.eclipse.xtext.Parameter) CaseInsensitiveKeywordRule(org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.CaseInsensitiveKeywordRule) DatatypeRule(org.eclipse.xtext.parsetree.unassignedtext.unassignedtext.DatatypeRule) EPackage(org.eclipse.emf.ecore.EPackage)

Example 77 with Parameter

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

the class FormatterTestLanguageSemanticSequencer 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 == FormattertestlanguagePackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case FormattertestlanguagePackage.ASSIGN:
                sequence_Assign(context, (Assign) semanticObject);
                return;
            case FormattertestlanguagePackage.DATATYPES:
                sequence_Datatypes(context, (Datatypes) semanticObject);
                return;
            case FormattertestlanguagePackage.DECL:
                sequence_Decl(context, (Decl) semanticObject);
                return;
            case FormattertestlanguagePackage.ENUMERATION:
                sequence_Enumeration(context, (Enumeration) semanticObject);
                return;
            case FormattertestlanguagePackage.FQN_OBJ:
                sequence_FqnObj(context, (FqnObj) semanticObject);
                return;
            case FormattertestlanguagePackage.FQN_REF:
                sequence_FqnRef(context, (FqnRef) semanticObject);
                return;
            case FormattertestlanguagePackage.METH:
                sequence_Meth(context, (Meth) semanticObject);
                return;
            case FormattertestlanguagePackage.PARAM:
                sequence_Param(context, (Param) semanticObject);
                return;
            case FormattertestlanguagePackage.SPACE:
                sequence_Space(context, (Space) semanticObject);
                return;
            case FormattertestlanguagePackage.SUPPRESSED_HIDDEN:
                sequence_SuppressedHidden(context, (SuppressedHidden) semanticObject);
                return;
            case FormattertestlanguagePackage.SUPPRESSED_HIDDEN_SUB_ID:
                sequence_SuppressedHiddenSubID(context, (SuppressedHiddenSubID) semanticObject);
                return;
            case FormattertestlanguagePackage.SUPPRESSED_HIDDEN_SUB_SUB:
                sequence_SuppressedHiddenSubSub(context, (SuppressedHiddenSubSub) semanticObject);
                return;
            case FormattertestlanguagePackage.TEST_INDENTATION:
                sequence_TestIndentation(context, (TestIndentation) semanticObject);
                return;
            case FormattertestlanguagePackage.TEST_LINEWRAP:
                sequence_TestLinewrap(context, (TestLinewrap) semanticObject);
                return;
            case FormattertestlanguagePackage.TEST_LINEWRAP_MIN_MAX:
                sequence_TestLinewrapMinMax(context, (TestLinewrapMinMax) semanticObject);
                return;
            case FormattertestlanguagePackage.WRAPPING_DATA_TYPE_TEST:
                sequence_WrappingDataTypeTest(context, (WrappingDataTypeTest) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : Space(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Space) ParserRule(org.eclipse.xtext.ParserRule) TestLinewrapMinMax(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrapMinMax) Action(org.eclipse.xtext.Action) Enumeration(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Enumeration) SuppressedHidden(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.SuppressedHidden) SuppressedHiddenSubID(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.SuppressedHiddenSubID) Meth(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Meth) TestIndentation(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestIndentation) Decl(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Decl) FqnObj(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FqnObj) SuppressedHiddenSubSub(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.SuppressedHiddenSubSub) FqnRef(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FqnRef) EPackage(org.eclipse.emf.ecore.EPackage) WrappingDataTypeTest(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.WrappingDataTypeTest) Param(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Param) TestLinewrap(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.TestLinewrap) Parameter(org.eclipse.xtext.Parameter) Assign(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Assign) Datatypes(org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Datatypes)

Example 78 with Parameter

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

the class Bug305397SemanticSequencer 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 == Bug305397Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug305397Package.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case Bug305397Package.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.parsetree.impl.bug305397.Element) Model(org.eclipse.xtext.parsetree.impl.bug305397.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 79 with Parameter

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

the class CommentAssociationTestLanguageSemanticSequencer 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 == CommentAssociationPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case CommentAssociationPackage.ELEMENT:
                if (rule == grammarAccess.getElementRule()) {
                    sequence_Element(context, (Element) semanticObject);
                    return;
                } else if (action == grammarAccess.getElementAccess().getElementChildAction_2_0()) {
                    sequence_Element_Element_2_0(context, (Element) semanticObject);
                    return;
                } else
                    break;
            case CommentAssociationPackage.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.parsetree.impl.commentAssociation.Element) Model(org.eclipse.xtext.parsetree.impl.commentAssociation.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Example 80 with Parameter

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

the class Bug299395TestLanguageSemanticSequencer 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 == Bug299395Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Bug299395Package.MODEL:
                sequence_Model(context, (Model) semanticObject);
                return;
            case Bug299395Package.SUB_MODEL:
                sequence_SubModel(context, (SubModel) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel) Model(org.eclipse.xtext.parsetree.reconstr.bug299395.Model) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage) SubModel(org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel)

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