use of org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel in project xtext-core by eclipse.
the class Bug299395Test method testSerialization_07.
@Test
public void testSerialization_07() {
Model model = Bug299395Factory.eINSTANCE.createModel();
SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
model.setSubModel(subModel);
subModel.getStrings().add("s1");
String serialized = getSerializer().serialize(model);
assertEquals("subModel 1 2 \"s1\"", serialized);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel in project xtext-core by eclipse.
the class Bug299395Test method testSerialization_06.
@Test
public void testSerialization_06() {
Model model = Bug299395Factory.eINSTANCE.createModel();
SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
model.setSubModel(subModel);
String serialized = getSerializer().serialize(model);
assertEquals("subModel", serialized);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel in project xtext-core by eclipse.
the class Bug299395Test method testSerialization_08.
@Test
public void testSerialization_08() {
Model model = Bug299395Factory.eINSTANCE.createModel();
SubModel subModel = Bug299395Factory.eINSTANCE.createSubModel();
model.setSubModel(subModel);
subModel.getStrings().add("s1");
subModel.getStrings().add("s2");
String serialized = getSerializer().serialize(model);
assertEquals("subModel 1 2 \"s1\" 1 2 \"s2\"", serialized);
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel in project xtext-core by eclipse.
the class ModelImpl method basicSetSubModel.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetSubModel(SubModel newSubModel, NotificationChain msgs) {
SubModel oldSubModel = subModel;
subModel = newSubModel;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Bug299395Package.MODEL__SUB_MODEL, oldSubModel, newSubModel);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.xtext.parsetree.reconstr.bug299395.SubModel 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));
}
Aggregations