Merge "add gitignore and fix rule selection Bug in Wizard"
diff --git a/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
index cb1952e..aa31aeb 100644
--- a/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.henshin.examples/META-INF/MANIFEST.MF
@@ -19,7 +19,21 @@
org.eclipse.emf.henshin.statespace;bundle-version="0.9.0",
org.eclipse.emf.henshin.statespace.external;bundle-version="0.9.3",
org.eclipse.emf.henshin.wrap;bundle-version="0.9.0",
- org.eclipse.uml2.uml;bundle-version="5.0.0";resolution:=optional
+ org.eclipse.uml2.uml;bundle-version="5.0.0";resolution:=optional,
+ org.junit,
+ org.junit.jupiter.api,
+ org.junit.jupiter.engine,
+ org.junit.jupiter.migrationsupport,
+ org.junit.jupiter.params,
+ org.junit.platform.commons,
+ org.junit.platform.engine,
+ org.junit.platform.launcher,
+ org.junit.platform.runner,
+ org.junit.platform.suite.api,
+ org.junit.vintage.engine,
+ org.hamcrest.core,
+ org.opentest4j,
+ org.apiguardian
Export-Package: org.eclipse.emf.henshin.examples.aggregation,
org.eclipse.emf.henshin.examples.bank,
org.eclipse.emf.henshin.examples.bankmap,
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/CreateAndStoreModel.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/CreateAndStoreModel.java
new file mode 100644
index 0000000..facabbb
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/CreateAndStoreModel.java
@@ -0,0 +1,53 @@
+package org.eclipse.emf.henshin.examples.apibasics;
+
+import java.io.IOException;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingFactory;
+import org.eclipse.emf.henshin.model.resource.HenshinResourceSet;
+
+public class CreateAndStoreModel {
+
+ // The dir used by the HenshinResourceSet to resolve relative paths.
+ private static final String BASEDIR = "src/org/eclipse/emf/henshin/examples/apibasics/models";
+
+ public static void main(String[] args) {
+ EObject model = createModel();
+ saveModel(model);
+ }
+
+ public static EObject createModel() {
+ // Model elements can be created by the generated factory.
+ BoxingFactory fac = BoxingFactory.eINSTANCE;
+ Boxing boxing = fac.createBoxing();
+
+ /*
+ * Getters for attributes and references are automatically generated by
+ * the code* generator. Use them to get and changes the contents of the
+ * model elements.
+ */
+ boxing.getBoxes().add(fac.createBox());
+ boxing.getItems().add(fac.createItem());
+ return boxing;
+ }
+
+ public static void saveModel(EObject model) {
+ /*
+ * Models can be saved by putting them into a Resource. Resources are
+ * managed by ResourceSets. The Henshin versions of these types are a
+ * bit easier to use.
+ */
+ HenshinResourceSet rs = new HenshinResourceSet(BASEDIR);
+ Resource res = rs.createResource("createdInstanceStatic.xmi");
+ res.getContents().add(model);
+
+ try {
+ res.save(null);
+ } catch (IOException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+}
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/ExecuteHenshinRule.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/ExecuteHenshinRule.java
new file mode 100644
index 0000000..c2ee06e
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/ExecuteHenshinRule.java
@@ -0,0 +1,72 @@
+package org.eclipse.emf.henshin.examples.apibasics;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.henshin.interpreter.EGraph;
+import org.eclipse.emf.henshin.interpreter.Engine;
+import org.eclipse.emf.henshin.interpreter.UnitApplication;
+import org.eclipse.emf.henshin.interpreter.impl.EGraphImpl;
+import org.eclipse.emf.henshin.interpreter.impl.EngineImpl;
+import org.eclipse.emf.henshin.interpreter.impl.LoggingApplicationMonitor;
+import org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl;
+import org.eclipse.emf.henshin.model.Module;
+import org.eclipse.emf.henshin.model.Unit;
+import org.eclipse.emf.henshin.model.resource.HenshinResourceSet;
+
+public class ExecuteHenshinRule {
+
+ public static void main(String[] args) {
+ EObject modelRoot = LoadModel.loadModel();
+
+ /*
+ * Generally it is a good idea to use the same ResourceSet for loading
+ * the model and the Henshin rules as it is less error prone.
+ */
+ HenshinResourceSet rs = (HenshinResourceSet) modelRoot.eResource()
+ .getResourceSet();
+
+ /*
+ * Static rules need to be used when working with static models.
+ * When creating a .henshin file, make sure to add the metamodel
+ * "From Registry" and not via the .ecore file.
+ * To add the metamodel to the Registry, start a new Eclipse
+ * instance (right click on project -> Run as -> Eclipse Application)
+ * from the workspace containing you metamodel classes. In that new
+ * instance you should be able to create henshin diagrams using
+ * the "From Registry" button to load the model.
+ *
+ * You might want to compare rulesStatic and rulesDynamic in a text
+ * editor to learn about the differences.
+ */
+ Module rules = rs.getModule("rulesStatic.henshin", true);
+ Unit testRule = rules.getUnit("addItemToBox");
+
+ /* For performance reasons you should reuse the Engine and EGraph in
+ * your code when possible. However, do NOT reuse UnitApplications if
+ * you don't have a specific reason for that. UnitApplication keep some
+ * state of former rule executions. Reusing them can lead to unintended
+ * behavior.
+ */
+ Engine engine = new EngineImpl();
+ EGraph graph = new EGraphImpl(modelRoot);
+
+ /*
+ * If multiple macthes for a rule exists in a model, the following
+ * allows a rule to select randomly where it is applied.
+ */
+ engine.getOptions().put(Engine.OPTION_DETERMINISTIC, false);
+
+ UnitApplication application = new UnitApplicationImpl(engine, graph, testRule, null);
+
+ /*
+ * If you want to analyse the execution of a rule you can use a
+ * LoggingApplicationMonitor to get some feedback on console.
+ * Otherwise use null as parameter.
+ */
+ application.execute(new LoggingApplicationMonitor());
+ }
+}
+
+/*
+ * For more information on using the Henshin API visit
+ * https://wiki.eclipse.org/Henshin/Interpreter.
+ */
\ No newline at end of file
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/LoadModel.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/LoadModel.java
new file mode 100644
index 0000000..2af6c6b
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/LoadModel.java
@@ -0,0 +1,67 @@
+package org.eclipse.emf.henshin.examples.apibasics;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.model.resource.HenshinResourceSet;
+
+public class LoadModel {
+
+ // The dir used by the HenshinResourceSet to resolve relative paths.
+ private static final String BASEDIR = "src/org/eclipse/emf/henshin/examples/apibasics/models";
+
+ public static void main(String[] args) {
+
+ EObject modelRoot = loadModel();
+
+ /*
+ * If you registered the metamodel, you should have an object with the
+ * type of your model root. In that case, you can cast to the concrete
+ * type if you need to access model elements.
+ */
+ System.out.println("Type of the root: " + modelRoot.getClass());
+ Boxing boxing = (Boxing) modelRoot;
+ System.out.println("First item: " + boxing.getItems().get(0));
+ }
+
+ public static EObject loadModel() {
+
+ HenshinResourceSet rs = new HenshinResourceSet(BASEDIR);
+ /*
+ * Metamodels need to be registered in order to use instance models in
+ * a static way (using the classes with their specific getters
+ * generated for your model. This can be done by registering the
+ * package of your model in the package registry of the ResourceSet
+ * which you use to load instance models.
+ * In that case, it does not matter if the loaded model has been
+ * created as a static model (e.g. by using the api as shown in
+ * CreateAndStoreModel.java) or if it is a dynamic model created by,
+ * e.g., right clicking the root in the .ecore file and choosing
+ * "Create Dynamic Instance...".
+ *
+ * You might want to compare instanceStatic and instanceDynamic in a
+ * text editor to learn about the differences.
+ */
+ rs.getPackageRegistry().put(BoxingPackage.eINSTANCE.getNsURI(),
+ BoxingPackage.eINSTANCE);
+ Resource res = rs.getResource("instanceStatic.xmi");
+
+ /*
+ * Usually there is only one model root stored in an xmi file. So
+ * getContents() should return a list with one element.
+ */
+ EObject modelRoot = res.getContents().get(0);
+
+
+ /* WARNING:
+ * If the metamodel is not registered before loading, you are working
+ * with dynamic models. In that case you can access all model elements
+ * only by very generic reflective accessor methods. If you think you
+ * need dynamic EMF more info can be found here:
+ * https://www.ibm.com/developerworks/library/os-eclipse-dynamicemf
+ */
+
+ return modelRoot;
+ }
+}
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/TestRule.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/TestRule.java
new file mode 100644
index 0000000..b6383fd
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/TestRule.java
@@ -0,0 +1,101 @@
+package org.eclipse.emf.henshin.examples.apibasics;
+
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.interpreter.Engine;
+import org.eclipse.emf.henshin.interpreter.UnitApplication;
+import org.eclipse.emf.henshin.interpreter.impl.EGraphImpl;
+import org.eclipse.emf.henshin.interpreter.impl.EngineImpl;
+import org.eclipse.emf.henshin.interpreter.impl.LoggingApplicationMonitor;
+import org.eclipse.emf.henshin.interpreter.impl.UnitApplicationImpl;
+import org.eclipse.emf.henshin.model.Module;
+import org.eclipse.emf.henshin.model.resource.HenshinResourceSet;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+class TestRule {
+
+ private static final String BASEDIR = "src/org/eclipse/emf/henshin/examples/apibasics/models";
+
+ private static Engine engine;
+ private static Resource modelResource;
+ private static EObject model;
+ private static List<EObject> roots;
+ private static Module module;
+ private static UnitApplication unitApp;
+ private static HenshinResourceSet rs;
+
+ /*
+ * Create the ResourceSet where models and rules are managed in and
+ * register metamodel.
+ */
+ @BeforeAll
+ public static void setup() {
+ rs = new HenshinResourceSet(BASEDIR);
+ rs.getPackageRegistry().put(BoxingPackage.eINSTANCE.getNsURI(), BoxingPackage.eINSTANCE);
+ engine = new EngineImpl();
+ }
+
+ /*
+ * Before each new test, the resource holding the input model and the rules
+ * need to be reset. This is necessary as
+ * "modelResource = rs.getResource("xyz.xmi")" will not load the model xyz
+ * again if it is already loaded by modelResource. As a consequence,
+ * changes we applied to xyz would not be discarded if we don't unload the
+ * model first. Additionally, we might want to slightly change the tested
+ * rules (e.g., to make them deterministic) in a test case. The same
+ * principle as for the model applies; we need to use unload to reset the
+ * rules.
+ */
+ @BeforeEach
+ public void resetUnitApp() {
+ if (modelResource != null) {
+ modelResource.unload();
+ }
+ rs.getResource("rulesStatic.henshin").unload();
+ module = rs.getModule("rulesStatic.henshin");
+ unitApp = new UnitApplicationImpl(engine);
+ }
+
+ /*
+ * The actual test case needs to load the input model, apply the rule and
+ * check the resulting model.
+ */
+ @Test
+ void testItemIsAlreadyStored() {
+ // The path is still resolved against the BASEDIR.
+ modelResource = rs.getResource("../testModels/storedItem.xmi");
+
+ // Another way to load a model into an EGraph
+ roots = modelResource.getContents();
+ unitApp.setEGraph(new EGraphImpl(roots));
+ unitApp.setUnit(module.getUnit("addItemToBox"));
+
+ assertFalse(unitApp.execute(new LoggingApplicationMonitor()));
+ }
+
+
+ @Test
+ void testItemGetsStored() {
+ modelResource = rs.getResource("../testModels/unstoredItem.xmi");
+
+ roots = modelResource.getContents();
+ unitApp.setEGraph(new EGraphImpl(roots));
+ unitApp.setUnit(module.getUnit("addItemToBox"));
+
+ assertTrue(unitApp.execute(null));
+
+ // Get resulting model from graph
+ Boxing boxing = (Boxing)unitApp.getEGraph().getRoots().get(0);
+ assertTrue(boxing.getBoxes().get(0).getStores().get(0) == boxing.getItems().get(0));
+ }
+
+}
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Box.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Box.java
new file mode 100644
index 0000000..f6ca974
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Box.java
@@ -0,0 +1,40 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Box</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box#getStores <em>Stores</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getBox()
+ * @model
+ * @generated
+ */
+public interface Box extends EObject {
+ /**
+ * Returns the value of the '<em><b>Stores</b></em>' reference list.
+ * The list contents are of type {@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item}.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy <em>Is Stored By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Stores</em>' reference list.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getBox_Stores()
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy
+ * @model opposite="isStoredBy"
+ * @generated
+ */
+ EList<Item> getStores();
+
+} // Box
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Boxing.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Boxing.java
new file mode 100644
index 0000000..d09fcf4
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Boxing.java
@@ -0,0 +1,51 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Boxing</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getBoxes <em>Boxes</em>}</li>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getItems <em>Items</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getBoxing()
+ * @model
+ * @generated
+ */
+public interface Boxing extends EObject {
+ /**
+ * Returns the value of the '<em><b>Boxes</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Boxes</em>' containment reference list.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getBoxing_Boxes()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Box> getBoxes();
+
+ /**
+ * Returns the value of the '<em><b>Items</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Items</em>' containment reference list.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getBoxing_Items()
+ * @model containment="true"
+ * @generated
+ */
+ EList<Item> getItems();
+
+} // Boxing
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingFactory.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingFactory.java
new file mode 100644
index 0000000..5ed8dc6
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingFactory.java
@@ -0,0 +1,60 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing;
+
+import org.eclipse.emf.ecore.EFactory;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Factory</b> for the model.
+ * It provides a create method for each non-abstract class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage
+ * @generated
+ */
+public interface BoxingFactory extends EFactory {
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ BoxingFactory eINSTANCE = org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Boxing</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Boxing</em>'.
+ * @generated
+ */
+ Boxing createBoxing();
+
+ /**
+ * Returns a new object of class '<em>Box</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Box</em>'.
+ * @generated
+ */
+ Box createBox();
+
+ /**
+ * Returns a new object of class '<em>Item</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Item</em>'.
+ * @generated
+ */
+ Item createItem();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ BoxingPackage getBoxingPackage();
+
+} //BoxingFactory
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingPackage.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingPackage.java
new file mode 100644
index 0000000..5e2fed5
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/BoxingPackage.java
@@ -0,0 +1,340 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface BoxingPackage extends EPackage {
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "boxing";
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "www.boxing.com";
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "boxing";
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ BoxingPackage eINSTANCE = org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl <em>Boxing</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getBoxing()
+ * @generated
+ */
+ int BOXING = 0;
+
+ /**
+ * The feature id for the '<em><b>Boxes</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOXING__BOXES = 0;
+
+ /**
+ * The feature id for the '<em><b>Items</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOXING__ITEMS = 1;
+
+ /**
+ * The number of structural features of the '<em>Boxing</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOXING_FEATURE_COUNT = 2;
+
+ /**
+ * The number of operations of the '<em>Boxing</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOXING_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxImpl <em>Box</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getBox()
+ * @generated
+ */
+ int BOX = 1;
+
+ /**
+ * The feature id for the '<em><b>Stores</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOX__STORES = 0;
+
+ /**
+ * The number of structural features of the '<em>Box</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOX_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Box</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int BOX_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.ItemImpl <em>Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.ItemImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getItem()
+ * @generated
+ */
+ int ITEM = 2;
+
+ /**
+ * The feature id for the '<em><b>Is Stored By</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM__IS_STORED_BY = 0;
+
+ /**
+ * The number of structural features of the '<em>Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM_FEATURE_COUNT = 1;
+
+ /**
+ * The number of operations of the '<em>Item</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ITEM_OPERATION_COUNT = 0;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing <em>Boxing</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Boxing</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing
+ * @generated
+ */
+ EClass getBoxing();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getBoxes <em>Boxes</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Boxes</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getBoxes()
+ * @see #getBoxing()
+ * @generated
+ */
+ EReference getBoxing_Boxes();
+
+ /**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getItems <em>Items</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Items</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing#getItems()
+ * @see #getBoxing()
+ * @generated
+ */
+ EReference getBoxing_Items();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box <em>Box</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Box</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Box
+ * @generated
+ */
+ EClass getBox();
+
+ /**
+ * Returns the meta object for the reference list '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box#getStores <em>Stores</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference list '<em>Stores</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Box#getStores()
+ * @see #getBox()
+ * @generated
+ */
+ EReference getBox_Stores();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item <em>Item</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Item</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Item
+ * @generated
+ */
+ EClass getItem();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy <em>Is Stored By</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Is Stored By</em>'.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy()
+ * @see #getItem()
+ * @generated
+ */
+ EReference getItem_IsStoredBy();
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ BoxingFactory getBoxingFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl <em>Boxing</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getBoxing()
+ * @generated
+ */
+ EClass BOXING = eINSTANCE.getBoxing();
+
+ /**
+ * The meta object literal for the '<em><b>Boxes</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOXING__BOXES = eINSTANCE.getBoxing_Boxes();
+
+ /**
+ * The meta object literal for the '<em><b>Items</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOXING__ITEMS = eINSTANCE.getBoxing_Items();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxImpl <em>Box</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getBox()
+ * @generated
+ */
+ EClass BOX = eINSTANCE.getBox();
+
+ /**
+ * The meta object literal for the '<em><b>Stores</b></em>' reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference BOX__STORES = eINSTANCE.getBox_Stores();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.ItemImpl <em>Item</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.ItemImpl
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingPackageImpl#getItem()
+ * @generated
+ */
+ EClass ITEM = eINSTANCE.getItem();
+
+ /**
+ * The meta object literal for the '<em><b>Is Stored By</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference ITEM__IS_STORED_BY = eINSTANCE.getItem_IsStoredBy();
+
+ }
+
+} //BoxingPackage
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Item.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Item.java
new file mode 100644
index 0000000..11673b5
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/Item.java
@@ -0,0 +1,48 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Item</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy <em>Is Stored By</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getItem()
+ * @model
+ * @generated
+ */
+public interface Item extends EObject {
+ /**
+ * Returns the value of the '<em><b>Is Stored By</b></em>' reference.
+ * It is bidirectional and its opposite is '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box#getStores <em>Stores</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Is Stored By</em>' reference.
+ * @see #setIsStoredBy(Box)
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#getItem_IsStoredBy()
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Box#getStores
+ * @model opposite="stores"
+ * @generated
+ */
+ Box getIsStoredBy();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item#getIsStoredBy <em>Is Stored By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Is Stored By</em>' reference.
+ * @see #getIsStoredBy()
+ * @generated
+ */
+ void setIsStoredBy(Box value);
+
+} // Item
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxImpl.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxImpl.java
new file mode 100644
index 0000000..88e2cf0
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxImpl.java
@@ -0,0 +1,166 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Box;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Item;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Box</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxImpl#getStores <em>Stores</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class BoxImpl extends MinimalEObjectImpl.Container implements Box {
+ /**
+ * The cached value of the '{@link #getStores() <em>Stores</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStores()
+ * @generated
+ * @ordered
+ */
+ protected EList<Item> stores;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BoxImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BoxingPackage.Literals.BOX;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Item> getStores() {
+ if (stores == null) {
+ stores = new EObjectWithInverseResolvingEList<Item>(Item.class, this, BoxingPackage.BOX__STORES, BoxingPackage.ITEM__IS_STORED_BY);
+ }
+ return stores;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ return ((InternalEList<InternalEObject>)(InternalEList<?>)getStores()).basicAdd(otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ return ((InternalEList<?>)getStores()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ return getStores();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ getStores().clear();
+ getStores().addAll((Collection<? extends Item>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ getStores().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.BOX__STORES:
+ return stores != null && !stores.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BoxImpl
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingFactoryImpl.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingFactoryImpl.java
new file mode 100644
index 0000000..930e9c1
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingFactoryImpl.java
@@ -0,0 +1,116 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BoxingFactoryImpl extends EFactoryImpl implements BoxingFactory {
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static BoxingFactory init() {
+ try {
+ BoxingFactory theBoxingFactory = (BoxingFactory)EPackage.Registry.INSTANCE.getEFactory(BoxingPackage.eNS_URI);
+ if (theBoxingFactory != null) {
+ return theBoxingFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new BoxingFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BoxingFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case BoxingPackage.BOXING: return createBoxing();
+ case BoxingPackage.BOX: return createBox();
+ case BoxingPackage.ITEM: return createItem();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Boxing createBoxing() {
+ BoxingImpl boxing = new BoxingImpl();
+ return boxing;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Box createBox() {
+ BoxImpl box = new BoxImpl();
+ return box;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Item createItem() {
+ ItemImpl item = new ItemImpl();
+ return item;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BoxingPackage getBoxingPackage() {
+ return (BoxingPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static BoxingPackage getPackage() {
+ return BoxingPackage.eINSTANCE;
+ }
+
+} //BoxingFactoryImpl
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingImpl.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingImpl.java
new file mode 100644
index 0000000..a6e5d10
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingImpl.java
@@ -0,0 +1,187 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.impl;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.notify.NotificationChain;
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Box;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Item;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Boxing</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl#getBoxes <em>Boxes</em>}</li>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.BoxingImpl#getItems <em>Items</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class BoxingImpl extends MinimalEObjectImpl.Container implements Boxing {
+ /**
+ * The cached value of the '{@link #getBoxes() <em>Boxes</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getBoxes()
+ * @generated
+ * @ordered
+ */
+ protected EList<Box> boxes;
+
+ /**
+ * The cached value of the '{@link #getItems() <em>Items</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getItems()
+ * @generated
+ * @ordered
+ */
+ protected EList<Item> items;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BoxingImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BoxingPackage.Literals.BOXING;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Box> getBoxes() {
+ if (boxes == null) {
+ boxes = new EObjectContainmentEList<Box>(Box.class, this, BoxingPackage.BOXING__BOXES);
+ }
+ return boxes;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EList<Item> getItems() {
+ if (items == null) {
+ items = new EObjectContainmentEList<Item>(Item.class, this, BoxingPackage.BOXING__ITEMS);
+ }
+ return items;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case BoxingPackage.BOXING__BOXES:
+ return ((InternalEList<?>)getBoxes()).basicRemove(otherEnd, msgs);
+ case BoxingPackage.BOXING__ITEMS:
+ return ((InternalEList<?>)getItems()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BoxingPackage.BOXING__BOXES:
+ return getBoxes();
+ case BoxingPackage.BOXING__ITEMS:
+ return getItems();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BoxingPackage.BOXING__BOXES:
+ getBoxes().clear();
+ getBoxes().addAll((Collection<? extends Box>)newValue);
+ return;
+ case BoxingPackage.BOXING__ITEMS:
+ getItems().clear();
+ getItems().addAll((Collection<? extends Item>)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.BOXING__BOXES:
+ getBoxes().clear();
+ return;
+ case BoxingPackage.BOXING__ITEMS:
+ getItems().clear();
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.BOXING__BOXES:
+ return boxes != null && !boxes.isEmpty();
+ case BoxingPackage.BOXING__ITEMS:
+ return items != null && !items.isEmpty();
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //BoxingImpl
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingPackageImpl.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingPackageImpl.java
new file mode 100644
index 0000000..23864be
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/BoxingPackageImpl.java
@@ -0,0 +1,251 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Box;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingFactory;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Item;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class BoxingPackageImpl extends EPackageImpl implements BoxingPackage {
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass boxingEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass boxEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass itemEClass = null;
+
+ /**
+ * Creates an instance of the model <b>Package</b>, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ * <p>Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private BoxingPackageImpl() {
+ super(eNS_URI, BoxingFactory.eINSTANCE);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>This method is used to initialize {@link BoxingPackage#eINSTANCE} when that field is accessed.
+ * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static BoxingPackage init() {
+ if (isInited) return (BoxingPackage)EPackage.Registry.INSTANCE.getEPackage(BoxingPackage.eNS_URI);
+
+ // Obtain or create and register package
+ Object registeredBoxingPackage = EPackage.Registry.INSTANCE.get(eNS_URI);
+ BoxingPackageImpl theBoxingPackage = registeredBoxingPackage instanceof BoxingPackageImpl ? (BoxingPackageImpl)registeredBoxingPackage : new BoxingPackageImpl();
+
+ isInited = true;
+
+ // Create package meta-data objects
+ theBoxingPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theBoxingPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theBoxingPackage.freeze();
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(BoxingPackage.eNS_URI, theBoxingPackage);
+ return theBoxingPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBoxing() {
+ return boxingEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBoxing_Boxes() {
+ return (EReference)boxingEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBoxing_Items() {
+ return (EReference)boxingEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getBox() {
+ return boxEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getBox_Stores() {
+ return (EReference)boxEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getItem() {
+ return itemEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getItem_IsStoredBy() {
+ return (EReference)itemEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BoxingFactory getBoxingFactory() {
+ return (BoxingFactory)getEFactoryInstance();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void createPackageContents() {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ boxingEClass = createEClass(BOXING);
+ createEReference(boxingEClass, BOXING__BOXES);
+ createEReference(boxingEClass, BOXING__ITEMS);
+
+ boxEClass = createEClass(BOX);
+ createEReference(boxEClass, BOX__STORES);
+
+ itemEClass = createEClass(ITEM);
+ createEReference(itemEClass, ITEM__IS_STORED_BY);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void initializePackageContents() {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(boxingEClass, Boxing.class, "Boxing", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBoxing_Boxes(), this.getBox(), null, "boxes", null, 0, -1, Boxing.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getBoxing_Items(), this.getItem(), null, "items", null, 0, -1, Boxing.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(boxEClass, Box.class, "Box", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getBox_Stores(), this.getItem(), this.getItem_IsStoredBy(), "stores", null, 0, -1, Box.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(itemEClass, Item.class, "Item", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getItem_IsStoredBy(), this.getBox(), this.getBox_Stores(), "isStoredBy", null, 0, 1, Item.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //BoxingPackageImpl
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/ItemImpl.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/ItemImpl.java
new file mode 100644
index 0000000..9be37e1
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/impl/ItemImpl.java
@@ -0,0 +1,209 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Box;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.Item;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Item</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.emf.henshin.examples.apibasics.boxing.impl.ItemImpl#getIsStoredBy <em>Is Stored By</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class ItemImpl extends MinimalEObjectImpl.Container implements Item {
+ /**
+ * The cached value of the '{@link #getIsStoredBy() <em>Is Stored By</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getIsStoredBy()
+ * @generated
+ * @ordered
+ */
+ protected Box isStoredBy;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ItemImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return BoxingPackage.Literals.ITEM;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Box getIsStoredBy() {
+ if (isStoredBy != null && isStoredBy.eIsProxy()) {
+ InternalEObject oldIsStoredBy = (InternalEObject)isStoredBy;
+ isStoredBy = (Box)eResolveProxy(oldIsStoredBy);
+ if (isStoredBy != oldIsStoredBy) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, BoxingPackage.ITEM__IS_STORED_BY, oldIsStoredBy, isStoredBy));
+ }
+ }
+ return isStoredBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public Box basicGetIsStoredBy() {
+ return isStoredBy;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public NotificationChain basicSetIsStoredBy(Box newIsStoredBy, NotificationChain msgs) {
+ Box oldIsStoredBy = isStoredBy;
+ isStoredBy = newIsStoredBy;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BoxingPackage.ITEM__IS_STORED_BY, oldIsStoredBy, newIsStoredBy);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIsStoredBy(Box newIsStoredBy) {
+ if (newIsStoredBy != isStoredBy) {
+ NotificationChain msgs = null;
+ if (isStoredBy != null)
+ msgs = ((InternalEObject)isStoredBy).eInverseRemove(this, BoxingPackage.BOX__STORES, Box.class, msgs);
+ if (newIsStoredBy != null)
+ msgs = ((InternalEObject)newIsStoredBy).eInverseAdd(this, BoxingPackage.BOX__STORES, Box.class, msgs);
+ msgs = basicSetIsStoredBy(newIsStoredBy, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, BoxingPackage.ITEM__IS_STORED_BY, newIsStoredBy, newIsStoredBy));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ if (isStoredBy != null)
+ msgs = ((InternalEObject)isStoredBy).eInverseRemove(this, BoxingPackage.BOX__STORES, Box.class, msgs);
+ return basicSetIsStoredBy((Box)otherEnd, msgs);
+ }
+ return super.eInverseAdd(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ return basicSetIsStoredBy(null, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ if (resolve) return getIsStoredBy();
+ return basicGetIsStoredBy();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ setIsStoredBy((Box)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ setIsStoredBy((Box)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case BoxingPackage.ITEM__IS_STORED_BY:
+ return isStoredBy != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ItemImpl
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingAdapterFactory.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingAdapterFactory.java
new file mode 100644
index 0000000..e7be6da
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingAdapterFactory.java
@@ -0,0 +1,155 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.util;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+
+import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Adapter Factory</b> for the model.
+ * It provides an adapter <code>createXXX</code> method for each class of the model.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage
+ * @generated
+ */
+public class BoxingAdapterFactory extends AdapterFactoryImpl {
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static BoxingPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BoxingAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = BoxingPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Returns whether this factory is applicable for the type of the object.
+ * <!-- begin-user-doc -->
+ * This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
+ * <!-- end-user-doc -->
+ * @return whether this factory is applicable for the type of the object.
+ * @generated
+ */
+ @Override
+ public boolean isFactoryForType(Object object) {
+ if (object == modelPackage) {
+ return true;
+ }
+ if (object instanceof EObject) {
+ return ((EObject)object).eClass().getEPackage() == modelPackage;
+ }
+ return false;
+ }
+
+ /**
+ * The switch that delegates to the <code>createXXX</code> methods.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected BoxingSwitch<Adapter> modelSwitch =
+ new BoxingSwitch<Adapter>() {
+ @Override
+ public Adapter caseBoxing(Boxing object) {
+ return createBoxingAdapter();
+ }
+ @Override
+ public Adapter caseBox(Box object) {
+ return createBoxAdapter();
+ }
+ @Override
+ public Adapter caseItem(Item object) {
+ return createItemAdapter();
+ }
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
+
+ /**
+ * Creates an adapter for the <code>target</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param target the object to adapt.
+ * @return the adapter for the <code>target</code>.
+ * @generated
+ */
+ @Override
+ public Adapter createAdapter(Notifier target) {
+ return modelSwitch.doSwitch((EObject)target);
+ }
+
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing <em>Boxing</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Boxing
+ * @generated
+ */
+ public Adapter createBoxingAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Box <em>Box</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Box
+ * @generated
+ */
+ public Adapter createBoxAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.henshin.examples.apibasics.boxing.Item <em>Item</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.Item
+ * @generated
+ */
+ public Adapter createItemAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for the default case.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @generated
+ */
+ public Adapter createEObjectAdapter() {
+ return null;
+ }
+
+} //BoxingAdapterFactory
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingSwitch.java b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingSwitch.java
new file mode 100644
index 0000000..2acfd04
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/boxing/util/BoxingSwitch.java
@@ -0,0 +1,151 @@
+/**
+ */
+package org.eclipse.emf.henshin.examples.apibasics.boxing.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.emf.henshin.examples.apibasics.boxing.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Switch</b> for the model's inheritance hierarchy.
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
+ * to invoke the <code>caseXXX</code> method for each class of the model,
+ * starting with the actual class of the object
+ * and proceeding up the inheritance hierarchy
+ * until a non-null result is returned,
+ * which is the result of the switch.
+ * <!-- end-user-doc -->
+ * @see org.eclipse.emf.henshin.examples.apibasics.boxing.BoxingPackage
+ * @generated
+ */
+public class BoxingSwitch<T> extends Switch<T> {
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static BoxingPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public BoxingSwitch() {
+ if (modelPackage == null) {
+ modelPackage = BoxingPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @Override
+ protected boolean isSwitchFor(EPackage ePackage) {
+ return ePackage == modelPackage;
+ }
+
+ /**
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the first non-null result returned by a <code>caseXXX</code> call.
+ * @generated
+ */
+ @Override
+ protected T doSwitch(int classifierID, EObject theEObject) {
+ switch (classifierID) {
+ case BoxingPackage.BOXING: {
+ Boxing boxing = (Boxing)theEObject;
+ T result = caseBoxing(boxing);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BoxingPackage.BOX: {
+ Box box = (Box)theEObject;
+ T result = caseBox(box);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case BoxingPackage.ITEM: {
+ Item item = (Item)theEObject;
+ T result = caseItem(item);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Boxing</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Boxing</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBoxing(Boxing object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Box</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Box</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseBox(Box object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Item</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>Item</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseItem(Item object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * <!-- begin-user-doc -->
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch, but this is the last case anyway.
+ * <!-- end-user-doc -->
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of '<em>EObject</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject)
+ * @generated
+ */
+ @Override
+ public T defaultCase(EObject object) {
+ return null;
+ }
+
+} //BoxingSwitch
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.ecore b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.ecore
new file mode 100644
index 0000000..9666ea4
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.ecore
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="boxing" nsURI="www.boxing.com" nsPrefix="boxing">
+ <eClassifiers xsi:type="ecore:EClass" name="Boxing">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="boxes" upperBound="-1"
+ eType="#//Box" containment="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="items" upperBound="-1"
+ eType="#//Item" containment="true"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Box">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="stores" upperBound="-1"
+ eType="#//Item" eOpposite="#//Item/isStoredBy"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="Item">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="isStoredBy" eType="#//Box"
+ eOpposite="#//Box/stores"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.genmodel b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.genmodel
new file mode 100644
index 0000000..56ef636
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/boxing.genmodel
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" modelDirectory="/EMF_Henshin_API_examples/src" modelPluginID="EMF_Henshin_API_examples"
+ modelName="Boxing" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ operationReflection="true" importOrganizing="true">
+ <foreignModel>boxing.ecore</foreignModel>
+ <genPackages prefix="Boxing" disposableProviderFactory="true" ecorePackage="boxing.ecore#/">
+ <genClasses ecoreClass="boxing.ecore#//Boxing">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference boxing.ecore#//Boxing/boxes"/>
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference boxing.ecore#//Boxing/items"/>
+ </genClasses>
+ <genClasses ecoreClass="boxing.ecore#//Box">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference boxing.ecore#//Box/stores"/>
+ </genClasses>
+ <genClasses ecoreClass="boxing.ecore#//Item">
+ <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference boxing.ecore#//Item/isStoredBy"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceDynamic.xmi b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceDynamic.xmi
new file mode 100644
index 0000000..90649dd
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceDynamic.xmi
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<boxing:Boxing xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:boxing="www.boxing.com"
+ xsi:schemaLocation="www.boxing.com boxing.ecore">
+ <boxes/>
+ <items/>
+</boxing:Boxing>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceStatic.xmi b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceStatic.xmi
new file mode 100644
index 0000000..22854c9
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/instanceStatic.xmi
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<boxing:Boxing xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:boxing="www.boxing.com">
+ <boxes/>
+ <items/>
+</boxing:Boxing>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin
new file mode 100644
index 0000000..b2e2b09
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmi:id="_yJq_EL9ZEemme_wk7Csgrw">
+ <imports href="boxing.ecore#/"/>
+ <units xsi:type="henshin:Rule" xmi:id="_y4tPUL9ZEemme_wk7Csgrw" name="addItemToBox">
+ <lhs xmi:id="_y43nYL9ZEemme_wk7Csgrw" name="Lhs">
+ <nodes xmi:id="_1PrtwL9ZEemme_wk7Csgrw" name="b">
+ <type href="boxing.ecore#//Box"/>
+ </nodes>
+ <nodes xmi:id="_2A4hML9ZEemme_wk7Csgrw" name="i">
+ <type href="boxing.ecore#//Item"/>
+ </nodes>
+ <formula xsi:type="henshin:Not" xmi:id="_3TJaUL9ZEemme_wk7Csgrw">
+ <child xsi:type="henshin:NestedCondition" xmi:id="_3TJaUb9ZEemme_wk7Csgrw">
+ <conclusion xmi:id="_3TJaUr9ZEemme_wk7Csgrw">
+ <nodes xmi:id="_3TKBYL9ZEemme_wk7Csgrw" name="b" outgoing="_2oCn0L9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Box"/>
+ </nodes>
+ <nodes xmi:id="_3TKBYr9ZEemme_wk7Csgrw" name="i" incoming="_2oCn0L9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Item"/>
+ </nodes>
+ <edges xmi:id="_2oCn0L9ZEemme_wk7Csgrw" source="_3TKBYL9ZEemme_wk7Csgrw" target="_3TKBYr9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Box/stores"/>
+ </edges>
+ </conclusion>
+ <mappings xmi:id="_3TKBYb9ZEemme_wk7Csgrw" origin="_1PrtwL9ZEemme_wk7Csgrw" image="_3TKBYL9ZEemme_wk7Csgrw"/>
+ <mappings xmi:id="_3TKBY79ZEemme_wk7Csgrw" origin="_2A4hML9ZEemme_wk7Csgrw" image="_3TKBYr9ZEemme_wk7Csgrw"/>
+ </child>
+ </formula>
+ </lhs>
+ <rhs xmi:id="_y43nYb9ZEemme_wk7Csgrw" name="Rhs">
+ <nodes xmi:id="_1Prtwb9ZEemme_wk7Csgrw" name="b" outgoing="_58lhwL9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Box"/>
+ </nodes>
+ <nodes xmi:id="_2A4hMb9ZEemme_wk7Csgrw" name="i" incoming="_58lhwL9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Item"/>
+ </nodes>
+ <edges xmi:id="_58lhwL9ZEemme_wk7Csgrw" source="_1Prtwb9ZEemme_wk7Csgrw" target="_2A4hMb9ZEemme_wk7Csgrw">
+ <type href="boxing.ecore#//Box/stores"/>
+ </edges>
+ </rhs>
+ <mappings xmi:id="_1PsU0L9ZEemme_wk7Csgrw" origin="_1PrtwL9ZEemme_wk7Csgrw" image="_1Prtwb9ZEemme_wk7Csgrw"/>
+ <mappings xmi:id="_2A4hMr9ZEemme_wk7Csgrw" origin="_2A4hML9ZEemme_wk7Csgrw" image="_2A4hMb9ZEemme_wk7Csgrw"/>
+ </units>
+</henshin:Module>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin_diagram b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin_diagram
new file mode 100644
index 0000000..ed03a7b
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesDynamic.henshin_diagram
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_yJrmIL9ZEemme_wk7Csgrw" type="Henshin" name="rulesDynamic.henshin_diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_y4zV8L9ZEemme_wk7Csgrw" type="2001" fontName="Segoe UI" italic="true" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1PsU0b9ZEemme_wk7Csgrw" source="defaultAction">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1PsU0r9ZEemme_wk7Csgrw" key="value" value="preserve"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_y4z9AL9ZEemme_wk7Csgrw" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_y4z9Ab9ZEemme_wk7Csgrw" type="7001">
+ <children xmi:type="notation:Shape" xmi:id="_1PuKAL9ZEemme_wk7Csgrw" type="3001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_1PuxEL9ZEemme_wk7Csgrw" type="5002"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1PuxEb9ZEemme_wk7Csgrw" type="5003"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_1PuxEr9ZEemme_wk7Csgrw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_1PuxE79ZEemme_wk7Csgrw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_1PuxFL9ZEemme_wk7Csgrw"/>
+ </children>
+ <element xmi:type="henshin:Node" href="rulesDynamic.henshin#_1PrtwL9ZEemme_wk7Csgrw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1PuKAb9ZEemme_wk7Csgrw" x="44" y="51"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_2A5IQL9ZEemme_wk7Csgrw" type="3001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2A5vUL9ZEemme_wk7Csgrw" type="5002"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2A5vUb9ZEemme_wk7Csgrw" type="5003"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2A5vUr9ZEemme_wk7Csgrw" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_2A5vU79ZEemme_wk7Csgrw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_2A5vVL9ZEemme_wk7Csgrw"/>
+ </children>
+ <element xmi:type="henshin:Node" href="rulesDynamic.henshin#_2A4hML9ZEemme_wk7Csgrw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2A5IQb9ZEemme_wk7Csgrw" x="232" y="98"/>
+ </children>
+ </children>
+ <element xmi:type="henshin:Rule" href="rulesDynamic.henshin#_y4tPUL9ZEemme_wk7Csgrw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_y4zV8b9ZEemme_wk7Csgrw" x="233" y="275" width="381" height="224"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_yJrmIb9ZEemme_wk7Csgrw"/>
+ <element xmi:type="henshin:Module" href="rulesDynamic.henshin#_yJq_EL9ZEemme_wk7Csgrw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_2oEdAL9ZEemme_wk7Csgrw" type="4001" source="_1PuKAL9ZEemme_wk7Csgrw" target="_2A5IQL9ZEemme_wk7Csgrw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_2oFEEL9ZEemme_wk7Csgrw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2oFEEb9ZEemme_wk7Csgrw" x="-27" y="16"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_2oFEEr9ZEemme_wk7Csgrw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_2oFrIL9ZEemme_wk7Csgrw" x="-28" y="32"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_2oEdAb9ZEemme_wk7Csgrw" fontName="Segoe UI"/>
+ <element xmi:type="henshin:Edge" href="rulesDynamic.henshin#_2oCn0L9ZEemme_wk7Csgrw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_2oEdAr9ZEemme_wk7Csgrw" points="[0, 7, -199, -37]$[0, 44, -199, 0]$[157, 44, -42, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2oJ8kL9ZEemme_wk7Csgrw" id="(0.5081967213114754,0.8333333333333334)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_2oJ8kb9ZEemme_wk7Csgrw" id="(0.6885245901639344,0.7619047619047619)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_58mv4L9ZEemme_wk7Csgrw" type="4001" source="_1PuKAL9ZEemme_wk7Csgrw" target="_2A5IQL9ZEemme_wk7Csgrw">
+ <children xmi:type="notation:DecorationNode" xmi:id="_58nW8L9ZEemme_wk7Csgrw" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_58nW8b9ZEemme_wk7Csgrw" x="-1" y="-30"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_58nW8r9ZEemme_wk7Csgrw" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_58n-AL9ZEemme_wk7Csgrw" x="-2" y="-14"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_58mv4b9ZEemme_wk7Csgrw" fontName="Segoe UI"/>
+ <element xmi:type="henshin:Edge" href="rulesDynamic.henshin#_58lhwL9ZEemme_wk7Csgrw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_58mv4r9ZEemme_wk7Csgrw" points="[6, 0, -157, -54]$[163, 0, 0, -54]$[163, 33, 0, -21]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_58roYL9ZEemme_wk7Csgrw" id="(0.9016393442622951,0.3333333333333333)"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin
new file mode 100644
index 0000000..09d9e85
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<henshin:Module xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmi:id="_Py1cUL9aEemvZa0qyWhzpg">
+ <imports href="www.boxing.com#/"/>
+ <units xsi:type="henshin:Rule" xmi:id="_QQH1QL9aEemvZa0qyWhzpg" name="addItemToBox">
+ <lhs xmi:id="_QQQYIL9aEemvZa0qyWhzpg" name="Lhs">
+ <nodes xmi:id="_Vu1gsL9aEemvZa0qyWhzpg" name="b">
+ <type href="www.boxing.com#//Box"/>
+ </nodes>
+ <nodes xmi:id="_WVcNsL9aEemvZa0qyWhzpg" name="i">
+ <type href="www.boxing.com#//Item"/>
+ </nodes>
+ <formula xsi:type="henshin:Not" xmi:id="_Xu_akL9aEemvZa0qyWhzpg">
+ <child xsi:type="henshin:NestedCondition" xmi:id="_Xu_akb9aEemvZa0qyWhzpg">
+ <conclusion xmi:id="_Xu_akr9aEemvZa0qyWhzpg">
+ <nodes xmi:id="_XvABoL9aEemvZa0qyWhzpg" name="b" outgoing="_XG5f0L9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Box"/>
+ </nodes>
+ <nodes xmi:id="_XvABor9aEemvZa0qyWhzpg" name="i" incoming="_XG5f0L9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Item"/>
+ </nodes>
+ <edges xmi:id="_XG5f0L9aEemvZa0qyWhzpg" source="_XvABoL9aEemvZa0qyWhzpg" target="_XvABor9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Box/stores"/>
+ </edges>
+ </conclusion>
+ <mappings xmi:id="_XvABob9aEemvZa0qyWhzpg" origin="_Vu1gsL9aEemvZa0qyWhzpg" image="_XvABoL9aEemvZa0qyWhzpg"/>
+ <mappings xmi:id="_XvABo79aEemvZa0qyWhzpg" origin="_WVcNsL9aEemvZa0qyWhzpg" image="_XvABor9aEemvZa0qyWhzpg"/>
+ </child>
+ </formula>
+ </lhs>
+ <rhs xmi:id="_QQQYIb9aEemvZa0qyWhzpg" name="Rhs">
+ <nodes xmi:id="_Vu2HwL9aEemvZa0qyWhzpg" name="b" outgoing="_YNyPYL9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Box"/>
+ </nodes>
+ <nodes xmi:id="_WVcNsb9aEemvZa0qyWhzpg" name="i" incoming="_YNyPYL9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Item"/>
+ </nodes>
+ <edges xmi:id="_YNyPYL9aEemvZa0qyWhzpg" source="_Vu2HwL9aEemvZa0qyWhzpg" target="_WVcNsb9aEemvZa0qyWhzpg">
+ <type href="www.boxing.com#//Box/stores"/>
+ </edges>
+ </rhs>
+ <mappings xmi:id="_Vu2u0L9aEemvZa0qyWhzpg" origin="_Vu1gsL9aEemvZa0qyWhzpg" image="_Vu2HwL9aEemvZa0qyWhzpg"/>
+ <mappings xmi:id="_WVc0wL9aEemvZa0qyWhzpg" origin="_WVcNsL9aEemvZa0qyWhzpg" image="_WVcNsb9aEemvZa0qyWhzpg"/>
+ </units>
+</henshin:Module>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin_diagram b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin_diagram
new file mode 100644
index 0000000..485588c
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/rulesStatic.henshin_diagram
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:henshin="http://www.eclipse.org/emf/2011/Henshin" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmi:id="_Py2DYL9aEemvZa0qyWhzpg" type="Henshin" name="rulesStatic.henshin_diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_QQNU0L9aEemvZa0qyWhzpg" type="2001" fontName="Segoe UI" italic="true" lineColor="0">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Vu3V4L9aEemvZa0qyWhzpg" source="defaultAction">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Vu3V4b9aEemvZa0qyWhzpg" key="value" value="preserve"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QQN74L9aEemvZa0qyWhzpg" type="5001"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_QQN74b9aEemvZa0qyWhzpg" type="7001">
+ <children xmi:type="notation:Shape" xmi:id="_Vu5yIL9aEemvZa0qyWhzpg" type="3001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Vu6ZML9aEemvZa0qyWhzpg" type="5002"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Vu7AQL9aEemvZa0qyWhzpg" type="5003"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Vu7AQb9aEemvZa0qyWhzpg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Vu7AQr9aEemvZa0qyWhzpg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Vu7AQ79aEemvZa0qyWhzpg"/>
+ </children>
+ <element xmi:type="henshin:Node" href="rulesStatic.henshin#_Vu1gsL9aEemvZa0qyWhzpg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Vu5yIb9aEemvZa0qyWhzpg" x="58" y="37"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_WVep8L9aEemvZa0qyWhzpg" type="3001" fontName="Segoe UI">
+ <children xmi:type="notation:DecorationNode" xmi:id="_WVfRAL9aEemvZa0qyWhzpg" type="5002"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_WVfRAb9aEemvZa0qyWhzpg" type="5003"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_WVf4EL9aEemvZa0qyWhzpg" type="7002">
+ <styles xmi:type="notation:SortingStyle" xmi:id="_WVf4Eb9aEemvZa0qyWhzpg"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_WVf4Er9aEemvZa0qyWhzpg"/>
+ </children>
+ <element xmi:type="henshin:Node" href="rulesStatic.henshin#_WVcNsL9aEemvZa0qyWhzpg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WVep8b9aEemvZa0qyWhzpg" x="249" y="88"/>
+ </children>
+ </children>
+ <element xmi:type="henshin:Rule" href="rulesStatic.henshin#_QQH1QL9aEemvZa0qyWhzpg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_QQNU0b9aEemvZa0qyWhzpg" x="108" y="111" width="365"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_Py2DYb9aEemvZa0qyWhzpg"/>
+ <element xmi:type="henshin:Module" href="rulesStatic.henshin#_Py1cUL9aEemvZa0qyWhzpg"/>
+ <edges xmi:type="notation:Connector" xmi:id="_XG9KML9aEemvZa0qyWhzpg" type="4001" source="_Vu5yIL9aEemvZa0qyWhzpg" target="_WVep8L9aEemvZa0qyWhzpg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_XG-YUL9aEemvZa0qyWhzpg" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XG-YUb9aEemvZa0qyWhzpg" x="-26" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_XG-YUr9aEemvZa0qyWhzpg" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XG-_YL9aEemvZa0qyWhzpg" x="-26" y="34"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_XG9KMb9aEemvZa0qyWhzpg" fontName="Segoe UI"/>
+ <element xmi:type="henshin:Edge" href="rulesStatic.henshin#_XG5f0L9aEemvZa0qyWhzpg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_XG9KMr9aEemvZa0qyWhzpg" points="[0, 21, -207, -37]$[0, 58, -207, 0]$[161, 58, -46, 0]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_XHFtEL9aEemvZa0qyWhzpg" id="(0.7540983606557377,0.6666666666666666)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_YN0EkL9aEemvZa0qyWhzpg" type="4001" source="_Vu5yIL9aEemvZa0qyWhzpg" target="_WVep8L9aEemvZa0qyWhzpg">
+ <children xmi:type="notation:DecorationNode" xmi:id="_YN0roL9aEemvZa0qyWhzpg" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YN0rob9aEemvZa0qyWhzpg" x="21" y="-30"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_YN1SsL9aEemvZa0qyWhzpg" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YN1Ssb9aEemvZa0qyWhzpg" x="18" y="-15"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_YN0Ekb9aEemvZa0qyWhzpg" fontName="Segoe UI"/>
+ <element xmi:type="henshin:Edge" href="rulesStatic.henshin#_YNyPYL9aEemvZa0qyWhzpg"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_YN0Ekr9aEemvZa0qyWhzpg" points="[31, -8, -161, -40]$[192, -8, 0, -40]$[192, 30, 0, -2]"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_YN6LML9aEemvZa0qyWhzpg" id="(0.5081967213114754,0.047619047619047616)"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/simpleModel.xmi b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/simpleModel.xmi
new file mode 100644
index 0000000..bacf598
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/models/simpleModel.xmi
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="ASCII"?>
+<boxing:Boxing xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:boxing="www.boxing.com"/>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/storedItem.xmi b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/storedItem.xmi
new file mode 100644
index 0000000..de61d77
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/storedItem.xmi
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<boxing:Boxing
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:boxing="www.boxing.com">
+ <boxes stores="//@items.0"/>
+ <items isStoredBy="//@boxes.0"/>
+</boxing:Boxing>
diff --git a/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/unstoredItem.xmi b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/unstoredItem.xmi
new file mode 100644
index 0000000..22854c9
--- /dev/null
+++ b/plugins/org.eclipse.emf.henshin.examples/src/org/eclipse/emf/henshin/examples/apibasics/testModels/unstoredItem.xmi
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<boxing:Boxing xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:boxing="www.boxing.com">
+ <boxes/>
+ <items/>
+</boxing:Boxing>
diff --git a/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend b/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
index 1b3ce97..8ddb537 100644
--- a/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
+++ b/plugins/org.eclipse.emf.henshin.text/src/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.xtend
@@ -959,7 +959,7 @@
if(wrongType){
error("Edgetype "+edge.type.name+" does not exist.'",edge, Henshin_textPackage::eINSTANCE.conditionEdge_Type)
}
- if(referenceType!=targetType){
+ if(referenceType!=targetType && !targetType.getEAllSuperTypes().contains(referenceType)){
error("Edge "+sourceType.name+"->"+targetType.name+":"+edge.type.name+" does not exist.'",edge, Henshin_textPackage::eINSTANCE.conditionEdge_Type)
}
}
diff --git a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
index 021abc1..c08c78c 100644
--- a/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
+++ b/plugins/org.eclipse.emf.henshin.text/xtend-gen/org/eclipse/emf/henshin/text/validation/Henshin_textValidator.java
@@ -13,10 +13,7 @@
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EClassifier;
-import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.henshin.text.henshin_text.AndExpression;
import org.eclipse.emf.henshin.text.henshin_text.Attribute;
@@ -24,7 +21,6 @@
import org.eclipse.emf.henshin.text.henshin_text.ComparisonExpression;
import org.eclipse.emf.henshin.text.henshin_text.ConditionEdge;
import org.eclipse.emf.henshin.text.henshin_text.ConditionGraph;
-import org.eclipse.emf.henshin.text.henshin_text.ConditionGraphElements;
import org.eclipse.emf.henshin.text.henshin_text.ConditionGraphRef;
import org.eclipse.emf.henshin.text.henshin_text.ConditionNode;
import org.eclipse.emf.henshin.text.henshin_text.ConditionNodeTypes;
@@ -37,7 +33,6 @@
import org.eclipse.emf.henshin.text.henshin_text.Expression;
import org.eclipse.emf.henshin.text.henshin_text.Formula;
import org.eclipse.emf.henshin.text.henshin_text.Graph;
-import org.eclipse.emf.henshin.text.henshin_text.GraphElements;
import org.eclipse.emf.henshin.text.henshin_text.Henshin_textPackage;
import org.eclipse.emf.henshin.text.henshin_text.IndependentUnit;
import org.eclipse.emf.henshin.text.henshin_text.IntegerValue;
@@ -50,7 +45,6 @@
import org.eclipse.emf.henshin.text.henshin_text.Match;
import org.eclipse.emf.henshin.text.henshin_text.MinusExpression;
import org.eclipse.emf.henshin.text.henshin_text.Model;
-import org.eclipse.emf.henshin.text.henshin_text.ModelElement;
import org.eclipse.emf.henshin.text.henshin_text.MulOrDivExpression;
import org.eclipse.emf.henshin.text.henshin_text.MultiRule;
import org.eclipse.emf.henshin.text.henshin_text.MultiRuleReuseNode;
@@ -60,14 +54,11 @@
import org.eclipse.emf.henshin.text.henshin_text.OrExpression;
import org.eclipse.emf.henshin.text.henshin_text.Parameter;
import org.eclipse.emf.henshin.text.henshin_text.ParameterKind;
-import org.eclipse.emf.henshin.text.henshin_text.ParameterType;
import org.eclipse.emf.henshin.text.henshin_text.ParameterValue;
import org.eclipse.emf.henshin.text.henshin_text.PlusExpression;
import org.eclipse.emf.henshin.text.henshin_text.PriorityUnit;
import org.eclipse.emf.henshin.text.henshin_text.Rule;
-import org.eclipse.emf.henshin.text.henshin_text.RuleElement;
import org.eclipse.emf.henshin.text.henshin_text.RuleNodeTypes;
-import org.eclipse.emf.henshin.text.henshin_text.Type;
import org.eclipse.emf.henshin.text.henshin_text.Unit;
import org.eclipse.emf.henshin.text.henshin_text.UnitElement;
import org.eclipse.emf.henshin.text.henshin_text.impl.ANDImpl;
@@ -109,51 +100,33 @@
*/
@Check
public void checkCallParameter(final Call call) {
- ModelElement _elementCall = call.getElementCall();
- EList<Parameter> _parameters = _elementCall.getParameters();
final Function1<Parameter, Boolean> _function = (Parameter it) -> {
ParameterKind _kind = it.getKind();
return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
};
- Iterable<Parameter> _filter = IterableExtensions.<Parameter>filter(_parameters, _function);
- int _size = IterableExtensions.size(_filter);
- EList<Parameter> _parameters_1 = call.getParameters();
- int _size_1 = _parameters_1.size();
+ int _size = IterableExtensions.size(IterableExtensions.<Parameter>filter(call.getElementCall().getParameters(), _function));
+ int _size_1 = call.getParameters().size();
boolean _notEquals = (_size != _size_1);
if (_notEquals) {
- EReference _call_ElementCall = Henshin_textPackage.eINSTANCE.getCall_ElementCall();
- this.error("Bad Parameter Count.\'", _call_ElementCall);
+ this.error("Bad Parameter Count.\'", Henshin_textPackage.eINSTANCE.getCall_ElementCall());
} else {
for (int i = 0; (i < IterableExtensions.size(IterableExtensions.<Parameter>filter(call.getElementCall().getParameters(), ((Function1<Parameter, Boolean>) (Parameter it) -> {
ParameterKind _kind = it.getKind();
return Boolean.valueOf((!Objects.equal(_kind, ParameterKind.VAR)));
})))); i++) {
{
- ModelElement _elementCall_1 = call.getElementCall();
- EList<Parameter> _parameters_2 = _elementCall_1.getParameters();
- final Parameter param = _parameters_2.get(i);
- ParameterType _type = param.getType();
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_type);
- EList<Parameter> _parameters_3 = call.getParameters();
- Parameter _get = _parameters_3.get(i);
- ParameterType _type_1 = _get.getType();
- Henshin_textType _typeFor_1 = this._henshin_textTypeProvider.typeFor(_type_1);
+ final Parameter param = call.getElementCall().getParameters().get(i);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(param.getType());
+ Henshin_textType _typeFor_1 = this._henshin_textTypeProvider.typeFor(call.getParameters().get(i).getType());
boolean _notEquals_1 = (!Objects.equal(_typeFor, _typeFor_1));
if (_notEquals_1) {
- ParameterType _type_2 = param.getType();
- Henshin_textType _typeFor_2 = this._henshin_textTypeProvider.typeFor(_type_2);
- String _string = _typeFor_2.toString();
+ String _string = this._henshin_textTypeProvider.typeFor(param.getType()).toString();
String _plus = ("Call expected " + _string);
String _plus_1 = (_plus + " type, but was ");
- EList<Parameter> _parameters_4 = call.getParameters();
- Parameter _get_1 = _parameters_4.get(i);
- ParameterType _type_3 = _get_1.getType();
- Henshin_textType _typeFor_3 = this._henshin_textTypeProvider.typeFor(_type_3);
- String _string_1 = _typeFor_3.toString();
+ String _string_1 = this._henshin_textTypeProvider.typeFor(call.getParameters().get(i).getType()).toString();
String _plus_2 = (_plus_1 + _string_1);
String _plus_3 = (_plus_2 + ".\'");
- EReference _call_Parameters = Henshin_textPackage.eINSTANCE.getCall_Parameters();
- this.error(_plus_3, call, _call_Parameters);
+ this.error(_plus_3, call, Henshin_textPackage.eINSTANCE.getCall_Parameters());
}
}
}
@@ -192,17 +165,13 @@
RuleNodeTypes _source_1 = edge.getSource();
if ((_source_1 instanceof Node)) {
RuleNodeTypes _source_2 = edge.getSource();
- EClass _nodetype = ((Node) _source_2).getNodetype();
- sourceType = _nodetype;
+ sourceType = ((Node) _source_2).getNodetype();
} else {
try {
RuleNodeTypes _source_3 = edge.getSource();
- Node _name = ((MultiRuleReuseNode) _source_3).getName();
- EClass _nodetype_1 = _name.getNodetype();
- sourceType = _nodetype_1;
+ sourceType = ((MultiRuleReuseNode) _source_3).getName().getNodetype();
} catch (final Throwable _t) {
if (_t instanceof ClassCastException) {
- final ClassCastException e = (ClassCastException)_t;
sourceType = null;
} else {
throw Exceptions.sneakyThrow(_t);
@@ -216,20 +185,16 @@
RuleNodeTypes _target_1 = edge.getTarget();
if ((_target_1 instanceof Node)) {
RuleNodeTypes _target_2 = edge.getTarget();
- EClass _nodetype_2 = ((Node) _target_2).getNodetype();
- targetType = _nodetype_2;
+ targetType = ((Node) _target_2).getNodetype();
} else {
try {
RuleNodeTypes _target_3 = edge.getTarget();
- Node _name_1 = ((MultiRuleReuseNode) _target_3).getName();
- EClass _nodetype_3 = _name_1.getNodetype();
- targetType = _nodetype_3;
- } catch (final Throwable _t_1) {
- if (_t_1 instanceof ClassCastException) {
- final ClassCastException e_1 = (ClassCastException)_t_1;
+ targetType = ((MultiRuleReuseNode) _target_3).getName().getNodetype();
+ } catch (final Throwable _t) {
+ if (_t instanceof ClassCastException) {
targetType = null;
} else {
- throw Exceptions.sneakyThrow(_t_1);
+ throw Exceptions.sneakyThrow(_t);
}
}
}
@@ -239,37 +204,31 @@
EClass referenceType = null;
EList<EReference> _eAllReferences = sourceType.getEAllReferences();
for (final EReference reference : _eAllReferences) {
- EReference _type = edge.getType();
- String _name_2 = _type.getName();
- String _name_3 = reference.getName();
- boolean _equals = Objects.equal(_name_2, _name_3);
+ String _name = edge.getType().getName();
+ String _name_1 = reference.getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
wrongType = false;
- EClass _eReferenceType = reference.getEReferenceType();
- referenceType = _eReferenceType;
+ referenceType = reference.getEReferenceType();
}
}
if (wrongType) {
- EReference _type_1 = edge.getType();
- String _name_4 = _type_1.getName();
- String _plus = ("Edgetype " + _name_4);
+ String _name_2 = edge.getType().getName();
+ String _plus = ("Edgetype " + _name_2);
String _plus_1 = (_plus + " does not exist.\'");
- EReference _edge_Type = Henshin_textPackage.eINSTANCE.getEdge_Type();
- this.error(_plus_1, edge, _edge_Type);
+ this.error(_plus_1, edge, Henshin_textPackage.eINSTANCE.getEdge_Type());
}
if (((!Objects.equal(referenceType, targetType)) && (!targetType.getEAllSuperTypes().contains(referenceType)))) {
- String _name_5 = sourceType.getName();
- String _plus_2 = ("Edge " + _name_5);
+ String _name_3 = sourceType.getName();
+ String _plus_2 = ("Edge " + _name_3);
String _plus_3 = (_plus_2 + "->");
- String _name_6 = targetType.getName();
- String _plus_4 = (_plus_3 + _name_6);
+ String _name_4 = targetType.getName();
+ String _plus_4 = (_plus_3 + _name_4);
String _plus_5 = (_plus_4 + ":");
- EReference _type_2 = edge.getType();
- String _name_7 = _type_2.getName();
- String _plus_6 = (_plus_5 + _name_7);
+ String _name_5 = edge.getType().getName();
+ String _plus_6 = (_plus_5 + _name_5);
String _plus_7 = (_plus_6 + " does not exist.\'");
- EReference _edge_Type_1 = Henshin_textPackage.eINSTANCE.getEdge_Type();
- this.error(_plus_7, edge, _edge_Type_1);
+ this.error(_plus_7, edge, Henshin_textPackage.eINSTANCE.getEdge_Type());
}
}
}
@@ -284,21 +243,16 @@
boolean isImported = false;
List<EPackageImport> _ePackageImports = this.getEPackageImports(node);
for (final EPackageImport ePackage : _ePackageImports) {
- EPackage _ref = ePackage.getRef();
- EList<EClassifier> _eClassifiers = _ref.getEClassifiers();
- EClass _nodetype = node.getNodetype();
- boolean _contains = _eClassifiers.contains(_nodetype);
+ boolean _contains = ePackage.getRef().getEClassifiers().contains(node.getNodetype());
if (_contains) {
isImported = true;
}
}
if ((!isImported)) {
- EClass _nodetype_1 = node.getNodetype();
- String _name = _nodetype_1.getName();
+ String _name = node.getNodetype().getName();
String _plus = ("Nodetype " + _name);
String _plus_1 = (_plus + " is not imported.\'");
- EReference _node_Nodetype = Henshin_textPackage.eINSTANCE.getNode_Nodetype();
- this.error(_plus_1, node, _node_Nodetype);
+ this.error(_plus_1, node, Henshin_textPackage.eINSTANCE.getNode_Nodetype());
}
}
@@ -309,12 +263,10 @@
List<EPackageImport> listOfEPackageImport = new ArrayList<EPackageImport>();
EObject container = startObject.eContainer();
while ((!(container instanceof Model))) {
- EObject _eContainer = container.eContainer();
- container = _eContainer;
+ container = container.eContainer();
}
if ((container instanceof Model)) {
- EList<EPackageImport> _ePackageimports = ((Model) container).getEPackageimports();
- listOfEPackageImport.addAll(_ePackageimports);
+ listOfEPackageImport.addAll(((Model) container).getEPackageimports());
}
return listOfEPackageImport;
}
@@ -330,32 +282,23 @@
for (final Attribute attribute : _attribute) {
{
boolean superTypeAttribute = false;
- EClass _nodetype = node.getNodetype();
- EList<EAttribute> _eAttributes = _nodetype.getEAttributes();
- EAttribute _name = attribute.getName();
- boolean _contains = _eAttributes.contains(_name);
+ boolean _contains = node.getNodetype().getEAttributes().contains(attribute.getName());
boolean _not = (!_contains);
if (_not) {
- EClass _nodetype_1 = node.getNodetype();
- EList<EClass> _eAllSuperTypes = _nodetype_1.getEAllSuperTypes();
+ EList<EClass> _eAllSuperTypes = node.getNodetype().getEAllSuperTypes();
for (final EClass supertype : _eAllSuperTypes) {
- EList<EAttribute> _eAttributes_1 = supertype.getEAttributes();
- EAttribute _name_1 = attribute.getName();
- boolean _contains_1 = _eAttributes_1.contains(_name_1);
+ boolean _contains_1 = supertype.getEAttributes().contains(attribute.getName());
if (_contains_1) {
superTypeAttribute = true;
}
}
if ((!superTypeAttribute)) {
- EClass _nodetype_2 = node.getNodetype();
- String _name_2 = _nodetype_2.getName();
- String _plus = (_name_2 + " has no attribute \'");
- EAttribute _name_3 = attribute.getName();
- String _name_4 = _name_3.getName();
- String _plus_1 = (_plus + _name_4);
+ String _name = node.getNodetype().getName();
+ String _plus = (_name + " has no attribute \'");
+ String _name_1 = attribute.getName().getName();
+ String _plus_1 = (_plus + _name_1);
String _plus_2 = (_plus_1 + "\'.\'");
- EReference _attribute_Name = Henshin_textPackage.eINSTANCE.getAttribute_Name();
- this.error(_plus_2, attribute, _attribute_Name);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Name());
}
}
}
@@ -371,18 +314,13 @@
public void checkattributeOnlyOnce(final Node node) {
for (int i = 0; (i < node.getAttribute().size()); i++) {
{
- EList<Attribute> _attribute = node.getAttribute();
- Attribute attribute = _attribute.get(i);
+ Attribute attribute = node.getAttribute().get(i);
for (int j = (i + 1); (j < node.getAttribute().size()); j++) {
if ((Objects.equal(attribute.getName(), node.getAttribute().get(j).getName()) && Objects.equal(attribute.getUpdate(), node.getAttribute().get(j).getUpdate()))) {
- EAttribute _name = attribute.getName();
- String _name_1 = _name.getName();
- String _plus = ("\'" + _name_1);
+ String _name = attribute.getName().getName();
+ String _plus = ("\'" + _name);
String _plus_1 = (_plus + "\' can only be used once.\'");
- EList<Attribute> _attribute_1 = node.getAttribute();
- Attribute _get = _attribute_1.get(j);
- EReference _attribute_Name = Henshin_textPackage.eINSTANCE.getAttribute_Name();
- this.error(_plus_1, _get, _attribute_Name);
+ this.error(_plus_1, node.getAttribute().get(j), Henshin_textPackage.eINSTANCE.getAttribute_Name());
}
}
}
@@ -397,8 +335,7 @@
@Check
public void checkAbstractNode(final Node node) {
if ((node.getNodetype().isAbstract() && Objects.equal(node.getActiontype(), "create"))) {
- EReference _node_Nodetype = Henshin_textPackage.eINSTANCE.getNode_Nodetype();
- this.error("Node of abstract type cannot be created.\'", node, _node_Nodetype);
+ this.error("Node of abstract type cannot be created.\'", node, Henshin_textPackage.eINSTANCE.getNode_Nodetype());
}
}
@@ -418,10 +355,8 @@
EList<Attribute> _attribute_1 = node.getAttribute();
for (final Attribute checkAttribute : _attribute_1) {
if ((((!Objects.equal(checkAttribute, attribute)) && Objects.equal(attribute.getName(), checkAttribute.getName())) && ((!Objects.equal(checkAttribute.getUpdate(), null)) || Objects.equal(checkAttribute.getActiontype(), "create")))) {
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error("Duplicate update.\'", attribute, _attribute_Update);
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error("Duplicate update.\'", checkAttribute, _attribute_Actiontype);
+ this.error("Duplicate update.\'", attribute, Henshin_textPackage.eINSTANCE.getAttribute_Update());
+ this.error("Duplicate update.\'", checkAttribute, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
}
}
@@ -450,12 +385,10 @@
}
}
if ((!matchExist)) {
- EAttribute _name = attribute.getName();
- String _name_1 = _name.getName();
- String _plus = ("Preserve-attribute " + _name_1);
+ String _name = attribute.getName().getName();
+ String _plus = ("Preserve-attribute " + _name);
String _plus_1 = (_plus + " needed.\'");
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error(_plus_1, attribute, _attribute_Update);
+ this.error(_plus_1, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Update());
}
}
}
@@ -481,8 +414,7 @@
String _actiontype_2 = node.getActiontype();
String _plus_1 = (_plus + _actiontype_2);
String _plus_2 = (_plus_1 + "-nodes.\'");
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_2, attribute, _attribute_Actiontype);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
String _update = attribute.getUpdate();
boolean _notEquals = (!Objects.equal(_update, null));
@@ -490,8 +422,7 @@
String _actiontype_3 = node.getActiontype();
String _plus_3 = ("set-attributes are not allowed in " + _actiontype_3);
String _plus_4 = (_plus_3 + "-nodes. \'");
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error(_plus_4, attribute, _attribute_Update);
+ this.error(_plus_4, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Update());
}
}
}
@@ -508,8 +439,7 @@
String _actiontype_3 = node.getActiontype();
String _plus_1 = (_plus + _actiontype_3);
String _plus_2 = (_plus_1 + "-nodes.\'");
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_2, attribute_1, _attribute_Actiontype);
+ this.error(_plus_2, attribute_1, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
String _update = attribute_1.getUpdate();
boolean _notEquals = (!Objects.equal(_update, null));
@@ -517,8 +447,7 @@
String _actiontype_4 = node.getActiontype();
String _plus_3 = ("set-attributes are not allowed in " + _actiontype_4);
String _plus_4 = (_plus_3 + "-nodes.\'");
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error(_plus_4, attribute_1, _attribute_Update);
+ this.error(_plus_4, attribute_1, Henshin_textPackage.eINSTANCE.getAttribute_Update());
}
}
}
@@ -535,8 +464,7 @@
String _actiontype_4 = node.getActiontype();
String _plus_1 = (_plus + _actiontype_4);
String _plus_2 = (_plus_1 + "-nodes.\'");
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_2, attribute_2, _attribute_Actiontype);
+ this.error(_plus_2, attribute_2, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
String _update = attribute_2.getUpdate();
boolean _notEquals = (!Objects.equal(_update, null));
@@ -544,8 +472,7 @@
String _actiontype_5 = node.getActiontype();
String _plus_3 = ("set-attributes are not allowed in " + _actiontype_5);
String _plus_4 = (_plus_3 + "-nodes.\'");
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error(_plus_4, attribute_2, _attribute_Update);
+ this.error(_plus_4, attribute_2, Henshin_textPackage.eINSTANCE.getAttribute_Update());
}
}
}
@@ -562,8 +489,7 @@
String _actiontype_5 = node.getActiontype();
String _plus_1 = (_plus + _actiontype_5);
String _plus_2 = (_plus_1 + "-nodes.\'");
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_2, attribute_3, _attribute_Actiontype);
+ this.error(_plus_2, attribute_3, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
String _update = attribute_3.getUpdate();
boolean _notEquals = (!Objects.equal(_update, null));
@@ -571,8 +497,7 @@
String _actiontype_6 = node.getActiontype();
String _plus_3 = ("set-attributes are not allowed in " + _actiontype_6);
String _plus_4 = (_plus_3 + "-nodes.\'");
- EAttribute _attribute_Update = Henshin_textPackage.eINSTANCE.getAttribute_Update();
- this.error(_plus_4, attribute_3, _attribute_Update);
+ this.error(_plus_4, attribute_3, Henshin_textPackage.eINSTANCE.getAttribute_Update());
}
}
}
@@ -598,11 +523,9 @@
} else {
try {
RuleNodeTypes _source_2 = edge.getSource();
- Node _name = ((MultiRuleReuseNode) _source_2).getName();
- source = _name;
+ source = ((MultiRuleReuseNode) _source_2).getName();
} catch (final Throwable _t) {
if (_t instanceof ClassCastException) {
- final ClassCastException e = (ClassCastException)_t;
target = null;
} else {
throw Exceptions.sneakyThrow(_t);
@@ -616,14 +539,12 @@
} else {
try {
RuleNodeTypes _target_2 = edge.getTarget();
- Node _name_1 = ((MultiRuleReuseNode) _target_2).getName();
- target = _name_1;
- } catch (final Throwable _t_1) {
- if (_t_1 instanceof ClassCastException) {
- final ClassCastException e_1 = (ClassCastException)_t_1;
+ target = ((MultiRuleReuseNode) _target_2).getName();
+ } catch (final Throwable _t) {
+ if (_t instanceof ClassCastException) {
target = null;
} else {
- throw Exceptions.sneakyThrow(_t_1);
+ throw Exceptions.sneakyThrow(_t);
}
}
}
@@ -645,12 +566,10 @@
}
if ((Objects.equal(edge.getActiontype(), "preserve") || Objects.equal(edge.getActiontype(), null))) {
if (((Objects.equal(source.getActiontype(), "preserve") || Objects.equal(source.getActiontype(), null)) && ((!Objects.equal(target.getActiontype(), "preserve")) && (!Objects.equal(target.getActiontype(), null))))) {
- EAttribute _edge_Actiontype = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
} else {
if (((!Objects.equal(source.getActiontype(), "preserve")) && (!Objects.equal(source.getActiontype(), null)))) {
- EAttribute _edge_Actiontype_1 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_1);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
}
}
} else {
@@ -658,12 +577,10 @@
boolean _equals_3 = Objects.equal(_actiontype, "create");
if (_equals_3) {
if ((((Objects.equal(source.getActiontype(), null) || Objects.equal(source.getActiontype(), "preserve")) || Objects.equal(source.getActiontype(), "create")) && (((!Objects.equal(target.getActiontype(), null)) && (!Objects.equal(target.getActiontype(), "preserve"))) && (!Objects.equal(target.getActiontype(), "create"))))) {
- EAttribute _edge_Actiontype_2 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_2);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
} else {
if ((((!Objects.equal(source.getActiontype(), null)) && (!Objects.equal(source.getActiontype(), "preserve"))) && (!Objects.equal(source.getActiontype(), "create")))) {
- EAttribute _edge_Actiontype_3 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_3);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
}
}
} else {
@@ -671,12 +588,10 @@
boolean _equals_4 = Objects.equal(_actiontype_1, "delete");
if (_equals_4) {
if ((((Objects.equal(source.getActiontype(), null) || Objects.equal(source.getActiontype(), "preserve")) || Objects.equal(source.getActiontype(), "delete")) && (((!Objects.equal(target.getActiontype(), null)) && (!Objects.equal(target.getActiontype(), "preserve"))) && (!Objects.equal(target.getActiontype(), "delete"))))) {
- EAttribute _edge_Actiontype_4 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_4);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
} else {
if ((((!Objects.equal(source.getActiontype(), null)) && (!Objects.equal(source.getActiontype(), "preserve"))) && (!Objects.equal(source.getActiontype(), "delete")))) {
- EAttribute _edge_Actiontype_5 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_5);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
}
}
} else {
@@ -684,12 +599,10 @@
boolean _equals_5 = Objects.equal(_actiontype_2, "forbid");
if (_equals_5) {
if (((((Objects.equal(source.getActiontype(), null) || Objects.equal(source.getActiontype(), "preserve")) || Objects.equal(source.getActiontype(), "delete")) || Objects.equal(source.getActiontype(), "forbid")) && (Objects.equal(target.getActiontype(), "create") || Objects.equal(target.getActiontype(), "require")))) {
- EAttribute _edge_Actiontype_6 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_6);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
} else {
if ((Objects.equal(source.getActiontype(), "create") || Objects.equal(source.getActiontype(), "require"))) {
- EAttribute _edge_Actiontype_7 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_7);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
}
}
} else {
@@ -697,12 +610,10 @@
boolean _equals_6 = Objects.equal(_actiontype_3, "require");
if (_equals_6) {
if (((((Objects.equal(source.getActiontype(), null) || Objects.equal(source.getActiontype(), "preserve")) || Objects.equal(source.getActiontype(), "delete")) || Objects.equal(source.getActiontype(), "require")) && (Objects.equal(target.getActiontype(), "create") || Objects.equal(target.getActiontype(), "forbid")))) {
- EAttribute _edge_Actiontype_8 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_8);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
} else {
if ((Objects.equal(source.getActiontype(), "create") || Objects.equal(source.getActiontype(), "forbid"))) {
- EAttribute _edge_Actiontype_9 = Henshin_textPackage.eINSTANCE.getEdge_Actiontype();
- this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, _edge_Actiontype_9);
+ this.error((((((("A " + edgetype) + "-edge is not allowed between a ") + sourcetype) + "-node and a ") + tagettype) + "-node.\'"), edge, Henshin_textPackage.eINSTANCE.getEdge_Actiontype());
}
}
}
@@ -720,8 +631,7 @@
*/
@Check
public void checkCountGraph(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<GraphImpl> iterableOfGraphImpl = Iterables.<GraphImpl>filter(_ruleElements, GraphImpl.class);
+ Iterable<GraphImpl> iterableOfGraphImpl = Iterables.<GraphImpl>filter(rule.getRuleElements(), GraphImpl.class);
int _size = IterableExtensions.size(iterableOfGraphImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -738,8 +648,7 @@
String _name_1 = rule.getName();
String _plus_2 = ("No graph in rule " + _name_1);
String _plus_3 = (_plus_2 + ".\'");
- EReference _rule_RuleElements = Henshin_textPackage.eINSTANCE.getRule_RuleElements();
- this.error(_plus_3, rule, _rule_RuleElements);
+ this.error(_plus_3, rule, Henshin_textPackage.eINSTANCE.getRule_RuleElements());
}
}
}
@@ -751,8 +660,7 @@
*/
@Check
public void checkCountCheckDangling(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<CheckDanglingImpl> iterableOfCheckDanglingImpl = Iterables.<CheckDanglingImpl>filter(_ruleElements, CheckDanglingImpl.class);
+ Iterable<CheckDanglingImpl> iterableOfCheckDanglingImpl = Iterables.<CheckDanglingImpl>filter(rule.getRuleElements(), CheckDanglingImpl.class);
int _size = IterableExtensions.size(iterableOfCheckDanglingImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -769,8 +677,7 @@
*/
@Check
public void checkCountInjectiveMatching(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<InjectiveMatchingImpl> iterableOfInjectiveMatchingImpl = Iterables.<InjectiveMatchingImpl>filter(_ruleElements, InjectiveMatchingImpl.class);
+ Iterable<InjectiveMatchingImpl> iterableOfInjectiveMatchingImpl = Iterables.<InjectiveMatchingImpl>filter(rule.getRuleElements(), InjectiveMatchingImpl.class);
int _size = IterableExtensions.size(iterableOfInjectiveMatchingImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -787,8 +694,7 @@
*/
@Check
public void checkCountCondition(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<ConditionsImpl> iterableOfConditionsImpl = Iterables.<ConditionsImpl>filter(_ruleElements, ConditionsImpl.class);
+ Iterable<ConditionsImpl> iterableOfConditionsImpl = Iterables.<ConditionsImpl>filter(rule.getRuleElements(), ConditionsImpl.class);
int _size = IterableExtensions.size(iterableOfConditionsImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -805,15 +711,13 @@
*/
@Check
public void checkJavaImport(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(_ruleElements, JavaImportImpl.class);
+ Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getRuleElements(), JavaImportImpl.class);
for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
- String _packagename = javaImport.getPackagename();
- Package _package = Package.getPackage(_packagename);
+ Package _package = Package.getPackage(javaImport.getPackagename());
boolean _equals = Objects.equal(_package, null);
if (_equals) {
- String _packagename_1 = javaImport.getPackagename();
- String _plus = ("Package " + _packagename_1);
+ String _packagename = javaImport.getPackagename();
+ String _plus = ("Package " + _packagename);
String _plus_1 = (_plus + " doesn\'t exist.\'");
this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
}
@@ -827,16 +731,14 @@
*/
@Check
public void checkMultiJavaImport(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(_ruleElements, JavaImportImpl.class);
+ Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getRuleElements(), JavaImportImpl.class);
for (int i = 0; (i < IterableExtensions.size(iterableOfJavaImportImpl)); i++) {
{
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
JavaImportImpl javaImport = ((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl, JavaImportImpl.class))[i];
for (int j = (i + 1); (j < IterableExtensions.size(iterableOfJavaImportImpl)); j++) {
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl_1 = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
- JavaImportImpl _get = ((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_1, JavaImportImpl.class))[j];
- String _packagename = _get.getPackagename();
+ String _packagename = (((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_1, JavaImportImpl.class))[j]).getPackagename();
String _packagename_1 = javaImport.getPackagename();
boolean _equals = Objects.equal(_packagename, _packagename_1);
if (_equals) {
@@ -844,8 +746,7 @@
String _plus = ("Package " + _packagename_2);
String _plus_1 = (_plus + " is already imported.\'");
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl_2 = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
- EObject _get_1 = ((EObject[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_2, EObject.class))[j];
- this.warning(_plus_1, _get_1, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+ this.warning(_plus_1, ((EObject[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_2, EObject.class))[j], Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
}
}
}
@@ -859,15 +760,13 @@
*/
@Check
public void checkJavaImport(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(_multiruleElements, JavaImportImpl.class);
+ Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getMultiruleElements(), JavaImportImpl.class);
for (final JavaImportImpl javaImport : iterableOfJavaImportImpl) {
- String _packagename = javaImport.getPackagename();
- Package _package = Package.getPackage(_packagename);
+ Package _package = Package.getPackage(javaImport.getPackagename());
boolean _equals = Objects.equal(_package, null);
if (_equals) {
- String _packagename_1 = javaImport.getPackagename();
- String _plus = ("Package " + _packagename_1);
+ String _packagename = javaImport.getPackagename();
+ String _plus = ("Package " + _packagename);
String _plus_1 = (_plus + " doesn\'t exist.\'");
this.error(_plus_1, javaImport, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
}
@@ -881,16 +780,14 @@
*/
@Check
public void checkMultiJavaImport(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(_multiruleElements, JavaImportImpl.class);
+ Iterable<JavaImportImpl> iterableOfJavaImportImpl = Iterables.<JavaImportImpl>filter(rule.getMultiruleElements(), JavaImportImpl.class);
for (int i = 0; (i < IterableExtensions.size(iterableOfJavaImportImpl)); i++) {
{
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
JavaImportImpl javaImport = ((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl, JavaImportImpl.class))[i];
for (int j = (i + 1); (j < IterableExtensions.size(iterableOfJavaImportImpl)); j++) {
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl_1 = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
- JavaImportImpl _get = ((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_1, JavaImportImpl.class))[j];
- String _packagename = _get.getPackagename();
+ String _packagename = (((JavaImportImpl[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_1, JavaImportImpl.class))[j]).getPackagename();
String _packagename_1 = javaImport.getPackagename();
boolean _equals = Objects.equal(_packagename, _packagename_1);
if (_equals) {
@@ -898,8 +795,7 @@
String _plus = ("Package " + _packagename_2);
String _plus_1 = (_plus + " is already imported.\'");
final Iterable<JavaImportImpl> _converted_iterableOfJavaImportImpl_2 = (Iterable<JavaImportImpl>)iterableOfJavaImportImpl;
- EObject _get_1 = ((EObject[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_2, EObject.class))[j];
- this.warning(_plus_1, _get_1, Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
+ this.warning(_plus_1, ((EObject[])Conversions.unwrapArray(_converted_iterableOfJavaImportImpl_2, EObject.class))[j], Henshin_textPackage.Literals.JAVA_IMPORT__PACKAGENAME);
}
}
}
@@ -913,8 +809,7 @@
*/
@Check
public void checkCountCondition(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<ConditionsImpl> iterableOfConditionsImpl = Iterables.<ConditionsImpl>filter(_multiruleElements, ConditionsImpl.class);
+ Iterable<ConditionsImpl> iterableOfConditionsImpl = Iterables.<ConditionsImpl>filter(rule.getMultiruleElements(), ConditionsImpl.class);
int _size = IterableExtensions.size(iterableOfConditionsImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -931,8 +826,7 @@
*/
@Check
public void checkCountInjectiveMatching(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<InjectiveMatchingImpl> iterableOfInjectiveMatchingImpl = Iterables.<InjectiveMatchingImpl>filter(_multiruleElements, InjectiveMatchingImpl.class);
+ Iterable<InjectiveMatchingImpl> iterableOfInjectiveMatchingImpl = Iterables.<InjectiveMatchingImpl>filter(rule.getMultiruleElements(), InjectiveMatchingImpl.class);
int _size = IterableExtensions.size(iterableOfInjectiveMatchingImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -949,8 +843,7 @@
*/
@Check
public void checkCountCheckDangling(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<CheckDanglingImpl> iterableOfCheckDanglingImpl = Iterables.<CheckDanglingImpl>filter(_multiruleElements, CheckDanglingImpl.class);
+ Iterable<CheckDanglingImpl> iterableOfCheckDanglingImpl = Iterables.<CheckDanglingImpl>filter(rule.getMultiruleElements(), CheckDanglingImpl.class);
int _size = IterableExtensions.size(iterableOfCheckDanglingImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -967,8 +860,7 @@
*/
@Check
public void checkCountGraph(final MultiRule rule) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<GraphImpl> iterableOfGraphImpl = Iterables.<GraphImpl>filter(_multiruleElements, GraphImpl.class);
+ Iterable<GraphImpl> iterableOfGraphImpl = Iterables.<GraphImpl>filter(rule.getMultiruleElements(), GraphImpl.class);
int _size = IterableExtensions.size(iterableOfGraphImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -992,35 +884,23 @@
for (final Attribute attribute : _attribute) {
{
boolean superTypeAttribute = false;
- Node _name = node.getName();
- EClass _nodetype = _name.getNodetype();
- EList<EAttribute> _eAttributes = _nodetype.getEAttributes();
- EAttribute _name_1 = attribute.getName();
- boolean _contains = _eAttributes.contains(_name_1);
+ boolean _contains = node.getName().getNodetype().getEAttributes().contains(attribute.getName());
boolean _not = (!_contains);
if (_not) {
- Node _name_2 = node.getName();
- EClass _nodetype_1 = _name_2.getNodetype();
- EList<EClass> _eAllSuperTypes = _nodetype_1.getEAllSuperTypes();
+ EList<EClass> _eAllSuperTypes = node.getName().getNodetype().getEAllSuperTypes();
for (final EClass supertype : _eAllSuperTypes) {
- EList<EAttribute> _eAttributes_1 = supertype.getEAttributes();
- EAttribute _name_3 = attribute.getName();
- boolean _contains_1 = _eAttributes_1.contains(_name_3);
+ boolean _contains_1 = supertype.getEAttributes().contains(attribute.getName());
if (_contains_1) {
superTypeAttribute = true;
}
}
if ((!superTypeAttribute)) {
- Node _name_4 = node.getName();
- EClass _nodetype_2 = _name_4.getNodetype();
- String _name_5 = _nodetype_2.getName();
- String _plus = (_name_5 + " has no attribute \'");
- EAttribute _name_6 = attribute.getName();
- String _name_7 = _name_6.getName();
- String _plus_1 = (_plus + _name_7);
+ String _name = node.getName().getNodetype().getName();
+ String _plus = (_name + " has no attribute \'");
+ String _name_1 = attribute.getName().getName();
+ String _plus_1 = (_plus + _name_1);
String _plus_2 = (_plus_1 + "\'.\'");
- EReference _attribute_Name = Henshin_textPackage.eINSTANCE.getAttribute_Name();
- this.error(_plus_2, attribute, _attribute_Name);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Name());
}
}
}
@@ -1036,18 +916,13 @@
public void checkattributeOnlyOnce(final MultiRuleReuseNode node) {
for (int i = 0; (i < node.getAttribute().size()); i++) {
{
- EList<Attribute> _attribute = node.getAttribute();
- Attribute attribute = _attribute.get(i);
+ Attribute attribute = node.getAttribute().get(i);
for (int j = (i + 1); (j < node.getAttribute().size()); j++) {
if ((Objects.equal(attribute.getName(), node.getAttribute().get(j).getName()) && Objects.equal(attribute.getUpdate(), node.getAttribute().get(j).getUpdate()))) {
- EAttribute _name = attribute.getName();
- String _name_1 = _name.getName();
- String _plus = ("\'" + _name_1);
+ String _name = attribute.getName().getName();
+ String _plus = ("\'" + _name);
String _plus_1 = (_plus + "\' can only be used once.\'");
- EList<Attribute> _attribute_1 = node.getAttribute();
- Attribute _get = _attribute_1.get(j);
- EReference _attribute_Name = Henshin_textPackage.eINSTANCE.getAttribute_Name();
- this.error(_plus_1, _get, _attribute_Name);
+ this.error(_plus_1, node.getAttribute().get(j), Henshin_textPackage.eINSTANCE.getAttribute_Name());
}
}
}
@@ -1061,8 +936,7 @@
* @param graph Zu überprüfender Graph
*/
private void checkEdgesInMultiRuleRekursive(final List<Node> conNodes, final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<Edges> _filter = Iterables.<Edges>filter(_graphElements, Edges.class);
+ Iterable<Edges> _filter = Iterables.<Edges>filter(graph.getGraphElements(), Edges.class);
for (final Edges edges : _filter) {
EList<Edge> _edges = edges.getEdges();
for (final Edge edge : _edges) {
@@ -1078,11 +952,9 @@
} else {
try {
RuleNodeTypes _source_3 = edge.getSource();
- Node _name = ((MultiRuleReuseNode) _source_3).getName();
- testNode = _name;
+ testNode = ((MultiRuleReuseNode) _source_3).getName();
} catch (final Throwable _t) {
if (_t instanceof ClassCastException) {
- final ClassCastException e = (ClassCastException)_t;
testNode = null;
} else {
throw Exceptions.sneakyThrow(_t);
@@ -1091,14 +963,13 @@
}
}
for (final Node conNode : conNodes) {
- String _name_1 = conNode.getName();
- String _name_2 = testNode.getName();
- boolean _equals = Objects.equal(_name_1, _name_2);
+ String _name = conNode.getName();
+ String _name_1 = testNode.getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
String _actiontype = testNode.getActiontype();
String _plus = (_actiontype + "-nodes are not allowed to be reused in edges in MultiRuleReuseNodes.\'");
- EReference _edge_Source = Henshin_textPackage.eINSTANCE.getEdge_Source();
- this.error(_plus, edge, _edge_Source);
+ this.error(_plus, edge, Henshin_textPackage.eINSTANCE.getEdge_Source());
}
}
RuleNodeTypes _target = edge.getTarget();
@@ -1110,41 +981,34 @@
testNode = ((Node) _target_2);
} else {
RuleNodeTypes _target_3 = edge.getTarget();
- Node _name_3 = ((MultiRuleReuseNode) _target_3).getName();
- testNode = _name_3;
+ testNode = ((MultiRuleReuseNode) _target_3).getName();
}
}
for (final Node conNode_1 : conNodes) {
- String _name_4 = conNode_1.getName();
- String _name_5 = testNode.getName();
- boolean _equals_1 = Objects.equal(_name_4, _name_5);
+ String _name_2 = conNode_1.getName();
+ String _name_3 = testNode.getName();
+ boolean _equals_1 = Objects.equal(_name_2, _name_3);
if (_equals_1) {
String _actiontype_1 = testNode.getActiontype();
String _plus_1 = (_actiontype_1 + "-nodes are not allowed to be reused in edges in MultiRuleReuseNodes.\'");
- EReference _edge_Target = Henshin_textPackage.eINSTANCE.getEdge_Target();
- this.error(_plus_1, edge, _edge_Target);
+ this.error(_plus_1, edge, Henshin_textPackage.eINSTANCE.getEdge_Target());
}
}
}
}
}
- EList<GraphElements> _graphElements_1 = graph.getGraphElements();
- Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(_graphElements_1, MultiRule.class);
+ Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(graph.getGraphElements(), MultiRule.class);
int _size = IterableExtensions.size(multiRules);
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
- EList<GraphElements> _graphElements_2 = graph.getGraphElements();
- Iterable<Node> _filter_1 = Iterables.<Node>filter(_graphElements_2, Node.class);
+ Iterable<Node> _filter_1 = Iterables.<Node>filter(graph.getGraphElements(), Node.class);
for (final Node node : _filter_1) {
if ((Objects.equal(node.getActiontype(), "forbid") || Objects.equal(node.getActiontype(), "require"))) {
conNodes.add(node);
}
}
for (final MultiRule multiRule : multiRules) {
- EList<RuleElement> _multiruleElements = multiRule.getMultiruleElements();
- Iterable<Graph> _filter_2 = Iterables.<Graph>filter(_multiruleElements, Graph.class);
- Graph _get = ((Graph[])Conversions.unwrapArray(_filter_2, Graph.class))[0];
- this.checkEdgesInMultiRuleRekursive(conNodes, _get);
+ this.checkEdgesInMultiRuleRekursive(conNodes, ((Graph[])Conversions.unwrapArray(Iterables.<Graph>filter(multiRule.getMultiruleElements(), Graph.class), Graph.class))[0]);
}
}
}
@@ -1156,35 +1020,25 @@
*/
@Check
public void checkEdgesInMultiRule(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<Graph> graph = Iterables.<Graph>filter(_ruleElements, Graph.class);
+ Iterable<Graph> graph = Iterables.<Graph>filter(rule.getRuleElements(), Graph.class);
int _size = IterableExtensions.size(graph);
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
List<Node> conNodes = new ArrayList<Node>();
final Iterable<Graph> _converted_graph = (Iterable<Graph>)graph;
- Graph _get = ((Graph[])Conversions.unwrapArray(_converted_graph, Graph.class))[0];
- EList<GraphElements> _graphElements = _get.getGraphElements();
- Iterable<Node> _filter = Iterables.<Node>filter(_graphElements, Node.class);
+ Iterable<Node> _filter = Iterables.<Node>filter((((Graph[])Conversions.unwrapArray(_converted_graph, Graph.class))[0]).getGraphElements(), Node.class);
for (final Node node : _filter) {
if ((Objects.equal(node.getActiontype(), "forbid") || Objects.equal(node.getActiontype(), "require"))) {
conNodes.add(node);
}
}
final Iterable<Graph> _converted_graph_1 = (Iterable<Graph>)graph;
- Graph _get_1 = ((Graph[])Conversions.unwrapArray(_converted_graph_1, Graph.class))[0];
- EList<GraphElements> _graphElements_1 = _get_1.getGraphElements();
- Iterable<MultiRule> _filter_1 = Iterables.<MultiRule>filter(_graphElements_1, MultiRule.class);
+ Iterable<MultiRule> _filter_1 = Iterables.<MultiRule>filter((((Graph[])Conversions.unwrapArray(_converted_graph_1, Graph.class))[0]).getGraphElements(), MultiRule.class);
for (final MultiRule multiRule : _filter_1) {
- EList<RuleElement> _multiruleElements = multiRule.getMultiruleElements();
- Iterable<Graph> _filter_2 = Iterables.<Graph>filter(_multiruleElements, Graph.class);
- int _size_1 = IterableExtensions.size(_filter_2);
+ int _size_1 = IterableExtensions.size(Iterables.<Graph>filter(multiRule.getMultiruleElements(), Graph.class));
boolean _greaterThan_1 = (_size_1 > 0);
if (_greaterThan_1) {
- EList<RuleElement> _multiruleElements_1 = multiRule.getMultiruleElements();
- Iterable<Graph> _filter_3 = Iterables.<Graph>filter(_multiruleElements_1, Graph.class);
- Graph _get_2 = ((Graph[])Conversions.unwrapArray(_filter_3, Graph.class))[0];
- this.checkEdgesInMultiRuleRekursive(conNodes, _get_2);
+ this.checkEdgesInMultiRuleRekursive(conNodes, ((Graph[])Conversions.unwrapArray(Iterables.<Graph>filter(multiRule.getMultiruleElements(), Graph.class), Graph.class))[0]);
}
}
}
@@ -1198,15 +1052,12 @@
@Check
public void checkMultiRuleReuseNodeActionType(final MultiRuleReuseNode multiReuseNode) {
if ((Objects.equal(multiReuseNode.getName().getActiontype(), "require") || Objects.equal(multiReuseNode.getName().getActiontype(), "forbid"))) {
- Node _name = multiReuseNode.getName();
- String _actiontype = _name.getActiontype();
+ String _actiontype = multiReuseNode.getName().getActiontype();
String _plus = (_actiontype + "-Node \'");
- Node _name_1 = multiReuseNode.getName();
- String _name_2 = _name_1.getName();
- String _plus_1 = (_plus + _name_2);
+ String _name = multiReuseNode.getName().getName();
+ String _plus_1 = (_plus + _name);
String _plus_2 = (_plus_1 + "\' is not allowed in MultiRules.\'");
- EReference _multiRuleReuseNode_Name = Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name();
- this.error(_plus_2, multiReuseNode, _multiRuleReuseNode_Name);
+ this.error(_plus_2, multiReuseNode, Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name());
}
}
@@ -1222,8 +1073,7 @@
String _update = attribute.getUpdate();
boolean _notEquals = (!Objects.equal(_update, null));
if (_notEquals) {
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error("Set-attributes are not allowed in MultiRuleReuseNodes.\'", attribute, _attribute_Actiontype);
+ this.error("Set-attributes are not allowed in MultiRuleReuseNodes.\'", attribute, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
}
}
@@ -1235,14 +1085,12 @@
*/
@Check
public void checkMultiRuleReuseNodAttributeAction(final MultiRuleReuseNode reuseNode) {
- Node _name = reuseNode.getName();
- String reuseNodeType = _name.getActiontype();
+ String reuseNodeType = reuseNode.getName().getActiontype();
boolean _equals = Objects.equal(reuseNodeType, null);
if (_equals) {
reuseNodeType = "preserve";
}
- Node _name_1 = reuseNode.getName();
- String _actiontype = _name_1.getActiontype();
+ String _actiontype = reuseNode.getName().getActiontype();
boolean _equals_1 = Objects.equal(_actiontype, "create");
if (_equals_1) {
EList<Attribute> _attribute = reuseNode.getAttribute();
@@ -1252,13 +1100,11 @@
String _plus = (_actiontype_1 + "-attributes are not allowed in ");
String _plus_1 = (_plus + reuseNodeType);
String _plus_2 = (_plus_1 + "-reuseNodes. \'");
- EAttribute _attribute_Actiontype = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_2, attribute, _attribute_Actiontype);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
}
} else {
- Node _name_2 = reuseNode.getName();
- String _actiontype_2 = _name_2.getActiontype();
+ String _actiontype_2 = reuseNode.getName().getActiontype();
boolean _equals_2 = Objects.equal(_actiontype_2, "delete");
if (_equals_2) {
EList<Attribute> _attribute_1 = reuseNode.getAttribute();
@@ -1268,8 +1114,7 @@
String _plus_3 = (_actiontype_3 + "-attributes are not allowed in ");
String _plus_4 = (_plus_3 + reuseNodeType);
String _plus_5 = (_plus_4 + "-reuseNodes. \'");
- EAttribute _attribute_Actiontype_1 = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_5, attribute_1, _attribute_Actiontype_1);
+ this.error(_plus_5, attribute_1, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
}
} else {
@@ -1281,8 +1126,7 @@
String _plus_6 = (_actiontype_4 + "-attributes are not allowed in ");
String _plus_7 = (_plus_6 + reuseNodeType);
String _plus_8 = (_plus_7 + "-reuseNodes. \'");
- EAttribute _attribute_Actiontype_2 = Henshin_textPackage.eINSTANCE.getAttribute_Actiontype();
- this.error(_plus_8, attribute_2, _attribute_Actiontype_2);
+ this.error(_plus_8, attribute_2, Henshin_textPackage.eINSTANCE.getAttribute_Actiontype());
}
}
}
@@ -1297,18 +1141,14 @@
*/
@Check
public void checkRuleReuseNodes(final Rule rule) {
- EList<RuleElement> _ruleElements = rule.getRuleElements();
- Iterable<Graph> graph = Iterables.<Graph>filter(_ruleElements, Graph.class);
+ Iterable<Graph> graph = Iterables.<Graph>filter(rule.getRuleElements(), Graph.class);
int _size = IterableExtensions.size(graph);
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
final Iterable<Graph> _converted_graph = (Iterable<Graph>)graph;
- Graph _get = ((Graph[])Conversions.unwrapArray(_converted_graph, Graph.class))[0];
- EList<GraphElements> _graphElements = _get.getGraphElements();
- Iterable<MultiRuleReuseNode> reuseNodes = Iterables.<MultiRuleReuseNode>filter(_graphElements, MultiRuleReuseNode.class);
+ Iterable<MultiRuleReuseNode> reuseNodes = Iterables.<MultiRuleReuseNode>filter((((Graph[])Conversions.unwrapArray(_converted_graph, Graph.class))[0]).getGraphElements(), MultiRuleReuseNode.class);
for (final MultiRuleReuseNode node : reuseNodes) {
- EReference _multiRuleReuseNode_Name = Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name();
- this.error("Reuse-Nodes are only allowed in multiRules.\'\'", node, _multiRuleReuseNode_Name);
+ this.error("Reuse-Nodes are only allowed in multiRules.\'\'", node, Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name());
}
}
}
@@ -1320,19 +1160,15 @@
*/
@Check
public void checkMultiRuleGraphNodes(final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<MultiRuleReuseNode> _filter = Iterables.<MultiRuleReuseNode>filter(_graphElements, MultiRuleReuseNode.class);
+ Iterable<MultiRuleReuseNode> _filter = Iterables.<MultiRuleReuseNode>filter(graph.getGraphElements(), MultiRuleReuseNode.class);
for (final MultiRuleReuseNode reuse : _filter) {
- EList<GraphElements> _graphElements_1 = graph.getGraphElements();
- Iterable<Node> _filter_1 = Iterables.<Node>filter(_graphElements_1, Node.class);
+ Iterable<Node> _filter_1 = Iterables.<Node>filter(graph.getGraphElements(), Node.class);
for (final Node node : _filter_1) {
- Node _name = reuse.getName();
- String _name_1 = _name.getName();
- String _name_2 = node.getName();
- boolean _equals = Objects.equal(_name_1, _name_2);
+ String _name = reuse.getName().getName();
+ String _name_1 = node.getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
- EReference _multiRuleReuseNode_Name = Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name();
- this.error("Graph cannot reuse its own nodes.\'", reuse, _multiRuleReuseNode_Name);
+ this.error("Graph cannot reuse its own nodes.\'", reuse, Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name());
}
}
}
@@ -1345,29 +1181,20 @@
*/
@Check
public void checkGraphMultiReuse(final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<MultiRuleReuseNode> reuseNodes = Iterables.<MultiRuleReuseNode>filter(_graphElements, MultiRuleReuseNode.class);
+ Iterable<MultiRuleReuseNode> reuseNodes = Iterables.<MultiRuleReuseNode>filter(graph.getGraphElements(), MultiRuleReuseNode.class);
for (int i = 0; (i < IterableExtensions.size(reuseNodes)); i++) {
for (int j = (i + 1); (j < IterableExtensions.size(reuseNodes)); j++) {
final Iterable<MultiRuleReuseNode> _converted_reuseNodes = (Iterable<MultiRuleReuseNode>)reuseNodes;
- MultiRuleReuseNode _get = ((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes, MultiRuleReuseNode.class))[i];
- Node _name = _get.getName();
- String _name_1 = _name.getName();
+ String _name = (((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes, MultiRuleReuseNode.class))[i]).getName().getName();
final Iterable<MultiRuleReuseNode> _converted_reuseNodes_1 = (Iterable<MultiRuleReuseNode>)reuseNodes;
- MultiRuleReuseNode _get_1 = ((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_1, MultiRuleReuseNode.class))[j];
- Node _name_2 = _get_1.getName();
- String _name_3 = _name_2.getName();
- boolean _equals = Objects.equal(_name_1, _name_3);
+ String _name_1 = (((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_1, MultiRuleReuseNode.class))[j]).getName().getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
final Iterable<MultiRuleReuseNode> _converted_reuseNodes_2 = (Iterable<MultiRuleReuseNode>)reuseNodes;
- MultiRuleReuseNode _get_2 = ((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_2, MultiRuleReuseNode.class))[j];
- Node _name_4 = _get_2.getName();
- String _name_5 = _name_4.getName();
- String _plus = (_name_5 + " is already reused.\'");
+ String _name_2 = (((MultiRuleReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_2, MultiRuleReuseNode.class))[j]).getName().getName();
+ String _plus = (_name_2 + " is already reused.\'");
final Iterable<MultiRuleReuseNode> _converted_reuseNodes_3 = (Iterable<MultiRuleReuseNode>)reuseNodes;
- EObject _get_3 = ((EObject[])Conversions.unwrapArray(_converted_reuseNodes_3, EObject.class))[j];
- EReference _multiRuleReuseNode_Name = Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name();
- this.error(_plus, _get_3, _multiRuleReuseNode_Name);
+ this.error(_plus, ((EObject[])Conversions.unwrapArray(_converted_reuseNodes_3, EObject.class))[j], Henshin_textPackage.eINSTANCE.getMultiRuleReuseNode_Name());
}
}
}
@@ -1380,19 +1207,15 @@
*/
@Check
public void checkOverrideNodeNamesinMultiRuleGraph(final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(_graphElements, MultiRule.class);
+ Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(graph.getGraphElements(), MultiRule.class);
List<Node> topNodes = new ArrayList<Node>();
for (final MultiRule rule : multiRules) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<Graph> _filter = Iterables.<Graph>filter(_multiruleElements, Graph.class);
+ Iterable<Graph> _filter = Iterables.<Graph>filter(rule.getMultiruleElements(), Graph.class);
for (final Graph multiGraph : _filter) {
{
- EList<GraphElements> _graphElements_1 = multiGraph.getGraphElements();
- Iterable<Node> _filter_1 = Iterables.<Node>filter(_graphElements_1, Node.class);
+ Iterable<Node> _filter_1 = Iterables.<Node>filter(multiGraph.getGraphElements(), Node.class);
for (final Node multiNode : _filter_1) {
- EList<GraphElements> _graphElements_2 = graph.getGraphElements();
- Iterable<Node> _filter_2 = Iterables.<Node>filter(_graphElements_2, Node.class);
+ Iterable<Node> _filter_2 = Iterables.<Node>filter(graph.getGraphElements(), Node.class);
for (final Node node : _filter_2) {
{
topNodes.add(node);
@@ -1403,15 +1226,12 @@
String _name_2 = multiNode.getName();
String _plus = ("Duplicate Node \'" + _name_2);
String _plus_1 = (_plus + "\'.\'");
- EReference _node_Nodetype = Henshin_textPackage.eINSTANCE.getNode_Nodetype();
- this.error(_plus_1, multiNode, _node_Nodetype);
+ this.error(_plus_1, multiNode, Henshin_textPackage.eINSTANCE.getNode_Nodetype());
}
}
}
}
- EList<GraphElements> _graphElements_3 = multiGraph.getGraphElements();
- Iterable<MultiRule> _filter_3 = Iterables.<MultiRule>filter(_graphElements_3, MultiRule.class);
- int _size = IterableExtensions.size(_filter_3);
+ int _size = IterableExtensions.size(Iterables.<MultiRule>filter(multiGraph.getGraphElements(), MultiRule.class));
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
this.checkRekursiveOverrideNodeNamesinMultiRuleGraph(topNodes, multiGraph);
@@ -1428,15 +1248,12 @@
* @param graph Zu überprüfender Graph
*/
private void checkRekursiveOverrideNodeNamesinMultiRuleGraph(final List<Node> topNodes, final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(_graphElements, MultiRule.class);
+ Iterable<MultiRule> multiRules = Iterables.<MultiRule>filter(graph.getGraphElements(), MultiRule.class);
for (final MultiRule rule : multiRules) {
- EList<RuleElement> _multiruleElements = rule.getMultiruleElements();
- Iterable<Graph> _filter = Iterables.<Graph>filter(_multiruleElements, Graph.class);
+ Iterable<Graph> _filter = Iterables.<Graph>filter(rule.getMultiruleElements(), Graph.class);
for (final Graph multiGraph : _filter) {
{
- EList<GraphElements> _graphElements_1 = multiGraph.getGraphElements();
- Iterable<Node> _filter_1 = Iterables.<Node>filter(_graphElements_1, Node.class);
+ Iterable<Node> _filter_1 = Iterables.<Node>filter(multiGraph.getGraphElements(), Node.class);
for (final Node multiNode : _filter_1) {
{
for (final Node node : topNodes) {
@@ -1447,12 +1264,10 @@
String _name_2 = multiNode.getName();
String _plus = ("Duplicate Node \'" + _name_2);
String _plus_1 = (_plus + "\'.\'");
- EReference _node_Nodetype = Henshin_textPackage.eINSTANCE.getNode_Nodetype();
- this.error(_plus_1, multiNode, _node_Nodetype);
+ this.error(_plus_1, multiNode, Henshin_textPackage.eINSTANCE.getNode_Nodetype());
}
}
- EList<GraphElements> _graphElements_2 = graph.getGraphElements();
- Iterable<Node> _filter_2 = Iterables.<Node>filter(_graphElements_2, Node.class);
+ Iterable<Node> _filter_2 = Iterables.<Node>filter(graph.getGraphElements(), Node.class);
for (final Node node_1 : _filter_2) {
{
topNodes.add(node_1);
@@ -1463,16 +1278,13 @@
String _name_5 = multiNode.getName();
String _plus_2 = ("Duplicate Node \'" + _name_5);
String _plus_3 = (_plus_2 + "\'.\'");
- EReference _node_Nodetype_1 = Henshin_textPackage.eINSTANCE.getNode_Nodetype();
- this.error(_plus_3, multiNode, _node_Nodetype_1);
+ this.error(_plus_3, multiNode, Henshin_textPackage.eINSTANCE.getNode_Nodetype());
}
}
}
}
}
- EList<GraphElements> _graphElements_2 = multiGraph.getGraphElements();
- Iterable<MultiRule> _filter_2 = Iterables.<MultiRule>filter(_graphElements_2, MultiRule.class);
- int _size = IterableExtensions.size(_filter_2);
+ int _size = IterableExtensions.size(Iterables.<MultiRule>filter(multiGraph.getGraphElements(), MultiRule.class));
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
this.checkRekursiveOverrideNodeNamesinMultiRuleGraph(topNodes, multiGraph);
@@ -1494,16 +1306,13 @@
ConditionNodeTypes _source = edge.getSource();
if ((_source instanceof Node)) {
ConditionNodeTypes _source_1 = edge.getSource();
- EClass _nodetype = ((Node) _source_1).getNodetype();
- sourceType = _nodetype;
+ sourceType = ((Node) _source_1).getNodetype();
} else {
try {
ConditionNodeTypes _source_2 = edge.getSource();
- EClass _type = ((ConditionNode) _source_2).getType();
- sourceType = _type;
+ sourceType = ((ConditionNode) _source_2).getType();
} catch (final Throwable _t) {
if (_t instanceof ClassCastException) {
- final ClassCastException e = (ClassCastException)_t;
sourceType = null;
} else {
throw Exceptions.sneakyThrow(_t);
@@ -1513,19 +1322,16 @@
ConditionNodeTypes _target = edge.getTarget();
if ((_target instanceof Node)) {
ConditionNodeTypes _target_1 = edge.getTarget();
- EClass _nodetype_1 = ((Node) _target_1).getNodetype();
- targetType = _nodetype_1;
+ targetType = ((Node) _target_1).getNodetype();
} else {
try {
ConditionNodeTypes _target_2 = edge.getTarget();
- EClass _type_1 = ((ConditionNode) _target_2).getType();
- targetType = _type_1;
- } catch (final Throwable _t_1) {
- if (_t_1 instanceof ClassCastException) {
- final ClassCastException e_1 = (ClassCastException)_t_1;
+ targetType = ((ConditionNode) _target_2).getType();
+ } catch (final Throwable _t) {
+ if (_t instanceof ClassCastException) {
targetType = null;
} else {
- throw Exceptions.sneakyThrow(_t_1);
+ throw Exceptions.sneakyThrow(_t);
}
}
}
@@ -1534,38 +1340,31 @@
EClass referenceType = null;
EList<EReference> _eAllReferences = sourceType.getEAllReferences();
for (final EReference reference : _eAllReferences) {
- EReference _type_2 = edge.getType();
- String _name = _type_2.getName();
+ String _name = edge.getType().getName();
String _name_1 = reference.getName();
boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
wrongType = false;
- EClass _eReferenceType = reference.getEReferenceType();
- referenceType = _eReferenceType;
+ referenceType = reference.getEReferenceType();
}
}
if (wrongType) {
- EReference _type_3 = edge.getType();
- String _name_2 = _type_3.getName();
+ String _name_2 = edge.getType().getName();
String _plus = ("Edgetype " + _name_2);
String _plus_1 = (_plus + " does not exist.\'");
- EReference _conditionEdge_Type = Henshin_textPackage.eINSTANCE.getConditionEdge_Type();
- this.error(_plus_1, edge, _conditionEdge_Type);
+ this.error(_plus_1, edge, Henshin_textPackage.eINSTANCE.getConditionEdge_Type());
}
- boolean _notEquals = (!Objects.equal(referenceType, targetType));
- if (_notEquals) {
+ if (((!Objects.equal(referenceType, targetType)) && (!targetType.getEAllSuperTypes().contains(referenceType)))) {
String _name_3 = sourceType.getName();
String _plus_2 = ("Edge " + _name_3);
String _plus_3 = (_plus_2 + "->");
String _name_4 = targetType.getName();
String _plus_4 = (_plus_3 + _name_4);
String _plus_5 = (_plus_4 + ":");
- EReference _type_4 = edge.getType();
- String _name_5 = _type_4.getName();
+ String _name_5 = edge.getType().getName();
String _plus_6 = (_plus_5 + _name_5);
String _plus_7 = (_plus_6 + " does not exist.\'");
- EReference _conditionEdge_Type_1 = Henshin_textPackage.eINSTANCE.getConditionEdge_Type();
- this.error(_plus_7, edge, _conditionEdge_Type_1);
+ this.error(_plus_7, edge, Henshin_textPackage.eINSTANCE.getConditionEdge_Type());
}
}
}
@@ -1581,32 +1380,23 @@
for (final Match attribute : _attribute) {
{
boolean superTypeAttribute = false;
- EClass _type = node.getType();
- EList<EAttribute> _eAttributes = _type.getEAttributes();
- EAttribute _name = attribute.getName();
- boolean _contains = _eAttributes.contains(_name);
+ boolean _contains = node.getType().getEAttributes().contains(attribute.getName());
boolean _not = (!_contains);
if (_not) {
- EClass _type_1 = node.getType();
- EList<EClass> _eAllSuperTypes = _type_1.getEAllSuperTypes();
+ EList<EClass> _eAllSuperTypes = node.getType().getEAllSuperTypes();
for (final EClass supertype : _eAllSuperTypes) {
- EList<EAttribute> _eAttributes_1 = supertype.getEAttributes();
- EAttribute _name_1 = attribute.getName();
- boolean _contains_1 = _eAttributes_1.contains(_name_1);
+ boolean _contains_1 = supertype.getEAttributes().contains(attribute.getName());
if (_contains_1) {
superTypeAttribute = true;
}
}
if ((!superTypeAttribute)) {
- EClass _type_2 = node.getType();
- String _name_2 = _type_2.getName();
- String _plus = (_name_2 + " has no attribute \'");
- EAttribute _name_3 = attribute.getName();
- String _name_4 = _name_3.getName();
- String _plus_1 = (_plus + _name_4);
+ String _name = node.getType().getName();
+ String _plus = (_name + " has no attribute \'");
+ String _name_1 = attribute.getName().getName();
+ String _plus_1 = (_plus + _name_1);
String _plus_2 = (_plus_1 + "\'.\'");
- EReference _match_Name = Henshin_textPackage.eINSTANCE.getMatch_Name();
- this.error(_plus_2, attribute, _match_Name);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getMatch_Name());
}
}
}
@@ -1623,21 +1413,16 @@
boolean isImported = false;
List<EPackageImport> _ePackageImports = this.getEPackageImports(node);
for (final EPackageImport ePackage : _ePackageImports) {
- EPackage _ref = ePackage.getRef();
- EList<EClassifier> _eClassifiers = _ref.getEClassifiers();
- EClass _type = node.getType();
- boolean _contains = _eClassifiers.contains(_type);
+ boolean _contains = ePackage.getRef().getEClassifiers().contains(node.getType());
if (_contains) {
isImported = true;
}
}
if ((!isImported)) {
- EClass _type_1 = node.getType();
- String _name = _type_1.getName();
+ String _name = node.getType().getName();
String _plus = ("Nodetype " + _name);
String _plus_1 = (_plus + " is not imported.\'");
- EReference _conditionNode_Type = Henshin_textPackage.eINSTANCE.getConditionNode_Type();
- this.error(_plus_1, node, _conditionNode_Type);
+ this.error(_plus_1, node, Henshin_textPackage.eINSTANCE.getConditionNode_Type());
}
}
@@ -1652,16 +1437,13 @@
ConditionNodeTypes _name = node.getName();
if ((_name instanceof Node)) {
ConditionNodeTypes _name_1 = node.getName();
- EClass _nodetype = ((Node) _name_1).getNodetype();
- nodeType = _nodetype;
+ nodeType = ((Node) _name_1).getNodetype();
} else {
try {
ConditionNodeTypes _name_2 = node.getName();
- EClass _type = ((ConditionNode) _name_2).getType();
- nodeType = _type;
+ nodeType = ((ConditionNode) _name_2).getType();
} catch (final Throwable _t) {
if (_t instanceof ClassCastException) {
- final ClassCastException e = (ClassCastException)_t;
nodeType = null;
} else {
throw Exceptions.sneakyThrow(_t);
@@ -1674,29 +1456,23 @@
for (final Match attribute : _attribute) {
{
boolean superTypeAttribute = false;
- EList<EAttribute> _eAttributes = nodeType.getEAttributes();
- EAttribute _name_3 = attribute.getName();
- boolean _contains = _eAttributes.contains(_name_3);
+ boolean _contains = nodeType.getEAttributes().contains(attribute.getName());
boolean _not = (!_contains);
if (_not) {
EList<EClass> _eAllSuperTypes = nodeType.getEAllSuperTypes();
for (final EClass supertype : _eAllSuperTypes) {
- EList<EAttribute> _eAttributes_1 = supertype.getEAttributes();
- EAttribute _name_4 = attribute.getName();
- boolean _contains_1 = _eAttributes_1.contains(_name_4);
+ boolean _contains_1 = supertype.getEAttributes().contains(attribute.getName());
if (_contains_1) {
superTypeAttribute = true;
}
}
if ((!superTypeAttribute)) {
- String _name_5 = nodeType.getName();
- String _plus = (_name_5 + " has no attribute \'");
- EAttribute _name_6 = attribute.getName();
- String _name_7 = _name_6.getName();
- String _plus_1 = (_plus + _name_7);
+ String _name_2 = nodeType.getName();
+ String _plus = (_name_2 + " has no attribute \'");
+ String _name_3 = attribute.getName().getName();
+ String _plus_1 = (_plus + _name_3);
String _plus_2 = (_plus_1 + "\'.\'");
- EReference _match_Name = Henshin_textPackage.eINSTANCE.getMatch_Name();
- this.error(_plus_2, attribute, _match_Name);
+ this.error(_plus_2, attribute, Henshin_textPackage.eINSTANCE.getMatch_Name());
}
}
}
@@ -1713,23 +1489,16 @@
public void checkattributeOnlyOnce(final ConditionNode node) {
for (int i = 0; (i < node.getAttribute().size()); i++) {
{
- EList<Match> _attribute = node.getAttribute();
- Match match = _attribute.get(i);
+ Match match = node.getAttribute().get(i);
for (int j = (i + 1); (j < node.getAttribute().size()); j++) {
EAttribute _name = match.getName();
- EList<Match> _attribute_1 = node.getAttribute();
- Match _get = _attribute_1.get(j);
- EAttribute _name_1 = _get.getName();
+ EAttribute _name_1 = node.getAttribute().get(j).getName();
boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
- EAttribute _name_2 = match.getName();
- String _name_3 = _name_2.getName();
- String _plus = ("\'" + _name_3);
+ String _name_2 = match.getName().getName();
+ String _plus = ("\'" + _name_2);
String _plus_1 = (_plus + "\' can only be used once.\'");
- EList<Match> _attribute_2 = node.getAttribute();
- Match _get_1 = _attribute_2.get(j);
- EReference _match_Name = Henshin_textPackage.eINSTANCE.getMatch_Name();
- this.error(_plus_1, _get_1, _match_Name);
+ this.error(_plus_1, node.getAttribute().get(j), Henshin_textPackage.eINSTANCE.getMatch_Name());
}
}
}
@@ -1745,23 +1514,16 @@
public void checkattributeOnlyOnce(final ConditionReuseNode node) {
for (int i = 0; (i < node.getAttribute().size()); i++) {
{
- EList<Match> _attribute = node.getAttribute();
- Match match = _attribute.get(i);
+ Match match = node.getAttribute().get(i);
for (int j = (i + 1); (j < node.getAttribute().size()); j++) {
EAttribute _name = match.getName();
- EList<Match> _attribute_1 = node.getAttribute();
- Match _get = _attribute_1.get(j);
- EAttribute _name_1 = _get.getName();
+ EAttribute _name_1 = node.getAttribute().get(j).getName();
boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
- EAttribute _name_2 = match.getName();
- String _name_3 = _name_2.getName();
- String _plus = ("\'" + _name_3);
+ String _name_2 = match.getName().getName();
+ String _plus = ("\'" + _name_2);
String _plus_1 = (_plus + "\' can only be used once.\'");
- EList<Match> _attribute_2 = node.getAttribute();
- Match _get_1 = _attribute_2.get(j);
- EReference _match_Name = Henshin_textPackage.eINSTANCE.getMatch_Name();
- this.error(_plus_1, _get_1, _match_Name);
+ this.error(_plus_1, node.getAttribute().get(j), Henshin_textPackage.eINSTANCE.getMatch_Name());
}
}
}
@@ -1782,8 +1544,7 @@
String _name_2 = ((Node) _name_1).getName();
String _plus = ("Node \'" + _name_2);
String _plus_1 = (_plus + "\' is not in LHS.\'");
- EReference _conditionReuseNode_Name = Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name();
- this.error(_plus_1, conReuseNode, _conditionReuseNode_Name);
+ this.error(_plus_1, conReuseNode, Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name());
}
}
}
@@ -1802,8 +1563,7 @@
String _name = ((Node) _source_1).getName();
String _plus = ("Node \'" + _name);
String _plus_1 = (_plus + "\' is not in LHS.\'");
- EReference _conditionEdge_Source = Henshin_textPackage.eINSTANCE.getConditionEdge_Source();
- this.error(_plus_1, conEdge, _conditionEdge_Source);
+ this.error(_plus_1, conEdge, Henshin_textPackage.eINSTANCE.getConditionEdge_Source());
}
}
ConditionNodeTypes _target = conEdge.getTarget();
@@ -1813,8 +1573,7 @@
String _name_1 = ((Node) _target_1).getName();
String _plus_2 = ("Node \'" + _name_1);
String _plus_3 = (_plus_2 + "\' is not in LHS.\'");
- EReference _conditionEdge_Target = Henshin_textPackage.eINSTANCE.getConditionEdge_Target();
- this.error(_plus_3, conEdge, _conditionEdge_Target);
+ this.error(_plus_3, conEdge, Henshin_textPackage.eINSTANCE.getConditionEdge_Target());
}
}
}
@@ -1826,8 +1585,7 @@
*/
@Check
public void matchingFormulaOnce(final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<Formula> formulaList = Iterables.<Formula>filter(_graphElements, Formula.class);
+ Iterable<Formula> formulaList = Iterables.<Formula>filter(graph.getGraphElements(), Formula.class);
int _size = IterableExtensions.size(formulaList);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -1844,8 +1602,7 @@
*/
@Check
public void matchingFormulaOnce(final ConditionGraph graph) {
- EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
- Iterable<Formula> formulaList = Iterables.<Formula>filter(_conditionGraphElements, Formula.class);
+ Iterable<Formula> formulaList = Iterables.<Formula>filter(graph.getConditionGraphElements(), Formula.class);
int _size = IterableExtensions.size(formulaList);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -1862,23 +1619,19 @@
*/
@Check
public void checkOverrideNodeNamesinConditionGraph(final Graph graph) {
- EList<GraphElements> _graphElements = graph.getGraphElements();
- Iterable<Formula> formula = Iterables.<Formula>filter(_graphElements, Formula.class);
+ Iterable<Formula> formula = Iterables.<Formula>filter(graph.getGraphElements(), Formula.class);
List<ConditionNode> topConNodes = new ArrayList<ConditionNode>();
int _size = IterableExtensions.size(formula);
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
final Iterable<Formula> _converted_formula = (Iterable<Formula>)formula;
- Formula _get = ((Formula[])Conversions.unwrapArray(_converted_formula, Formula.class))[0];
- EList<ConditionGraph> _conditionGraphs = _get.getConditionGraphs();
+ EList<ConditionGraph> _conditionGraphs = (((Formula[])Conversions.unwrapArray(_converted_formula, Formula.class))[0]).getConditionGraphs();
for (final ConditionGraph conGraph : _conditionGraphs) {
{
- EList<ConditionGraphElements> _conditionGraphElements = conGraph.getConditionGraphElements();
- Iterable<ConditionNode> _filter = Iterables.<ConditionNode>filter(_conditionGraphElements, ConditionNode.class);
+ Iterable<ConditionNode> _filter = Iterables.<ConditionNode>filter(conGraph.getConditionGraphElements(), ConditionNode.class);
for (final ConditionNode conNode : _filter) {
{
- EList<GraphElements> _graphElements_1 = graph.getGraphElements();
- Iterable<Node> _filter_1 = Iterables.<Node>filter(_graphElements_1, Node.class);
+ Iterable<Node> _filter_1 = Iterables.<Node>filter(graph.getGraphElements(), Node.class);
for (final Node node : _filter_1) {
String _name = conNode.getName();
String _name_1 = node.getName();
@@ -1887,21 +1640,16 @@
String _name_2 = conNode.getName();
String _plus = ("Duplicate Node \'" + _name_2);
String _plus_1 = (_plus + "\'.\'");
- EReference _conditionNode_Type = Henshin_textPackage.eINSTANCE.getConditionNode_Type();
- this.error(_plus_1, conNode, _conditionNode_Type);
+ this.error(_plus_1, conNode, Henshin_textPackage.eINSTANCE.getConditionNode_Type());
}
}
topConNodes.add(conNode);
}
}
- EList<ConditionGraphElements> _conditionGraphElements_1 = conGraph.getConditionGraphElements();
- Iterable<Formula> _filter_1 = Iterables.<Formula>filter(_conditionGraphElements_1, Formula.class);
- int _size_1 = IterableExtensions.size(_filter_1);
+ int _size_1 = IterableExtensions.size(Iterables.<Formula>filter(conGraph.getConditionGraphElements(), Formula.class));
boolean _greaterThan_1 = (_size_1 > 0);
if (_greaterThan_1) {
- EList<GraphElements> _graphElements_1 = graph.getGraphElements();
- Iterable<Node> _filter_2 = Iterables.<Node>filter(_graphElements_1, Node.class);
- this.checkRekursiveOverrideNodeNamesinConditionGraph(_filter_2, topConNodes, conGraph);
+ this.checkRekursiveOverrideNodeNamesinConditionGraph(Iterables.<Node>filter(graph.getGraphElements(), Node.class), topConNodes, conGraph);
}
}
}
@@ -1916,22 +1664,18 @@
* @param graph Zu überprüfender Graph
*/
private void checkRekursiveOverrideNodeNamesinConditionGraph(final Iterable<Node> topNodes, final List<ConditionNode> topConNodes, final ConditionGraph graph) {
- EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
- Iterable<Formula> formula = Iterables.<Formula>filter(_conditionGraphElements, Formula.class);
+ Iterable<Formula> formula = Iterables.<Formula>filter(graph.getConditionGraphElements(), Formula.class);
int _size = IterableExtensions.size(formula);
boolean _greaterThan = (_size > 0);
if (_greaterThan) {
final Iterable<Formula> _converted_formula = (Iterable<Formula>)formula;
- Formula _get = ((Formula[])Conversions.unwrapArray(_converted_formula, Formula.class))[0];
- EList<ConditionGraph> _conditionGraphs = _get.getConditionGraphs();
+ EList<ConditionGraph> _conditionGraphs = (((Formula[])Conversions.unwrapArray(_converted_formula, Formula.class))[0]).getConditionGraphs();
for (final ConditionGraph conGraph : _conditionGraphs) {
{
- EList<ConditionGraphElements> _conditionGraphElements_1 = conGraph.getConditionGraphElements();
- Iterable<ConditionNode> _filter = Iterables.<ConditionNode>filter(_conditionGraphElements_1, ConditionNode.class);
+ Iterable<ConditionNode> _filter = Iterables.<ConditionNode>filter(conGraph.getConditionGraphElements(), ConditionNode.class);
for (final ConditionNode conNode : _filter) {
{
- EList<ConditionGraphElements> _conditionGraphElements_2 = graph.getConditionGraphElements();
- Iterable<ConditionNode> _filter_1 = Iterables.<ConditionNode>filter(_conditionGraphElements_2, ConditionNode.class);
+ Iterable<ConditionNode> _filter_1 = Iterables.<ConditionNode>filter(graph.getConditionGraphElements(), ConditionNode.class);
for (final ConditionNode node : _filter_1) {
String _name = conNode.getName();
String _name_1 = node.getName();
@@ -1940,8 +1684,7 @@
String _name_2 = conNode.getName();
String _plus = ("Duplicate Node \'" + _name_2);
String _plus_1 = (_plus + "\'.\'");
- EReference _conditionNode_Type = Henshin_textPackage.eINSTANCE.getConditionNode_Type();
- this.error(_plus_1, conNode, _conditionNode_Type);
+ this.error(_plus_1, conNode, Henshin_textPackage.eINSTANCE.getConditionNode_Type());
}
}
for (final Node node_1 : topNodes) {
@@ -1952,8 +1695,7 @@
String _name_5 = conNode.getName();
String _plus_2 = ("Duplicate Node \'" + _name_5);
String _plus_3 = (_plus_2 + "\'.\'");
- EReference _conditionNode_Type_1 = Henshin_textPackage.eINSTANCE.getConditionNode_Type();
- this.error(_plus_3, conNode, _conditionNode_Type_1);
+ this.error(_plus_3, conNode, Henshin_textPackage.eINSTANCE.getConditionNode_Type());
}
}
for (final ConditionNode node_2 : topConNodes) {
@@ -1964,16 +1706,13 @@
String _name_8 = conNode.getName();
String _plus_4 = ("Duplicate Node \'" + _name_8);
String _plus_5 = (_plus_4 + "\'.\'");
- EReference _conditionNode_Type_2 = Henshin_textPackage.eINSTANCE.getConditionNode_Type();
- this.error(_plus_5, conNode, _conditionNode_Type_2);
+ this.error(_plus_5, conNode, Henshin_textPackage.eINSTANCE.getConditionNode_Type());
}
}
topConNodes.add(conNode);
}
}
- EList<ConditionGraphElements> _conditionGraphElements_2 = conGraph.getConditionGraphElements();
- Iterable<Formula> _filter_1 = Iterables.<Formula>filter(_conditionGraphElements_2, Formula.class);
- int _size_1 = IterableExtensions.size(_filter_1);
+ int _size_1 = IterableExtensions.size(Iterables.<Formula>filter(conGraph.getConditionGraphElements(), Formula.class));
boolean _greaterThan_1 = (_size_1 > 0);
if (_greaterThan_1) {
this.checkRekursiveOverrideNodeNamesinConditionGraph(topNodes, topConNodes, conGraph);
@@ -1994,8 +1733,7 @@
ArrayList<ConditionGraph> _arrayList = new ArrayList<ConditionGraph>();
ArrayList<ConditionGraph> formulaGraphs = this.findDuplicate(_formula, _arrayList);
for (final ConditionGraph graph : formulaGraphs) {
- EList<ConditionGraph> _conditionGraphs = formula.getConditionGraphs();
- boolean _contains = _conditionGraphs.contains(graph);
+ boolean _contains = formula.getConditionGraphs().contains(graph);
boolean _not = (!_contains);
if (_not) {
String _name = graph.getName();
@@ -2022,13 +1760,9 @@
boolean _xblockexpression_1 = false;
{
Logic _formula_1 = formula.getFormula();
- Logic _left = ((ANDImpl) _formula_1).getLeft();
- ArrayList<ConditionGraph> _findDuplicate = this.findDuplicate(_left, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate);
+ conditionGraphs.addAll(this.findDuplicate(((ANDImpl) _formula_1).getLeft(), conditionGraphs));
Logic _formula_2 = formula.getFormula();
- Logic _right = ((ANDImpl) _formula_2).getRight();
- ArrayList<ConditionGraph> _findDuplicate_1 = this.findDuplicate(_right, conditionGraphs);
- _xblockexpression_1 = conditionGraphs.addAll(_findDuplicate_1);
+ _xblockexpression_1 = conditionGraphs.addAll(this.findDuplicate(((ANDImpl) _formula_2).getRight(), conditionGraphs));
}
_xifexpression = _xblockexpression_1;
} else {
@@ -2038,13 +1772,9 @@
boolean _xblockexpression_2 = false;
{
Logic _formula_2 = formula.getFormula();
- Logic _left = ((ORorXORImpl) _formula_2).getLeft();
- ArrayList<ConditionGraph> _findDuplicate = this.findDuplicate(_left, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate);
+ conditionGraphs.addAll(this.findDuplicate(((ORorXORImpl) _formula_2).getLeft(), conditionGraphs));
Logic _formula_3 = formula.getFormula();
- Logic _right = ((ORorXORImpl) _formula_3).getRight();
- ArrayList<ConditionGraph> _findDuplicate_1 = this.findDuplicate(_right, conditionGraphs);
- _xblockexpression_2 = conditionGraphs.addAll(_findDuplicate_1);
+ _xblockexpression_2 = conditionGraphs.addAll(this.findDuplicate(((ORorXORImpl) _formula_3).getRight(), conditionGraphs));
}
_xifexpression_1 = _xblockexpression_2;
} else {
@@ -2052,9 +1782,7 @@
Logic _formula_2 = formula.getFormula();
if ((_formula_2 instanceof NotImpl)) {
Logic _formula_3 = formula.getFormula();
- Logic _negation = ((NotImpl) _formula_3).getNegation();
- ArrayList<ConditionGraph> _findDuplicate = this.findDuplicate(_negation, conditionGraphs);
- _xifexpression_2 = conditionGraphs.addAll(_findDuplicate);
+ _xifexpression_2 = conditionGraphs.addAll(this.findDuplicate(((NotImpl) _formula_3).getNegation(), conditionGraphs));
}
_xifexpression_1 = _xifexpression_2;
}
@@ -2074,39 +1802,25 @@
*/
private ArrayList<ConditionGraph> findDuplicate(final Logic logic, final ArrayList<ConditionGraph> conditionGraphs) {
if ((logic instanceof ANDImpl)) {
- Logic _left = ((ANDImpl) logic).getLeft();
- ArrayList<ConditionGraph> _findDuplicate = this.findDuplicate(_left, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate);
- Logic _right = ((ANDImpl) logic).getRight();
- ArrayList<ConditionGraph> _findDuplicate_1 = this.findDuplicate(_right, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate_1);
+ conditionGraphs.addAll(this.findDuplicate(((ANDImpl) logic).getLeft(), conditionGraphs));
+ conditionGraphs.addAll(this.findDuplicate(((ANDImpl) logic).getRight(), conditionGraphs));
} else {
if ((logic instanceof ORorXORImpl)) {
- Logic _left_1 = ((ORorXORImpl) logic).getLeft();
- ArrayList<ConditionGraph> _findDuplicate_2 = this.findDuplicate(_left_1, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate_2);
- Logic _right_1 = ((ORorXORImpl) logic).getRight();
- ArrayList<ConditionGraph> _findDuplicate_3 = this.findDuplicate(_right_1, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate_3);
+ conditionGraphs.addAll(this.findDuplicate(((ORorXORImpl) logic).getLeft(), conditionGraphs));
+ conditionGraphs.addAll(this.findDuplicate(((ORorXORImpl) logic).getRight(), conditionGraphs));
} else {
if ((logic instanceof NotImpl)) {
- Logic _negation = ((NotImpl) logic).getNegation();
- ArrayList<ConditionGraph> _findDuplicate_4 = this.findDuplicate(_negation, conditionGraphs);
- conditionGraphs.addAll(_findDuplicate_4);
+ conditionGraphs.addAll(this.findDuplicate(((NotImpl) logic).getNegation(), conditionGraphs));
} else {
if ((logic instanceof ConditionGraphRef)) {
- ConditionGraph _conditionGraphRef = ((ConditionGraphRef) logic).getConditionGraphRef();
- boolean _contains = conditionGraphs.contains(_conditionGraphRef);
+ boolean _contains = conditionGraphs.contains(((ConditionGraphRef) logic).getConditionGraphRef());
if (_contains) {
- ConditionGraph _conditionGraphRef_1 = ((ConditionGraphRef) logic).getConditionGraphRef();
- String _name = _conditionGraphRef_1.getName();
+ String _name = ((ConditionGraphRef) logic).getConditionGraphRef().getName();
String _plus = ("Duplicate ConditionGraph \'" + _name);
String _plus_1 = (_plus + "\'.\'");
- EReference _conditionGraphRef_ConditionGraphRef = Henshin_textPackage.eINSTANCE.getConditionGraphRef_ConditionGraphRef();
- this.error(_plus_1, ((ConditionGraphRef) logic), _conditionGraphRef_ConditionGraphRef);
+ this.error(_plus_1, ((ConditionGraphRef) logic), Henshin_textPackage.eINSTANCE.getConditionGraphRef_ConditionGraphRef());
} else {
- ConditionGraph _conditionGraphRef_2 = ((ConditionGraphRef) logic).getConditionGraphRef();
- conditionGraphs.add(_conditionGraphRef_2);
+ conditionGraphs.add(((ConditionGraphRef) logic).getConditionGraphRef());
}
}
}
@@ -2122,19 +1836,15 @@
*/
@Check
public void checkConditionGraphReuseOwnNodes(final ConditionGraph graph) {
- EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
- Iterable<ConditionReuseNode> _filter = Iterables.<ConditionReuseNode>filter(_conditionGraphElements, ConditionReuseNode.class);
+ Iterable<ConditionReuseNode> _filter = Iterables.<ConditionReuseNode>filter(graph.getConditionGraphElements(), ConditionReuseNode.class);
for (final ConditionReuseNode reuse : _filter) {
- EList<ConditionGraphElements> _conditionGraphElements_1 = graph.getConditionGraphElements();
- Iterable<ConditionNode> _filter_1 = Iterables.<ConditionNode>filter(_conditionGraphElements_1, ConditionNode.class);
+ Iterable<ConditionNode> _filter_1 = Iterables.<ConditionNode>filter(graph.getConditionGraphElements(), ConditionNode.class);
for (final ConditionNode node : _filter_1) {
- ConditionNodeTypes _name = reuse.getName();
- String _name_1 = _name.getName();
- String _name_2 = node.getName();
- boolean _equals = Objects.equal(_name_1, _name_2);
+ String _name = reuse.getName().getName();
+ String _name_1 = node.getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
- EReference _conditionReuseNode_Name = Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name();
- this.error("ConditionGraph cannot reuse its own nodes.\'", reuse, _conditionReuseNode_Name);
+ this.error("ConditionGraph cannot reuse its own nodes.\'", reuse, Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name());
}
}
}
@@ -2147,32 +1857,23 @@
*/
@Check
public void checkConditionGraphMultiReuse(final ConditionGraph graph) {
- EList<ConditionGraphElements> _conditionGraphElements = graph.getConditionGraphElements();
- Iterable<ConditionReuseNode> reuseNodes = Iterables.<ConditionReuseNode>filter(_conditionGraphElements, ConditionReuseNode.class);
+ Iterable<ConditionReuseNode> reuseNodes = Iterables.<ConditionReuseNode>filter(graph.getConditionGraphElements(), ConditionReuseNode.class);
for (int i = 0; (i < IterableExtensions.size(reuseNodes)); i++) {
for (int j = (i + 1); (j < IterableExtensions.size(reuseNodes)); j++) {
final Iterable<ConditionReuseNode> _converted_reuseNodes = (Iterable<ConditionReuseNode>)reuseNodes;
- ConditionReuseNode _get = ((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes, ConditionReuseNode.class))[i];
- ConditionNodeTypes _name = _get.getName();
- String _name_1 = _name.getName();
+ String _name = (((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes, ConditionReuseNode.class))[i]).getName().getName();
final Iterable<ConditionReuseNode> _converted_reuseNodes_1 = (Iterable<ConditionReuseNode>)reuseNodes;
- ConditionReuseNode _get_1 = ((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_1, ConditionReuseNode.class))[j];
- ConditionNodeTypes _name_2 = _get_1.getName();
- String _name_3 = _name_2.getName();
- boolean _equals = Objects.equal(_name_1, _name_3);
+ String _name_1 = (((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_1, ConditionReuseNode.class))[j]).getName().getName();
+ boolean _equals = Objects.equal(_name, _name_1);
if (_equals) {
final Iterable<ConditionReuseNode> _converted_reuseNodes_2 = (Iterable<ConditionReuseNode>)reuseNodes;
- ConditionReuseNode _get_2 = ((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_2, ConditionReuseNode.class))[j];
- ConditionNodeTypes _name_4 = _get_2.getName();
- String _name_5 = _name_4.getName();
- String _plus = (_name_5 + " is already reused in ConditionGraph ");
- String _name_6 = graph.getName();
- String _plus_1 = (_plus + _name_6);
+ String _name_2 = (((ConditionReuseNode[])Conversions.unwrapArray(_converted_reuseNodes_2, ConditionReuseNode.class))[j]).getName().getName();
+ String _plus = (_name_2 + " is already reused in ConditionGraph ");
+ String _name_3 = graph.getName();
+ String _plus_1 = (_plus + _name_3);
String _plus_2 = (_plus_1 + ".\'");
final Iterable<ConditionReuseNode> _converted_reuseNodes_3 = (Iterable<ConditionReuseNode>)reuseNodes;
- EObject _get_3 = ((EObject[])Conversions.unwrapArray(_converted_reuseNodes_3, EObject.class))[j];
- EReference _conditionReuseNode_Name = Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name();
- this.error(_plus_2, _get_3, _conditionReuseNode_Name);
+ this.error(_plus_2, ((EObject[])Conversions.unwrapArray(_converted_reuseNodes_3, EObject.class))[j], Henshin_textPackage.eINSTANCE.getConditionReuseNode_Name());
}
}
}
@@ -2188,21 +1889,17 @@
Expression _iterations = unit.getIterations();
if ((_iterations instanceof NumberValue)) {
Expression _iterations_1 = unit.getIterations();
- String _value = ((NumberValue) _iterations_1).getValue();
- boolean _contains = _value.contains("-");
+ boolean _contains = ((NumberValue) _iterations_1).getValue().contains("-");
if (_contains) {
- EReference _iteratedUnit_Iterations = Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations();
- this.error("Negative values are not allowed.\'", unit, _iteratedUnit_Iterations);
+ this.error("Negative values are not allowed.\'", unit, Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations());
}
} else {
Expression _iterations_2 = unit.getIterations();
if ((_iterations_2 instanceof IntegerValue)) {
Expression _iterations_3 = unit.getIterations();
- String _value_1 = ((IntegerValue) _iterations_3).getValue();
- boolean _contains_1 = _value_1.contains("-");
+ boolean _contains_1 = ((IntegerValue) _iterations_3).getValue().contains("-");
if (_contains_1) {
- EReference _iteratedUnit_Iterations_1 = Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations();
- this.error("Negative values are not allowed.\'", unit, _iteratedUnit_Iterations_1);
+ this.error("Negative values are not allowed.\'", unit, Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations());
}
}
}
@@ -2218,17 +1915,13 @@
Expression _iterations = unit.getIterations();
boolean _notEquals = (!Objects.equal(_iterations, null));
if (_notEquals) {
- Expression _iterations_1 = unit.getIterations();
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_iterations_1);
- String _string = _typeFor.toString();
+ String _string = this._henshin_textTypeProvider.typeFor(unit.getIterations()).toString();
boolean _notEquals_1 = (!Objects.equal(_string, "number"));
if (_notEquals_1) {
- Expression _iterations_2 = unit.getIterations();
- Henshin_textType _typeFor_1 = this._henshin_textTypeProvider.typeFor(_iterations_2);
- String _plus = ("IteratedUnit expected number type, but was " + _typeFor_1);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(unit.getIterations());
+ String _plus = ("IteratedUnit expected number type, but was " + _typeFor);
String _plus_1 = (_plus + ".\'");
- EReference _iteratedUnit_Iterations = Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations();
- this.error(_plus_1, unit, _iteratedUnit_Iterations);
+ this.error(_plus_1, unit, Henshin_textPackage.eINSTANCE.getIteratedUnit_Iterations());
}
}
}
@@ -2240,8 +1933,7 @@
*/
@Check
public void checkCountStrict(final Unit unit) {
- EList<UnitElement> _unitElements = unit.getUnitElements();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_unitElements, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(unit.getUnitElements(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2258,8 +1950,7 @@
*/
@Check
public void checkCountStrictSubSequence(final UnitElement unit) {
- EList<UnitElement> _subSequence = unit.getSubSequence();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_subSequence, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(unit.getSubSequence(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2279,8 +1970,7 @@
EList<org.eclipse.emf.henshin.text.henshin_text.List> _listOfLists = unit.getListOfLists();
for (final org.eclipse.emf.henshin.text.henshin_text.List e : _listOfLists) {
{
- EList<UnitElement> _subElements = e.getSubElements();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_subElements, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(e.getSubElements(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2299,12 +1989,9 @@
*/
@Check
public void checkCountStrictConditionalUnit(final ConditionalUnit unit) {
- EList<UnitElement> _if = unit.getIf();
- Iterable<StrictImpl> iterableOfStrictImplIF = Iterables.<StrictImpl>filter(_if, StrictImpl.class);
- EList<UnitElement> _then = unit.getThen();
- Iterable<StrictImpl> iterableOfStrictImplTHEN = Iterables.<StrictImpl>filter(_then, StrictImpl.class);
- EList<UnitElement> _else = unit.getElse();
- Iterable<StrictImpl> iterableOfStrictImplELSE = Iterables.<StrictImpl>filter(_else, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImplIF = Iterables.<StrictImpl>filter(unit.getIf(), StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImplTHEN = Iterables.<StrictImpl>filter(unit.getThen(), StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImplELSE = Iterables.<StrictImpl>filter(unit.getElse(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImplIF);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2338,8 +2025,7 @@
EList<org.eclipse.emf.henshin.text.henshin_text.List> _listOfLists = unit.getListOfLists();
for (final org.eclipse.emf.henshin.text.henshin_text.List e : _listOfLists) {
{
- EList<UnitElement> _subElements = e.getSubElements();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_subElements, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(e.getSubElements(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2358,8 +2044,7 @@
*/
@Check
public void checkCountStrictIteratedUnit(final IteratedUnit unit) {
- EList<UnitElement> _subElement = unit.getSubElement();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_subElement, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(unit.getSubElement(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2376,8 +2061,7 @@
*/
@Check
public void checkCountStrictLoopUnit(final LoopUnit unit) {
- EList<UnitElement> _subElement = unit.getSubElement();
- Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(_subElement, StrictImpl.class);
+ Iterable<StrictImpl> iterableOfStrictImpl = Iterables.<StrictImpl>filter(unit.getSubElement(), StrictImpl.class);
int _size = IterableExtensions.size(iterableOfStrictImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2394,8 +2078,7 @@
*/
@Check
public void checkCountRollback(final Unit unit) {
- EList<UnitElement> _unitElements = unit.getUnitElements();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_unitElements, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(unit.getUnitElements(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2412,8 +2095,7 @@
*/
@Check
public void checkCountRollbackSubSequence(final UnitElement unit) {
- EList<UnitElement> _subSequence = unit.getSubSequence();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_subSequence, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(unit.getSubSequence(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2433,8 +2115,7 @@
EList<org.eclipse.emf.henshin.text.henshin_text.List> _listOfLists = unit.getListOfLists();
for (final org.eclipse.emf.henshin.text.henshin_text.List e : _listOfLists) {
{
- EList<UnitElement> _subElements = e.getSubElements();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_subElements, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(e.getSubElements(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2453,12 +2134,9 @@
*/
@Check
public void checkCountRollbackConditionalUnit(final ConditionalUnit unit) {
- EList<UnitElement> _if = unit.getIf();
- Iterable<RollbackImpl> iterableOfRollbackImplIF = Iterables.<RollbackImpl>filter(_if, RollbackImpl.class);
- EList<UnitElement> _then = unit.getThen();
- Iterable<RollbackImpl> iterableOfRollbackImplTHEN = Iterables.<RollbackImpl>filter(_then, RollbackImpl.class);
- EList<UnitElement> _else = unit.getElse();
- Iterable<RollbackImpl> iterableOfRollbackImplELSE = Iterables.<RollbackImpl>filter(_else, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImplIF = Iterables.<RollbackImpl>filter(unit.getIf(), RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImplTHEN = Iterables.<RollbackImpl>filter(unit.getThen(), RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImplELSE = Iterables.<RollbackImpl>filter(unit.getElse(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImplIF);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2492,8 +2170,7 @@
EList<org.eclipse.emf.henshin.text.henshin_text.List> _listOfLists = unit.getListOfLists();
for (final org.eclipse.emf.henshin.text.henshin_text.List e : _listOfLists) {
{
- EList<UnitElement> _subElements = e.getSubElements();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_subElements, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(e.getSubElements(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2512,8 +2189,7 @@
*/
@Check
public void checkCountRollbackIteratedUnit(final IteratedUnit unit) {
- EList<UnitElement> _subElement = unit.getSubElement();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_subElement, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(unit.getSubElement(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2530,8 +2206,7 @@
*/
@Check
public void checkCountRollbackLoopUnit(final LoopUnit unit) {
- EList<UnitElement> _subElement = unit.getSubElement();
- Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(_subElement, RollbackImpl.class);
+ Iterable<RollbackImpl> iterableOfRollbackImpl = Iterables.<RollbackImpl>filter(unit.getSubElement(), RollbackImpl.class);
int _size = IterableExtensions.size(iterableOfRollbackImpl);
boolean _greaterThan = (_size > 1);
if (_greaterThan) {
@@ -2548,8 +2223,7 @@
*/
@Check
public void checkTypeNot(final NotExpression not) {
- Expression _expression = not.getExpression();
- this.checkExpectedType(_expression, Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.NOT_EXPRESSION__EXPRESSION);
+ this.checkExpectedType(not.getExpression(), Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.NOT_EXPRESSION__EXPRESSION);
}
/**
@@ -2559,10 +2233,8 @@
*/
@Check
public void checkTypeMulOrDiv(final MulOrDivExpression mulOrDiv) {
- Expression _left = mulOrDiv.getLeft();
- this.checkExpectedType(_left, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MUL_OR_DIV_EXPRESSION__LEFT);
- Expression _right = mulOrDiv.getRight();
- this.checkExpectedType(_right, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MUL_OR_DIV_EXPRESSION__RIGHT);
+ this.checkExpectedType(mulOrDiv.getLeft(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MUL_OR_DIV_EXPRESSION__LEFT);
+ this.checkExpectedType(mulOrDiv.getRight(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MUL_OR_DIV_EXPRESSION__RIGHT);
}
/**
@@ -2572,10 +2244,8 @@
*/
@Check
public void checkTypeMinus(final MinusExpression minus) {
- Expression _left = minus.getLeft();
- this.checkExpectedType(_left, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MINUS_EXPRESSION__LEFT);
- Expression _right = minus.getRight();
- this.checkExpectedType(_right, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MINUS_EXPRESSION__RIGHT);
+ this.checkExpectedType(minus.getLeft(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MINUS_EXPRESSION__LEFT);
+ this.checkExpectedType(minus.getRight(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.MINUS_EXPRESSION__RIGHT);
}
/**
@@ -2585,10 +2255,8 @@
*/
@Check
public void checkTypePlus(final PlusExpression plus) {
- Expression _left = plus.getLeft();
- this.checkExpectedType(_left, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.PLUS_EXPRESSION__LEFT);
- Expression _right = plus.getRight();
- this.checkExpectedType(_right, Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.PLUS_EXPRESSION__RIGHT);
+ this.checkExpectedType(plus.getLeft(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.PLUS_EXPRESSION__LEFT);
+ this.checkExpectedType(plus.getRight(), Henshin_textTypeProvider.numberType, Henshin_textPackage.Literals.PLUS_EXPRESSION__RIGHT);
}
/**
@@ -2598,10 +2266,8 @@
*/
@Check
public void checkTypeAnd(final AndExpression and) {
- Expression _left = and.getLeft();
- this.checkExpectedType(_left, Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.AND_EXPRESSION__LEFT);
- Expression _right = and.getRight();
- this.checkExpectedType(_right, Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.AND_EXPRESSION__RIGHT);
+ this.checkExpectedType(and.getLeft(), Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.AND_EXPRESSION__LEFT);
+ this.checkExpectedType(and.getRight(), Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.AND_EXPRESSION__RIGHT);
}
/**
@@ -2611,10 +2277,8 @@
*/
@Check
public void checkTypeOr(final OrExpression or) {
- Expression _left = or.getLeft();
- this.checkExpectedType(_left, Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.OR_EXPRESSION__LEFT);
- Expression _right = or.getRight();
- this.checkExpectedType(_right, Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.OR_EXPRESSION__RIGHT);
+ this.checkExpectedType(or.getLeft(), Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.OR_EXPRESSION__LEFT);
+ this.checkExpectedType(or.getRight(), Henshin_textTypeProvider.boolType, Henshin_textPackage.Literals.OR_EXPRESSION__RIGHT);
}
/**
@@ -2624,13 +2288,10 @@
*/
@Check
public void checkTypeEquality(final EqualityExpression equality) {
- Expression _left = equality.getLeft();
- final Henshin_textType leftType = this.getTypeAndCheckNotNull(_left, Henshin_textPackage.Literals.EQUALITY_EXPRESSION__LEFT);
- Expression _right = equality.getRight();
- final Henshin_textType rightType = this.getTypeAndCheckNotNull(_right, Henshin_textPackage.Literals.EQUALITY_EXPRESSION__RIGHT);
+ final Henshin_textType leftType = this.getTypeAndCheckNotNull(equality.getLeft(), Henshin_textPackage.Literals.EQUALITY_EXPRESSION__LEFT);
+ final Henshin_textType rightType = this.getTypeAndCheckNotNull(equality.getRight(), Henshin_textPackage.Literals.EQUALITY_EXPRESSION__RIGHT);
if ((((!Objects.equal(leftType, rightType)) && (!Objects.equal(leftType, null))) && (!Objects.equal(rightType, null)))) {
- EAttribute _eIDAttribute = Henshin_textPackage.Literals.EQUALITY_EXPRESSION.getEIDAttribute();
- this.error((((("Expression expected the same type, but was " + leftType) + " and ") + rightType) + ".\'"), _eIDAttribute, "");
+ this.error((((("Expression expected the same type, but was " + leftType) + " and ") + rightType) + ".\'"), Henshin_textPackage.Literals.EQUALITY_EXPRESSION.getEIDAttribute(), "");
}
}
@@ -2641,13 +2302,10 @@
*/
@Check
public void checkTypeComparison(final ComparisonExpression comparison) {
- Expression _left = comparison.getLeft();
- final Henshin_textType leftType = this.getTypeAndCheckNotNull(_left, Henshin_textPackage.Literals.COMPARISON_EXPRESSION__LEFT);
- Expression _right = comparison.getRight();
- final Henshin_textType rightType = this.getTypeAndCheckNotNull(_right, Henshin_textPackage.Literals.COMPARISON_EXPRESSION__RIGHT);
+ final Henshin_textType leftType = this.getTypeAndCheckNotNull(comparison.getLeft(), Henshin_textPackage.Literals.COMPARISON_EXPRESSION__LEFT);
+ final Henshin_textType rightType = this.getTypeAndCheckNotNull(comparison.getRight(), Henshin_textPackage.Literals.COMPARISON_EXPRESSION__RIGHT);
if ((((!Objects.equal(leftType, rightType)) && (!Objects.equal(leftType, null))) && (!Objects.equal(rightType, null)))) {
- EAttribute _eIDAttribute = Henshin_textPackage.Literals.COMPARISON_EXPRESSION.getEIDAttribute();
- this.error((((("Expression expected the same type, but was " + leftType) + " and ") + rightType) + ".\'"), _eIDAttribute, "");
+ this.error((((("Expression expected the same type, but was " + leftType) + " and ") + rightType) + ".\'"), Henshin_textPackage.Literals.COMPARISON_EXPRESSION.getEIDAttribute(), "");
}
if ((Objects.equal(leftType, Henshin_textTypeProvider.boolType) || Objects.equal(leftType, Henshin_textTypeProvider.complexType))) {
this.error("Value cannot be compared.\'", Henshin_textPackage.Literals.COMPARISON_EXPRESSION__LEFT, "");
@@ -2684,8 +2342,7 @@
Henshin_textType type = null;
boolean _notEquals = (!Objects.equal(expression, null));
if (_notEquals) {
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(expression);
- type = _typeFor;
+ type = this._henshin_textTypeProvider.typeFor(expression);
}
boolean _equals = Objects.equal(type, null);
if (_equals) {
@@ -2704,51 +2361,35 @@
Expression _value = attribute.getValue();
if ((_value instanceof ParameterValue)) {
if (((!Objects.equal(((ParameterValue) attribute.getValue()).getValue().getType().getType(), null)) && (!Objects.equal(attribute.getName().getEAttributeType().getName(), ((ParameterValue) attribute.getValue()).getValue().getType().getType().getName())))) {
- EAttribute _name = attribute.getName();
- EDataType _eAttributeType = _name.getEAttributeType();
- String _name_1 = _eAttributeType.getName();
- String _plus = ("Attribute expected " + _name_1);
+ String _name = attribute.getName().getEAttributeType().getName();
+ String _plus = ("Attribute expected " + _name);
String _plus_1 = (_plus + " type, but was ");
Expression _value_1 = attribute.getValue();
- Parameter _value_2 = ((ParameterValue) _value_1).getValue();
- ParameterType _type = _value_2.getType();
- EClass _type_1 = _type.getType();
- String _name_2 = _type_1.getName();
- String _plus_2 = (_plus_1 + _name_2);
+ String _name_1 = ((ParameterValue) _value_1).getValue().getType().getType().getName();
+ String _plus_2 = (_plus_1 + _name_1);
String _plus_3 = (_plus_2 + ".\'");
- EReference _attribute_Value = Henshin_textPackage.eINSTANCE.getAttribute_Value();
- this.error(_plus_3, attribute, _attribute_Value);
+ this.error(_plus_3, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Value());
} else {
if (((!Objects.equal(this._henshin_textTypeProvider.typeFor(attribute.getName().getEAttributeType().getName()).toString(), "string")) && (!Objects.equal(this._henshin_textTypeProvider.typeFor(attribute.getName().getEAttributeType().getName()), this._henshin_textTypeProvider.typeFor(((ParameterValue) attribute.getValue()).getValue().getType().getEnumType().getLiteral()))))) {
- EAttribute _name_3 = attribute.getName();
- EDataType _eAttributeType_1 = _name_3.getEAttributeType();
- String _name_4 = _eAttributeType_1.getName();
- String _plus_4 = ("Attribute expected " + _name_4);
+ String _name_2 = attribute.getName().getEAttributeType().getName();
+ String _plus_4 = ("Attribute expected " + _name_2);
String _plus_5 = (_plus_4 + " type, but was ");
- Expression _value_3 = attribute.getValue();
- Parameter _value_4 = ((ParameterValue) _value_3).getValue();
- ParameterType _type_2 = _value_4.getType();
- Type _enumType = _type_2.getEnumType();
- String _literal = _enumType.getLiteral();
+ Expression _value_2 = attribute.getValue();
+ String _literal = ((ParameterValue) _value_2).getValue().getType().getEnumType().getLiteral();
String _plus_6 = (_plus_5 + _literal);
String _plus_7 = (_plus_6 + ".\'");
- EReference _attribute_Value_1 = Henshin_textPackage.eINSTANCE.getAttribute_Value();
- this.error(_plus_7, attribute, _attribute_Value_1);
+ this.error(_plus_7, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Value());
}
}
} else {
if (((!Objects.equal(this._henshin_textTypeProvider.typeFor(attribute.getName().getEAttributeType().getName()).toString(), "string")) && (!Objects.equal(this._henshin_textTypeProvider.typeFor(attribute.getName().getEAttributeType().getName()), this._henshin_textTypeProvider.typeFor(attribute.getValue()))))) {
- EAttribute _name_5 = attribute.getName();
- EDataType _eAttributeType_2 = _name_5.getEAttributeType();
- String _name_6 = _eAttributeType_2.getName();
- String _plus_8 = ("Attribute expected " + _name_6);
+ String _name_3 = attribute.getName().getEAttributeType().getName();
+ String _plus_8 = ("Attribute expected " + _name_3);
String _plus_9 = (_plus_8 + " type, but was ");
- Expression _value_5 = attribute.getValue();
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_value_5);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(attribute.getValue());
String _plus_10 = (_plus_9 + _typeFor);
String _plus_11 = (_plus_10 + ".\'");
- EReference _attribute_Value_2 = Henshin_textPackage.eINSTANCE.getAttribute_Value();
- this.error(_plus_11, attribute, _attribute_Value_2);
+ this.error(_plus_11, attribute, Henshin_textPackage.eINSTANCE.getAttribute_Value());
}
}
}
@@ -2763,51 +2404,35 @@
Expression _value = match.getValue();
if ((_value instanceof ParameterValue)) {
if (((!Objects.equal(((ParameterValue) match.getValue()).getValue().getType().getType(), null)) && (!Objects.equal(match.getName().getEAttributeType().getName(), ((ParameterValue) match.getValue()).getValue().getType().getType().getName())))) {
- EAttribute _name = match.getName();
- EDataType _eAttributeType = _name.getEAttributeType();
- String _name_1 = _eAttributeType.getName();
- String _plus = ("Attribute expected " + _name_1);
+ String _name = match.getName().getEAttributeType().getName();
+ String _plus = ("Attribute expected " + _name);
String _plus_1 = (_plus + " type, but was ");
Expression _value_1 = match.getValue();
- Parameter _value_2 = ((ParameterValue) _value_1).getValue();
- ParameterType _type = _value_2.getType();
- EClass _type_1 = _type.getType();
- String _name_2 = _type_1.getName();
- String _plus_2 = (_plus_1 + _name_2);
+ String _name_1 = ((ParameterValue) _value_1).getValue().getType().getType().getName();
+ String _plus_2 = (_plus_1 + _name_1);
String _plus_3 = (_plus_2 + ".\'");
- EReference _match_Value = Henshin_textPackage.eINSTANCE.getMatch_Value();
- this.error(_plus_3, match, _match_Value);
+ this.error(_plus_3, match, Henshin_textPackage.eINSTANCE.getMatch_Value());
} else {
if (((!Objects.equal(this._henshin_textTypeProvider.typeFor(match.getName().getEAttributeType().getName()).toString(), "string")) && (!Objects.equal(this._henshin_textTypeProvider.typeFor(match.getName().getEAttributeType().getName()), this._henshin_textTypeProvider.typeFor(((ParameterValue) match.getValue()).getValue().getType().getEnumType().getLiteral()))))) {
- EAttribute _name_3 = match.getName();
- EDataType _eAttributeType_1 = _name_3.getEAttributeType();
- String _name_4 = _eAttributeType_1.getName();
- String _plus_4 = ("Attribute expected " + _name_4);
+ String _name_2 = match.getName().getEAttributeType().getName();
+ String _plus_4 = ("Attribute expected " + _name_2);
String _plus_5 = (_plus_4 + " type, but was ");
- Expression _value_3 = match.getValue();
- Parameter _value_4 = ((ParameterValue) _value_3).getValue();
- ParameterType _type_2 = _value_4.getType();
- Type _enumType = _type_2.getEnumType();
- String _literal = _enumType.getLiteral();
+ Expression _value_2 = match.getValue();
+ String _literal = ((ParameterValue) _value_2).getValue().getType().getEnumType().getLiteral();
String _plus_6 = (_plus_5 + _literal);
String _plus_7 = (_plus_6 + ".\'");
- EReference _match_Value_1 = Henshin_textPackage.eINSTANCE.getMatch_Value();
- this.error(_plus_7, match, _match_Value_1);
+ this.error(_plus_7, match, Henshin_textPackage.eINSTANCE.getMatch_Value());
}
}
} else {
if (((!Objects.equal(this._henshin_textTypeProvider.typeFor(match.getName().getEAttributeType().getName()).toString(), "string")) && (!Objects.equal(this._henshin_textTypeProvider.typeFor(match.getName().getEAttributeType().getName()), this._henshin_textTypeProvider.typeFor(match.getValue()))))) {
- EAttribute _name_5 = match.getName();
- EDataType _eAttributeType_2 = _name_5.getEAttributeType();
- String _name_6 = _eAttributeType_2.getName();
- String _plus_8 = ("Attribute expected " + _name_6);
+ String _name_3 = match.getName().getEAttributeType().getName();
+ String _plus_8 = ("Attribute expected " + _name_3);
String _plus_9 = (_plus_8 + " type, but was ");
- Expression _value_5 = match.getValue();
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_value_5);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(match.getValue());
String _plus_10 = (_plus_9 + _typeFor);
String _plus_11 = (_plus_10 + ".\'");
- EReference _match_Value_2 = Henshin_textPackage.eINSTANCE.getMatch_Value();
- this.error(_plus_11, match, _match_Value_2);
+ this.error(_plus_11, match, Henshin_textPackage.eINSTANCE.getMatch_Value());
}
}
}
@@ -2825,17 +2450,13 @@
try {
String _packagename = imports.getPackagename();
String _plus = (_packagename + ".");
- String _value = attribute.getValue();
- String[] _split = _value.split("\\.");
- String _get = _split[0];
+ String _get = attribute.getValue().split("\\.")[0];
String _plus_1 = (_plus + _get);
Class<?> calledClass = Class.forName(_plus_1);
Field[] _declaredFields = calledClass.getDeclaredFields();
for (final Field atrib : _declaredFields) {
String _name = atrib.getName();
- String _value_1 = attribute.getValue();
- String[] _split_1 = _value_1.split("\\.");
- Object _get_1 = _split_1[1];
+ Object _get_1 = attribute.getValue().split("\\.")[1];
boolean _equals = Objects.equal(_name, _get_1);
if (_equals) {
javaAttribute = atrib;
@@ -2843,18 +2464,16 @@
}
} catch (final Throwable _t) {
if (_t instanceof ClassNotFoundException) {
- final ClassNotFoundException e = (ClassNotFoundException)_t;
} else {
throw Exceptions.sneakyThrow(_t);
}
}
}
- boolean _equals_1 = Objects.equal(javaAttribute, null);
- if (_equals_1) {
- String _value_2 = attribute.getValue();
- String _plus_2 = (_value_2 + " doesn\'t exist.\'");
- EAttribute _javaAttributeValue_Value = Henshin_textPackage.eINSTANCE.getJavaAttributeValue_Value();
- this.error(_plus_2, attribute, _javaAttributeValue_Value);
+ boolean _equals = Objects.equal(javaAttribute, null);
+ if (_equals) {
+ String _value = attribute.getValue();
+ String _plus = (_value + " doesn\'t exist.\'");
+ this.error(_plus, attribute, Henshin_textPackage.eINSTANCE.getJavaAttributeValue_Value());
}
}
@@ -2871,17 +2490,13 @@
try {
String _packagename = imports.getPackagename();
String _plus = (_packagename + ".");
- String _value = classCall.getValue();
- String[] _split = _value.split("\\.");
- String _get = _split[0];
+ String _get = classCall.getValue().split("\\.")[0];
String _plus_1 = (_plus + _get);
Class<?> calledClass = Class.forName(_plus_1);
Method[] _methods = calledClass.getMethods();
for (final Method method : _methods) {
String _name = method.getName();
- String _value_1 = classCall.getValue();
- String[] _split_1 = _value_1.split("\\.");
- Object _get_1 = _split_1[1];
+ Object _get_1 = classCall.getValue().split("\\.")[1];
boolean _equals = Objects.equal(_name, _get_1);
if (_equals) {
methods.add(method);
@@ -2889,7 +2504,6 @@
}
} catch (final Throwable _t) {
if (_t instanceof ClassNotFoundException) {
- final ClassNotFoundException e = (ClassNotFoundException)_t;
} else {
throw Exceptions.sneakyThrow(_t);
}
@@ -2898,31 +2512,23 @@
int _size = methods.size();
boolean _lessEqualsThan = (_size <= 0);
if (_lessEqualsThan) {
- String _value_2 = classCall.getValue();
- String _plus_2 = (_value_2 + " doesn\'t exist.\'");
- EAttribute _javaClassValue_Value = Henshin_textPackage.eINSTANCE.getJavaClassValue_Value();
- this.error(_plus_2, classCall, _javaClassValue_Value);
+ String _value = classCall.getValue();
+ String _plus = (_value + " doesn\'t exist.\'");
+ this.error(_plus, classCall, Henshin_textPackage.eINSTANCE.getJavaClassValue_Value());
} else {
boolean badParametercount = true;
boolean wrongParameterType = false;
boolean methodExist = false;
- for (final Method method_1 : methods) {
+ for (final Method method : methods) {
if ((!methodExist)) {
- Class<?>[] _parameterTypes = method_1.getParameterTypes();
- int _size_1 = ((List<Class<?>>)Conversions.doWrapArray(_parameterTypes)).size();
- EList<Expression> _javaParameter = classCall.getJavaParameter();
- int _size_2 = _javaParameter.size();
- boolean _equals_1 = (_size_1 == _size_2);
- if (_equals_1) {
+ int _size_1 = ((List<Class<?>>)Conversions.doWrapArray(method.getParameterTypes())).size();
+ int _size_2 = classCall.getJavaParameter().size();
+ boolean _equals = (_size_1 == _size_2);
+ if (_equals) {
badParametercount = false;
for (int i = 0; (i < classCall.getJavaParameter().size()); i++) {
- EList<Expression> _javaParameter_1 = classCall.getJavaParameter();
- Expression _get_2 = _javaParameter_1.get(i);
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_get_2);
- Class<?>[] _parameterTypes_1 = method_1.getParameterTypes();
- Class<?> _get_3 = _parameterTypes_1[i];
- String _name_1 = _get_3.getName();
- Henshin_textType _typeForJavaType = this._henshin_textTypeProvider.typeForJavaType(_name_1);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(classCall.getJavaParameter().get(i));
+ Henshin_textType _typeForJavaType = this._henshin_textTypeProvider.typeForJavaType((method.getParameterTypes()[i]).getName());
boolean _notEquals = (!Objects.equal(_typeFor, _typeForJavaType));
if (_notEquals) {
wrongParameterType = true;
@@ -2938,42 +2544,24 @@
}
}
if ((!methodExist)) {
- Method _get_2 = methods.get(0);
- Class<?>[] _parameterTypes_1 = _get_2.getParameterTypes();
- int _size_3 = ((List<Class<?>>)Conversions.doWrapArray(_parameterTypes_1)).size();
- EList<Expression> _javaParameter_1 = classCall.getJavaParameter();
- int _size_4 = _javaParameter_1.size();
+ int _size_3 = ((List<Class<?>>)Conversions.doWrapArray(methods.get(0).getParameterTypes())).size();
+ int _size_4 = classCall.getJavaParameter().size();
boolean _notEquals = (_size_3 != _size_4);
if (_notEquals) {
- EAttribute _javaClassValue_Value_1 = Henshin_textPackage.eINSTANCE.getJavaClassValue_Value();
- this.error("Bad Parameter Count.\'", classCall, _javaClassValue_Value_1);
+ this.error("Bad Parameter Count.\'", classCall, Henshin_textPackage.eINSTANCE.getJavaClassValue_Value());
} else {
for (int i = 0; (i < classCall.getJavaParameter().size()); i++) {
- EList<Expression> _javaParameter_2 = classCall.getJavaParameter();
- Expression _get_3 = _javaParameter_2.get(i);
- Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(_get_3);
- Method _get_4 = methods.get(0);
- Class<?>[] _parameterTypes_2 = _get_4.getParameterTypes();
- Class<?> _get_5 = _parameterTypes_2[i];
- String _name_1 = _get_5.getName();
- Henshin_textType _typeForJavaType = this._henshin_textTypeProvider.typeForJavaType(_name_1);
+ Henshin_textType _typeFor = this._henshin_textTypeProvider.typeFor(classCall.getJavaParameter().get(i));
+ Henshin_textType _typeForJavaType = this._henshin_textTypeProvider.typeForJavaType((methods.get(0).getParameterTypes()[i]).getName());
boolean _notEquals_1 = (!Objects.equal(_typeFor, _typeForJavaType));
if (_notEquals_1) {
- Method _get_6 = methods.get(0);
- Class<?>[] _parameterTypes_3 = _get_6.getParameterTypes();
- Class<?> _get_7 = _parameterTypes_3[i];
- String _name_2 = _get_7.getName();
- String _plus_3 = ("Methode expected " + _name_2);
- String _plus_4 = (_plus_3 + " type, but was ");
- EList<Expression> _javaParameter_3 = classCall.getJavaParameter();
- Expression _get_8 = _javaParameter_3.get(i);
- Henshin_textType _typeFor_1 = this._henshin_textTypeProvider.typeFor(_get_8);
- String _plus_5 = (_plus_4 + _typeFor_1);
- String _plus_6 = (_plus_5 + ".\'");
- EList<Expression> _javaParameter_4 = classCall.getJavaParameter();
- Expression _get_9 = _javaParameter_4.get(i);
- EReference _javaClassValue_JavaParameter = Henshin_textPackage.eINSTANCE.getJavaClassValue_JavaParameter();
- this.error(_plus_6, _get_9, _javaClassValue_JavaParameter);
+ String _name = (methods.get(0).getParameterTypes()[i]).getName();
+ String _plus_1 = ("Methode expected " + _name);
+ String _plus_2 = (_plus_1 + " type, but was ");
+ Henshin_textType _typeFor_1 = this._henshin_textTypeProvider.typeFor(classCall.getJavaParameter().get(i));
+ String _plus_3 = (_plus_2 + _typeFor_1);
+ String _plus_4 = (_plus_3 + ".\'");
+ this.error(_plus_4, classCall.getJavaParameter().get(i), Henshin_textPackage.eINSTANCE.getJavaClassValue_JavaParameter());
}
}
}
@@ -2992,23 +2580,17 @@
List<JavaImport> iterableOfJavaImportImpl = new ArrayList<JavaImport>();
EObject container = startObject.eContainer();
while (((!(container instanceof Rule)) && (!(container instanceof MultiRule)))) {
- EObject _eContainer = container.eContainer();
- container = _eContainer;
+ container = container.eContainer();
}
if ((container instanceof Rule)) {
- EList<RuleElement> _ruleElements = ((Rule) container).getRuleElements();
- Iterable<JavaImport> _filter = Iterables.<JavaImport>filter(_ruleElements, JavaImport.class);
- Iterables.<JavaImport>addAll(iterableOfJavaImportImpl, _filter);
+ Iterables.<JavaImport>addAll(iterableOfJavaImportImpl, Iterables.<JavaImport>filter(((Rule) container).getRuleElements(), JavaImport.class));
} else {
- EList<RuleElement> _multiruleElements = ((MultiRule) container).getMultiruleElements();
- Iterable<JavaImport> _filter_1 = Iterables.<JavaImport>filter(_multiruleElements, JavaImport.class);
- Iterables.<JavaImport>addAll(iterableOfJavaImportImpl, _filter_1);
+ Iterables.<JavaImport>addAll(iterableOfJavaImportImpl, Iterables.<JavaImport>filter(((MultiRule) container).getMultiruleElements(), JavaImport.class));
}
EObject _eContainer = container.eContainer();
boolean _not = (!(_eContainer instanceof Model));
if (_not) {
- List<JavaImport> _importList = this.getImportList(container);
- iterableOfJavaImportImpl.addAll(_importList);
+ iterableOfJavaImportImpl.addAll(this.getImportList(container));
}
return iterableOfJavaImportImpl;
}
diff --git a/promote.sh b/promote.sh
index 499f052..8126133 100755
--- a/promote.sh
+++ b/promote.sh
@@ -15,5 +15,6 @@
SRC="p2updatesite/target/repository"
TRG="/home/data/httpd/download.eclipse.org/modeling/emft/henshin/updates/$BUILD"
-rm -R $TRG/* 2> /dev/null
-cp -R $SRC/* $TRG
+ssh genie.henshin@projects-storage.eclipse.org rm -R $TRG/* 2> /dev/null
+scp -pr $SRC/. genie.henshin@projects-storage.eclipse.org:$TRG
+ssh genie.henshin@projects-storage.eclipse.org ls -al $TRG
\ No newline at end of file