use of org.eclipse.gemoc.gexpressions.GexpressionsFactory in project gemoc-studio by eclipse.
the class TestXtextSerializer method main.
public static void main(String[] args) {
// Getting the serializer
GExpressionsStandaloneSetup setup = new GExpressionsStandaloneSetup();
Injector injector = setup.createInjectorAndDoEMFRegistration();
Serializer serializer = injector.getInstance(Serializer.class);
// Creating a model
GexpressionsFactory factory = GexpressionsFactory.eINSTANCE;
GAdditionExpression exp = factory.createGAdditionExpression();
GIntegerExpression un = factory.createGIntegerExpression();
un.setValue(1);
GStringExpression deux = factory.createGStringExpression();
deux.setValue("deux");
exp.setLeftOperand(un);
exp.setRightOperand(deux);
// Serializing
String s = serializer.serialize(exp);
System.out.println(s);
}
Aggregations