diff --git a/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore b/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore index 294a9e2a4f6ee580456eba15ff74754211d458b9..1da11333d0558c95508e6f3527ff6b415e715267 100644 --- a/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore +++ b/tools.descartes.dni.adaptation/model/DNIMM3AP.xcore @@ -9,6 +9,7 @@ package tools.descartes.dni.dnimm3ap class AdaptationPoints { contains AdaptationRepositories repositories contains AdaptationGroups groups + refers tools.descartes.dni.dnimm3.NetworkInfrastructure networkInfrastructure } // diff --git a/tools.descartes.dni.adaptation/plugin.properties b/tools.descartes.dni.adaptation/plugin.properties index 90f96fad7446ad753e1be870e17919e9862934d6..40643c00abce1adae225ec1772d1a4c7da1207a7 100644 --- a/tools.descartes.dni.adaptation/plugin.properties +++ b/tools.descartes.dni.adaptation/plugin.properties @@ -398,3 +398,4 @@ _UI_AdaptationRepositories_links_feature = Links _UI_AdaptationRepositories_linkPerformances_feature = Link Performances _UI_AdaptationGroups_nodes_feature = Nodes _UI_AdaptationGroups_links_feature = Links +_UI_AdaptationPoints_networkInfrastructure_feature = Network Infrastructure diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/AdaptationPoints.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/AdaptationPoints.java index 85a46830ab90f6b451eb760a827e73783e3d7fd7..80659cc6175faf17451bdda486466f83da7b16f2 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/AdaptationPoints.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/AdaptationPoints.java @@ -3,6 +3,7 @@ package tools.descartes.dni.dnimm3ap; import org.eclipse.emf.ecore.EObject; +import tools.descartes.dni.dnimm3.NetworkInfrastructure; /** * <!-- begin-user-doc --> @@ -15,6 +16,7 @@ import org.eclipse.emf.ecore.EObject; * <ul> * <li>{@link tools.descartes.dni.dnimm3ap.AdaptationPoints#getRepositories <em>Repositories</em>}</li> * <li>{@link tools.descartes.dni.dnimm3ap.AdaptationPoints#getGroups <em>Groups</em>}</li> + * <li>{@link tools.descartes.dni.dnimm3ap.AdaptationPoints#getNetworkInfrastructure <em>Network Infrastructure</em>}</li> * </ul> * * @see tools.descartes.dni.dnimm3ap.DNIAPPackage#getAdaptationPoints() @@ -74,4 +76,30 @@ public interface AdaptationPoints extends EObject { */ void setGroups(AdaptationGroups value); + /** + * Returns the value of the '<em><b>Network Infrastructure</b></em>' reference. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Network Infrastructure</em>' reference isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Network Infrastructure</em>' reference. + * @see #setNetworkInfrastructure(NetworkInfrastructure) + * @see tools.descartes.dni.dnimm3ap.DNIAPPackage#getAdaptationPoints_NetworkInfrastructure() + * @model + * @generated + */ + NetworkInfrastructure getNetworkInfrastructure(); + + /** + * Sets the value of the '{@link tools.descartes.dni.dnimm3ap.AdaptationPoints#getNetworkInfrastructure <em>Network Infrastructure</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Network Infrastructure</em>' reference. + * @see #getNetworkInfrastructure() + * @generated + */ + void setNetworkInfrastructure(NetworkInfrastructure value); + } // AdaptationPoints diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java index c476b8b31a6776a5ce5422cc25035a2acb6fda6d..beab7c71ec85b21d47408e2086d48a14075fc0f9 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/DNIAPPackage.java @@ -87,6 +87,15 @@ public interface DNIAPPackage extends EPackage { */ int ADAPTATION_POINTS__GROUPS = 1; + /** + * The feature id for the '<em><b>Network Infrastructure</b></em>' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + * @ordered + */ + int ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE = 2; + /** * The number of structural features of the '<em>Adaptation Points</em>' class. * <!-- begin-user-doc --> @@ -94,7 +103,7 @@ public interface DNIAPPackage extends EPackage { * @generated * @ordered */ - int ADAPTATION_POINTS_FEATURE_COUNT = 2; + int ADAPTATION_POINTS_FEATURE_COUNT = 3; /** * The number of operations of the '<em>Adaptation Points</em>' class. @@ -1211,6 +1220,17 @@ public interface DNIAPPackage extends EPackage { */ EReference getAdaptationPoints_Groups(); + /** + * Returns the meta object for the reference '{@link tools.descartes.dni.dnimm3ap.AdaptationPoints#getNetworkInfrastructure <em>Network Infrastructure</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the reference '<em>Network Infrastructure</em>'. + * @see tools.descartes.dni.dnimm3ap.AdaptationPoints#getNetworkInfrastructure() + * @see #getAdaptationPoints() + * @generated + */ + EReference getAdaptationPoints_NetworkInfrastructure(); + /** * Returns the meta object for class '{@link tools.descartes.dni.dnimm3ap.AdaptationRepositories <em>Adaptation Repositories</em>}'. * <!-- begin-user-doc --> @@ -1911,6 +1931,14 @@ public interface DNIAPPackage extends EPackage { */ EReference ADAPTATION_POINTS__GROUPS = eINSTANCE.getAdaptationPoints_Groups(); + /** + * The meta object literal for the '<em><b>Network Infrastructure</b></em>' reference feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + EReference ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE = eINSTANCE.getAdaptationPoints_NetworkInfrastructure(); + /** * The meta object literal for the '{@link tools.descartes.dni.dnimm3ap.impl.AdaptationRepositoriesImpl <em>Adaptation Repositories</em>}' class. * <!-- begin-user-doc --> diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/AdaptationPointsImpl.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/AdaptationPointsImpl.java index c23ddd8187dc94625f9dff67f55887670db17e6d..85d3249eca4dcc2a9c73ae960240d7fff2388d4a 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/AdaptationPointsImpl.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/AdaptationPointsImpl.java @@ -8,6 +8,7 @@ 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 tools.descartes.dni.dnimm3.NetworkInfrastructure; import tools.descartes.dni.dnimm3ap.AdaptationGroups; import tools.descartes.dni.dnimm3ap.AdaptationPoints; import tools.descartes.dni.dnimm3ap.AdaptationRepositories; @@ -23,6 +24,7 @@ import tools.descartes.dni.dnimm3ap.DNIAPPackage; * <ul> * <li>{@link tools.descartes.dni.dnimm3ap.impl.AdaptationPointsImpl#getRepositories <em>Repositories</em>}</li> * <li>{@link tools.descartes.dni.dnimm3ap.impl.AdaptationPointsImpl#getGroups <em>Groups</em>}</li> + * <li>{@link tools.descartes.dni.dnimm3ap.impl.AdaptationPointsImpl#getNetworkInfrastructure <em>Network Infrastructure</em>}</li> * </ul> * * @generated @@ -48,6 +50,16 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement */ protected AdaptationGroups groups; + /** + * The cached value of the '{@link #getNetworkInfrastructure() <em>Network Infrastructure</em>}' reference. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @see #getNetworkInfrastructure() + * @generated + * @ordered + */ + protected NetworkInfrastructure networkInfrastructure; + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -153,6 +165,44 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.ADAPTATION_POINTS__GROUPS, newGroups, newGroups)); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NetworkInfrastructure getNetworkInfrastructure() { + if (networkInfrastructure != null && networkInfrastructure.eIsProxy()) { + InternalEObject oldNetworkInfrastructure = (InternalEObject)networkInfrastructure; + networkInfrastructure = (NetworkInfrastructure)eResolveProxy(oldNetworkInfrastructure); + if (networkInfrastructure != oldNetworkInfrastructure) { + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.RESOLVE, DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE, oldNetworkInfrastructure, networkInfrastructure)); + } + } + return networkInfrastructure; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public NetworkInfrastructure basicGetNetworkInfrastructure() { + return networkInfrastructure; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setNetworkInfrastructure(NetworkInfrastructure newNetworkInfrastructure) { + NetworkInfrastructure oldNetworkInfrastructure = networkInfrastructure; + networkInfrastructure = newNetworkInfrastructure; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE, oldNetworkInfrastructure, networkInfrastructure)); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -181,6 +231,9 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement return getRepositories(); case DNIAPPackage.ADAPTATION_POINTS__GROUPS: return getGroups(); + case DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE: + if (resolve) return getNetworkInfrastructure(); + return basicGetNetworkInfrastructure(); } return super.eGet(featureID, resolve, coreType); } @@ -200,6 +253,9 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement case DNIAPPackage.ADAPTATION_POINTS__GROUPS: setGroups((AdaptationGroups)newValue); return; + case DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE: + setNetworkInfrastructure((NetworkInfrastructure)newValue); + return; } super.eSet(featureID, newValue); } @@ -218,6 +274,9 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement case DNIAPPackage.ADAPTATION_POINTS__GROUPS: setGroups((AdaptationGroups)null); return; + case DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE: + setNetworkInfrastructure((NetworkInfrastructure)null); + return; } super.eUnset(featureID); } @@ -234,6 +293,8 @@ public class AdaptationPointsImpl extends MinimalEObjectImpl.Container implement return repositories != null; case DNIAPPackage.ADAPTATION_POINTS__GROUPS: return groups != null; + case DNIAPPackage.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE: + return networkInfrastructure != null; } return super.eIsSet(featureID); } diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java index 4bcf2bfef97b7cb7a7190c190eb55cb6bf9146fd..5027c6d34e09e9413295d8df4713a7cbb141bd13 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/impl/DNIAPPackageImpl.java @@ -284,6 +284,15 @@ public class DNIAPPackageImpl extends EPackageImpl implements DNIAPPackage { return (EReference)adaptationPointsEClass.getEStructuralFeatures().get(1); } + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public EReference getAdaptationPoints_NetworkInfrastructure() { + return (EReference)adaptationPointsEClass.getEStructuralFeatures().get(2); + } + /** * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -864,6 +873,7 @@ public class DNIAPPackageImpl extends EPackageImpl implements DNIAPPackage { adaptationPointsEClass = createEClass(ADAPTATION_POINTS); createEReference(adaptationPointsEClass, ADAPTATION_POINTS__REPOSITORIES); createEReference(adaptationPointsEClass, ADAPTATION_POINTS__GROUPS); + createEReference(adaptationPointsEClass, ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE); adaptationRepositoriesEClass = createEClass(ADAPTATION_REPOSITORIES); createEReference(adaptationRepositoriesEClass, ADAPTATION_REPOSITORIES__NODES); @@ -1039,6 +1049,7 @@ public class DNIAPPackageImpl extends EPackageImpl implements DNIAPPackage { initEClass(adaptationPointsEClass, AdaptationPoints.class, "AdaptationPoints", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getAdaptationPoints_Repositories(), this.getAdaptationRepositories(), null, "repositories", null, 0, 1, AdaptationPoints.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getAdaptationPoints_Groups(), this.getAdaptationGroups(), null, "groups", null, 0, 1, AdaptationPoints.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getAdaptationPoints_NetworkInfrastructure(), theDNIPackage.getNetworkInfrastructure(), null, "networkInfrastructure", null, 0, 1, AdaptationPoints.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(adaptationRepositoriesEClass, AdaptationRepositories.class, "AdaptationRepositories", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getAdaptationRepositories_Nodes(), this.getAdaptableNode(), null, "nodes", null, 0, -1, AdaptationRepositories.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); diff --git a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/AdaptationPointsItemProvider.java b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/AdaptationPointsItemProvider.java index 54f0a51c690e7baec4e41a6f480d403150e88324..75e7750511ca86682343ac3fadd3b4063dcdf846 100644 --- a/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/AdaptationPointsItemProvider.java +++ b/tools.descartes.dni.adaptation/src/tools/descartes/dni/dnimm3ap/provider/AdaptationPointsItemProvider.java @@ -13,6 +13,7 @@ import org.eclipse.emf.common.util.ResourceLocator; import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.IEditingDomainItemProvider; import org.eclipse.emf.edit.provider.IItemLabelProvider; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; @@ -61,10 +62,33 @@ public class AdaptationPointsItemProvider if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); + addNetworkInfrastructurePropertyDescriptor(object); } return itemPropertyDescriptors; } + /** + * This adds a property descriptor for the Network Infrastructure feature. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + protected void addNetworkInfrastructurePropertyDescriptor(Object object) { + itemPropertyDescriptors.add + (createItemPropertyDescriptor + (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), + getResourceLocator(), + getString("_UI_AdaptationPoints_networkInfrastructure_feature"), + getString("_UI_PropertyDescriptor_description", "_UI_AdaptationPoints_networkInfrastructure_feature", "_UI_AdaptationPoints_type"), + DNIAPPackage.Literals.ADAPTATION_POINTS__NETWORK_INFRASTRUCTURE, + true, + false, + true, + null, + null, + null)); + } + /** * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or