Search in sources :

Example 1 with FoldingModel

use of org.eclipse.xtext.ui.tests.folding.FoldingModel in project xtext-eclipse by eclipse.

the class FoldingTestLanguageSemanticSequencer 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 == FoldingPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case FoldingPackage.ELEMENT:
                sequence_Element(context, (Element) semanticObject);
                return;
            case FoldingPackage.FOLDING_MODEL:
                sequence_FoldingModel(context, (FoldingModel) 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.ui.tests.folding.Element) FoldingModel(org.eclipse.xtext.ui.tests.folding.FoldingModel) Parameter(org.eclipse.xtext.Parameter) EPackage(org.eclipse.emf.ecore.EPackage)

Aggregations

EPackage (org.eclipse.emf.ecore.EPackage)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 Element (org.eclipse.xtext.ui.tests.folding.Element)1 FoldingModel (org.eclipse.xtext.ui.tests.folding.FoldingModel)1