Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java')
-rw-r--r--extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java113
1 files changed, 69 insertions, 44 deletions
diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java
index 3f94bc1fe9c..882bc9a5170 100644
--- a/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java
+++ b/extraplugins/robotml/org.eclipse.papyrus.robotml/src/org/eclipse/papyrus/RobotML/impl/PlatformImpl.java
@@ -1,22 +1,24 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Saadia Dhouib (CEA LIST) saadia.dhouib@cea.fr - Initial API and implementation
- *****************************************************************************/
+/**
+ */
package org.eclipse.papyrus.RobotML.impl;
+import java.util.Collection;
+
import org.eclipse.emf.common.notify.Notification;
+
+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.ENotificationImpl;
+
+import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+
+import org.eclipse.papyrus.RobotML.ExternalLibrary;
import org.eclipse.papyrus.RobotML.Platform;
import org.eclipse.papyrus.RobotML.RobotMLPackage;
+
import org.eclipse.uml2.uml.Node;
/**
@@ -26,19 +28,18 @@ import org.eclipse.uml2.uml.Node;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.RobotML.impl.PlatformImpl#getBase_Node <em>Base Node</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.PlatformImpl#getBase_Node <em>Base Node</em>}</li>
+ * <li>{@link org.eclipse.papyrus.RobotML.impl.PlatformImpl#getLibrary <em>Library</em>}</li>
* </ul>
* </p>
- *
+ *
* @generated
*/
public class PlatformImpl extends SystemImpl implements Platform {
-
/**
* The cached value of the '{@link #getBase_Node() <em>Base Node</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @see #getBase_Node()
* @generated
* @ordered
@@ -46,9 +47,18 @@ public class PlatformImpl extends SystemImpl implements Platform {
protected Node base_Node;
/**
+ * The cached value of the '{@link #getLibrary() <em>Library</em>}' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getLibrary()
+ * @generated
+ * @ordered
+ */
+ protected EList<ExternalLibrary> library;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
protected PlatformImpl() {
@@ -58,7 +68,6 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
@@ -69,15 +78,14 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public Node getBase_Node() {
- if(base_Node != null && base_Node.eIsProxy()) {
+ if (base_Node != null && base_Node.eIsProxy()) {
InternalEObject oldBase_Node = (InternalEObject)base_Node;
base_Node = (Node)eResolveProxy(oldBase_Node);
- if(base_Node != oldBase_Node) {
- if(eNotificationRequired())
+ if (base_Node != oldBase_Node) {
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, RobotMLPackage.PLATFORM__BASE_NODE, oldBase_Node, base_Node));
}
}
@@ -87,7 +95,6 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public Node basicGetBase_Node() {
@@ -97,29 +104,40 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
public void setBase_Node(Node newBase_Node) {
Node oldBase_Node = base_Node;
base_Node = newBase_Node;
- if(eNotificationRequired())
+ if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, RobotMLPackage.PLATFORM__BASE_NODE, oldBase_Node, base_Node));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ * @generated
+ */
+ public EList<ExternalLibrary> getLibrary() {
+ if (library == null) {
+ library = new EObjectResolvingEList<ExternalLibrary>(ExternalLibrary.class, this, RobotMLPackage.PLATFORM__LIBRARY);
+ }
+ return library;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch(featureID) {
- case RobotMLPackage.PLATFORM__BASE_NODE:
- if(resolve)
- return getBase_Node();
- return basicGetBase_Node();
+ switch (featureID) {
+ case RobotMLPackage.PLATFORM__BASE_NODE:
+ if (resolve) return getBase_Node();
+ return basicGetBase_Node();
+ case RobotMLPackage.PLATFORM__LIBRARY:
+ return getLibrary();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -127,15 +145,19 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
+ @SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
- switch(featureID) {
- case RobotMLPackage.PLATFORM__BASE_NODE:
- setBase_Node((Node)newValue);
- return;
+ switch (featureID) {
+ case RobotMLPackage.PLATFORM__BASE_NODE:
+ setBase_Node((Node)newValue);
+ return;
+ case RobotMLPackage.PLATFORM__LIBRARY:
+ getLibrary().clear();
+ getLibrary().addAll((Collection<? extends ExternalLibrary>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -143,15 +165,17 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public void eUnset(int featureID) {
- switch(featureID) {
- case RobotMLPackage.PLATFORM__BASE_NODE:
- setBase_Node((Node)null);
- return;
+ switch (featureID) {
+ case RobotMLPackage.PLATFORM__BASE_NODE:
+ setBase_Node((Node)null);
+ return;
+ case RobotMLPackage.PLATFORM__LIBRARY:
+ getLibrary().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -159,14 +183,15 @@ public class PlatformImpl extends SystemImpl implements Platform {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
- switch(featureID) {
- case RobotMLPackage.PLATFORM__BASE_NODE:
- return base_Node != null;
+ switch (featureID) {
+ case RobotMLPackage.PLATFORM__BASE_NODE:
+ return base_Node != null;
+ case RobotMLPackage.PLATFORM__LIBRARY:
+ return library != null && !library.isEmpty();
}
return super.eIsSet(featureID);
}

Back to the top