use of org.eclipse.xtext.dummy.dummyLang.Element in project xtext-core by eclipse.
the class DummyTestLanguageSemanticSequencer 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 == DummyLangPackage.eINSTANCE)
switch(semanticObject.eClass().getClassifierID()) {
case DummyLangPackage.ELEMENT:
sequence_Element(context, (Element) semanticObject);
return;
case DummyLangPackage.MODEL:
sequence_Model(context, (Model) semanticObject);
return;
}
if (errorAcceptor != null)
errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
use of org.eclipse.xtext.dummy.dummyLang.Element in project xtext-core by eclipse.
the class MultiLineCommentDocumentationProviderTest method getComment.
public String getComment(String modelString, int index) throws Exception {
Model model = (Model) getModel(modelString);
assertNotNull(model);
assertNotNull(model.getElements());
assertTrue(index < model.getElements().size());
Element element = model.getElements().get(index);
assertNotNull(element);
MultiLineCommentDocumentationProvider mlcdp = getInjector().getInstance(MultiLineCommentDocumentationProvider.class);
return mlcdp.getDocumentation(element);
}