use of org.eclipse.gemoc.gexpressions.GExpression in project gemoc-studio by eclipse.
the class TestXtextSerializer2 method loadGexpressionTestFile.
public static void loadGexpressionTestFile() {
// Getting the serializer
GExpressionsStandaloneSetup setup = new GExpressionsStandaloneSetup();
Injector injector = setup.createInjectorAndDoEMFRegistration();
GexpressionsPackage.eINSTANCE.eClass();
Serializer serializer = injector.getInstance(Serializer.class);
// Load the model
URI modelURI = URI.createFileURI("/home/flatombe/thesis/gemoc/git/gemoc-dev/org/eclipse/gemoc/GEL/org.eclipse.gemoc.gel.gexpressions.test/model/test.gexpressions");
XtextResourceSet resSet = injector.getInstance(XtextResourceSet.class);
resSet.addLoadOption(XtextResource.OPTION_RESOLVE_ALL, Boolean.TRUE);
Resource resource = resSet.getResource(modelURI, true);
GProgram program = (GProgram) resource.getContents().get(0);
List<GExpression> exps = program.getExpressions();
for (GExpression exp : exps) {
// Serializing
String s = serializer.serialize(exp);
System.out.println(s);
}
}
use of org.eclipse.gemoc.gexpressions.GExpression in project gemoc-studio by eclipse.
the class GUnaryOperatorExpressionImpl method basicSetOperand.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetOperand(GExpression newOperand, NotificationChain msgs) {
GExpression oldOperand = operand;
operand = newOperand;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GexpressionsPackage.GUNARY_OPERATOR_EXPRESSION__OPERAND, oldOperand, newOperand);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.gemoc.gexpressions.GExpression in project gemoc-studio by eclipse.
the class GIfExpressionImpl method basicSetElseExpression.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetElseExpression(GExpression newElseExpression, NotificationChain msgs) {
GExpression oldElseExpression = elseExpression;
elseExpression = newElseExpression;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GexpressionsPackage.GIF_EXPRESSION__ELSE_EXPRESSION, oldElseExpression, newElseExpression);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
use of org.eclipse.gemoc.gexpressions.GExpression in project gemoc-studio by eclipse.
the class GIfExpressionImpl method basicSetThenExpression.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetThenExpression(GExpression newThenExpression, NotificationChain msgs) {
GExpression oldThenExpression = thenExpression;
thenExpression = newThenExpression;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GexpressionsPackage.GIF_EXPRESSION__THEN_EXPRESSION, oldThenExpression, newThenExpression);
if (msgs == null)
msgs = notification;
else
msgs.add(notification);
}
return msgs;
}
Aggregations