Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Redor2016-07-07 16:00:02 +0000
committerLaurent Redor2016-07-08 11:18:57 +0000
commit82b5631fe94e15694077427ccfd9c7c87ed93ae8 (patch)
treeba42c63bc2bcf4271622568a8a0895880eaa9e59
parent66510bbee2f9351808bda043dda1cbaf7c3af8f5 (diff)
downloadorg.eclipse.sirius-82b5631fe94e15694077427ccfd9c7c87ed93ae8.tar.gz
org.eclipse.sirius-82b5631fe94e15694077427ccfd9c7c87ed93ae8.tar.xz
org.eclipse.sirius-82b5631fe94e15694077427ccfd9c7c87ed93ae8.zip
[496466] Adapt layoutdata metamodel for this feature
* Change the layoutdata metamodel used by Copy/Paste layout action to add: ** A copy of the Sirius style ** A copy of the GMF view Bug: 496466 Change-Id: I7df17d5d7ac205110d5838989f31df61cd62139d Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.ecore21
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.genmodel12
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/AbstractLayoutData.java65
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/LayoutdataPackage.java100
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/AbstractLayoutDataImpl.java216
-rw-r--r--plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/LayoutdataPackageImpl.java38
7 files changed, 444 insertions, 10 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF b/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
index 18733c8efa..e170fc592d 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/META-INF/MANIFEST.MF
@@ -30,6 +30,8 @@ Export-Package: org.eclipse.sirius.diagram.layoutdata;version="2.1.0";
org.eclipse.emf.common.notify"
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.8.0",
org.eclipse.emf.ecore;bundle-version="2.8.3";visibility:=reexport,
+ org.eclipse.gmf.runtime.notation;bundle-version="1.8.0";visibility:=reexport,
+ org.eclipse.sirius;bundle-version="4.1.0";visibility:=reexport,
org.eclipse.sirius.common;bundle-version="2.0.0"
Bundle-ActivationPolicy: lazy
Bundle-Activator: org.eclipse.sirius.diagram.layoutdata.LayoutDataPlugin$Implementation
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.ecore b/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.ecore
index f6449d3dce..c9d8f6f215 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.ecore
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.ecore
@@ -1,8 +1,7 @@
<?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="layoutdata"
- nsURI="http://www.eclipse.org/sirius/dsl/layoutdata/1.1.0" nsPrefix="layoutdata">
+<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="layoutdata" nsURI="http://www.eclipse.org/sirius/dsl/layoutdata/1.1.0"
+ nsPrefix="layoutdata">
<eClassifiers xsi:type="ecore:EClass" name="AbstractLayoutData" abstract="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
<details key="documentation" value="An astract class for all layout data."/>
@@ -19,6 +18,20 @@
<details key="documentation" value="Represents the layout of the label of this edge (only the location is used)."/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="siriusStyle" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.sirius/model/viewpoint.ecore#//Style"
+ containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A copy of the original Sirius style of this DDiagramElement."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="gmfView" lowerBound="1"
+ eType="ecore:EClass ../../org.eclipse.gmf.runtime.notation/model/notation.ecore#//View"
+ containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A copy of the original GMF View corresponding to this DDiagramElement (without copying the element reference)."/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="NodeLayoutData" eSuperTypes="#//AbstractLayoutData">
<eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.genmodel b/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.genmodel
index 34fb3e367f..bc0c31c764 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.genmodel
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/model/layoutdata.genmodel
@@ -1,19 +1,21 @@
<?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" copyrightText="Copyright (c) 2007, 2013 THALES GLOBAL SERVICES.&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Obeo - initial API and implementation&#xA;"
- modelDirectory="/org.eclipse.sirius.diagram.layoutdata/src-gen" editDirectory="/org.eclipse.sirius.diagram.layoutdata.edit/src-gen"
- modelPluginID="org.eclipse.sirius.diagram.layoutdata" modelName="Layoutdata" editPluginClass="org.eclipse.sirius.diagram.layoutdata.provider.LayoutdataEditPlugin"
+ modelDirectory="/org.eclipse.sirius.diagram.layoutdata/src-gen" editDirectory=""
+ editorDirectory="" modelPluginID="org.eclipse.sirius.diagram.layoutdata" modelName="Layoutdata"
+ editPluginClass="org.eclipse.sirius.diagram.layoutdata.provider.LayoutdataEditPlugin"
editorPluginClass="org.eclipse.sirius.diagram.layoutdata.presentation.LayoutdataEditorPlugin"
- nonNLSMarkers="true" testsDirectory="/org.eclipse.sirius.diagram.layoutdata.tests/src-gen"
- testSuiteClass="org.eclipse.sirius.diagram.layoutdata.tests.LayoutdataAllTests"
+ nonNLSMarkers="true" testsDirectory="" testSuiteClass="org.eclipse.sirius.diagram.layoutdata.tests.LayoutdataAllTests"
importerID="org.eclipse.emf.importer.ecore" containmentProxies="true" complianceLevel="5.0"
- copyrightFields="false" runtimeVersion="2.6" language="">
+ copyrightFields="false" runtimeVersion="2.6" language="" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation ../../org.eclipse.sirius/model/viewpoint.genmodel#//viewpoint">
<foreignModel>layoutdata.ecore</foreignModel>
<genPackages prefix="Layoutdata" basePackage="org.eclipse.sirius.diagram" disposableProviderFactory="true"
ecorePackage="layoutdata.ecore#/">
<genClasses image="false" ecoreClass="layoutdata.ecore#//AbstractLayoutData">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute layoutdata.ecore#//AbstractLayoutData/id"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference layoutdata.ecore#//AbstractLayoutData/label"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference layoutdata.ecore#//AbstractLayoutData/siriusStyle"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference layoutdata.ecore#//AbstractLayoutData/gmfView"/>
</genClasses>
<genClasses ecoreClass="layoutdata.ecore#//NodeLayoutData">
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute layoutdata.ecore#//NodeLayoutData/width"/>
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/AbstractLayoutData.java b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/AbstractLayoutData.java
index 3b7df7da9b..c4460f417b 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/AbstractLayoutData.java
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/AbstractLayoutData.java
@@ -11,6 +11,8 @@
package org.eclipse.sirius.diagram.layoutdata;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.sirius.viewpoint.Style;
/**
* <!-- begin-user-doc --> A representation of the model object '
@@ -27,6 +29,12 @@ import org.eclipse.emf.ecore.EObject;
* <em>Id</em>}</li>
* <li>{@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getLabel
* <em>Label</em>}</li>
+ * <li>
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getSiriusStyle
+ * <em>Sirius Style</em>}</li>
+ * <li>
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getGmfView
+ * <em>Gmf View</em>}</li>
* </ul>
*
* @see org.eclipse.sirius.diagram.layoutdata.LayoutdataPackage#getAbstractLayoutData()
@@ -87,4 +95,61 @@ public interface AbstractLayoutData extends EObject {
*/
void setLabel(NodeLayoutData value);
+ /**
+ * Returns the value of the '<em><b>Sirius Style</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
+ * begin-model-doc --> A copy of the original Sirius style of this
+ * DDiagramElement. <!-- end-model-doc -->
+ *
+ * @return the value of the '<em>Sirius Style</em>' containment reference.
+ * @see #setSiriusStyle(Style)
+ * @see org.eclipse.sirius.diagram.layoutdata.LayoutdataPackage#getAbstractLayoutData_SiriusStyle()
+ * @model containment="true" resolveProxies="true" required="true"
+ * @generated
+ */
+ Style getSiriusStyle();
+
+ /**
+ * Sets the value of the '
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getSiriusStyle
+ * <em>Sirius Style</em>}' containment reference. <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Sirius Style</em>' containment
+ * reference.
+ * @see #getSiriusStyle()
+ * @generated
+ */
+ void setSiriusStyle(Style value);
+
+ /**
+ * Returns the value of the '<em><b>Gmf View</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!--
+ * begin-model-doc --> A copy of the original GMF View corresponding to this
+ * DDiagramElement (without copying the element reference). <!--
+ * end-model-doc -->
+ *
+ * @return the value of the '<em>Gmf View</em>' containment reference.
+ * @see #setGmfView(View)
+ * @see org.eclipse.sirius.diagram.layoutdata.LayoutdataPackage#getAbstractLayoutData_GmfView()
+ * @model containment="true" resolveProxies="true" required="true"
+ * @generated
+ */
+ View getGmfView();
+
+ /**
+ * Sets the value of the '
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getGmfView
+ * <em>Gmf View</em>}' containment reference. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Gmf View</em>' containment
+ * reference.
+ * @see #getGmfView()
+ * @generated
+ */
+ void setGmfView(View value);
+
} // AbstractLayoutData
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/LayoutdataPackage.java b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/LayoutdataPackage.java
index 7495fbe781..81ac747fca 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/LayoutdataPackage.java
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/LayoutdataPackage.java
@@ -91,13 +91,31 @@ public interface LayoutdataPackage extends EPackage {
int ABSTRACT_LAYOUT_DATA__LABEL = 1;
/**
+ * The feature id for the '<em><b>Sirius Style</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE = 2;
+
+ /**
+ * The feature id for the '<em><b>Gmf View</b></em>' containment reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int ABSTRACT_LAYOUT_DATA__GMF_VIEW = 3;
+
+ /**
* The number of structural features of the '<em>Abstract Layout Data</em>'
* class. <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
* @ordered
*/
- int ABSTRACT_LAYOUT_DATA_FEATURE_COUNT = 2;
+ int ABSTRACT_LAYOUT_DATA_FEATURE_COUNT = 4;
/**
* The meta object id for the '
@@ -130,6 +148,24 @@ public interface LayoutdataPackage extends EPackage {
int NODE_LAYOUT_DATA__LABEL = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL;
/**
+ * The feature id for the '<em><b>Sirius Style</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_LAYOUT_DATA__SIRIUS_STYLE = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Gmf View</b></em>' containment reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int NODE_LAYOUT_DATA__GMF_VIEW = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW;
+
+ /**
* The feature id for the '<em><b>Width</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -214,6 +250,24 @@ public interface LayoutdataPackage extends EPackage {
int EDGE_LAYOUT_DATA__LABEL = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL;
/**
+ * The feature id for the '<em><b>Sirius Style</b></em>' containment
+ * reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EDGE_LAYOUT_DATA__SIRIUS_STYLE = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE;
+
+ /**
+ * The feature id for the '<em><b>Gmf View</b></em>' containment reference.
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int EDGE_LAYOUT_DATA__GMF_VIEW = LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW;
+
+ /**
* The feature id for the '<em><b>Source Terminal</b></em>' attribute. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
@@ -387,6 +441,32 @@ public interface LayoutdataPackage extends EPackage {
EReference getAbstractLayoutData_Label();
/**
+ * Returns the meta object for the containment reference '
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getSiriusStyle
+ * <em>Sirius Style</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference '
+ * <em>Sirius Style</em>'.
+ * @see org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getSiriusStyle()
+ * @see #getAbstractLayoutData()
+ * @generated
+ */
+ EReference getAbstractLayoutData_SiriusStyle();
+
+ /**
+ * Returns the meta object for the containment reference '
+ * {@link org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getGmfView
+ * <em>Gmf View</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @return the meta object for the containment reference '<em>Gmf View</em>
+ * '.
+ * @see org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData#getGmfView()
+ * @see #getAbstractLayoutData()
+ * @generated
+ */
+ EReference getAbstractLayoutData_GmfView();
+
+ /**
* Returns the meta object for class '
* {@link org.eclipse.sirius.diagram.layoutdata.NodeLayoutData
* <em>Node Layout Data</em>}'. <!-- begin-user-doc --> <!-- end-user-doc
@@ -687,6 +767,24 @@ public interface LayoutdataPackage extends EPackage {
EReference ABSTRACT_LAYOUT_DATA__LABEL = LayoutdataPackage.eINSTANCE.getAbstractLayoutData_Label();
/**
+ * The meta object literal for the '<em><b>Sirius Style</b></em>'
+ * containment reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE = LayoutdataPackage.eINSTANCE.getAbstractLayoutData_SiriusStyle();
+
+ /**
+ * The meta object literal for the '<em><b>Gmf View</b></em>'
+ * containment reference feature. <!-- begin-user-doc --> <!--
+ * end-user-doc -->
+ *
+ * @generated
+ */
+ EReference ABSTRACT_LAYOUT_DATA__GMF_VIEW = LayoutdataPackage.eINSTANCE.getAbstractLayoutData_GmfView();
+
+ /**
* The meta object literal for the '
* {@link org.eclipse.sirius.diagram.layoutdata.impl.NodeLayoutDataImpl
* <em>Node Layout Data</em>}' class. <!-- begin-user-doc --> <!--
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/AbstractLayoutDataImpl.java b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/AbstractLayoutDataImpl.java
index ce2e69cc66..d28eacd842 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/AbstractLayoutDataImpl.java
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/AbstractLayoutDataImpl.java
@@ -16,9 +16,11 @@ 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.EObjectImpl;
+import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData;
import org.eclipse.sirius.diagram.layoutdata.LayoutdataPackage;
import org.eclipse.sirius.diagram.layoutdata.NodeLayoutData;
+import org.eclipse.sirius.viewpoint.Style;
/**
* <!-- begin-user-doc --> An implementation of the model object '
@@ -33,6 +35,12 @@ import org.eclipse.sirius.diagram.layoutdata.NodeLayoutData;
* <li>
* {@link org.eclipse.sirius.diagram.layoutdata.impl.AbstractLayoutDataImpl#getLabel
* <em>Label</em>}</li>
+ * <li>
+ * {@link org.eclipse.sirius.diagram.layoutdata.impl.AbstractLayoutDataImpl#getSiriusStyle
+ * <em>Sirius Style</em>}</li>
+ * <li>
+ * {@link org.eclipse.sirius.diagram.layoutdata.impl.AbstractLayoutDataImpl#getGmfView
+ * <em>Gmf View</em>}</li>
* </ul>
*
* @generated
@@ -69,6 +77,26 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
protected NodeLayoutData label;
/**
+ * The cached value of the '{@link #getSiriusStyle() <em>Sirius Style</em>}'
+ * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getSiriusStyle()
+ * @generated
+ * @ordered
+ */
+ protected Style siriusStyle;
+
+ /**
+ * The cached value of the '{@link #getGmfView() <em>Gmf View</em>}'
+ * containment reference. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @see #getGmfView()
+ * @generated
+ * @ordered
+ */
+ protected View gmfView;
+
+ /**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
@@ -196,10 +224,172 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
* @generated
*/
@Override
+ public Style getSiriusStyle() {
+ if (siriusStyle != null && siriusStyle.eIsProxy()) {
+ InternalEObject oldSiriusStyle = (InternalEObject) siriusStyle;
+ siriusStyle = (Style) eResolveProxy(oldSiriusStyle);
+ if (siriusStyle != oldSiriusStyle) {
+ InternalEObject newSiriusStyle = (InternalEObject) siriusStyle;
+ NotificationChain msgs = oldSiriusStyle.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, null, null);
+ if (newSiriusStyle.eInternalContainer() == null) {
+ msgs = newSiriusStyle.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, null, msgs);
+ }
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, oldSiriusStyle, siriusStyle));
+ }
+ }
+ }
+ return siriusStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Style basicGetSiriusStyle() {
+ return siriusStyle;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetSiriusStyle(Style newSiriusStyle, NotificationChain msgs) {
+ Style oldSiriusStyle = siriusStyle;
+ siriusStyle = newSiriusStyle;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, oldSiriusStyle, newSiriusStyle);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setSiriusStyle(Style newSiriusStyle) {
+ if (newSiriusStyle != siriusStyle) {
+ NotificationChain msgs = null;
+ if (siriusStyle != null) {
+ msgs = ((InternalEObject) siriusStyle).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, null, msgs);
+ }
+ if (newSiriusStyle != null) {
+ msgs = ((InternalEObject) newSiriusStyle).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, null, msgs);
+ }
+ msgs = basicSetSiriusStyle(newSiriusStyle, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ } else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE, newSiriusStyle, newSiriusStyle));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public View getGmfView() {
+ if (gmfView != null && gmfView.eIsProxy()) {
+ InternalEObject oldGmfView = (InternalEObject) gmfView;
+ gmfView = (View) eResolveProxy(oldGmfView);
+ if (gmfView != oldGmfView) {
+ InternalEObject newGmfView = (InternalEObject) gmfView;
+ NotificationChain msgs = oldGmfView.eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, null, null);
+ if (newGmfView.eInternalContainer() == null) {
+ msgs = newGmfView.eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, null, msgs);
+ }
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, oldGmfView, gmfView));
+ }
+ }
+ }
+ return gmfView;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public View basicGetGmfView() {
+ return gmfView;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public NotificationChain basicSetGmfView(View newGmfView, NotificationChain msgs) {
+ View oldGmfView = gmfView;
+ gmfView = newGmfView;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, oldGmfView, newGmfView);
+ if (msgs == null) {
+ msgs = notification;
+ } else {
+ msgs.add(notification);
+ }
+ }
+ return msgs;
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setGmfView(View newGmfView) {
+ if (newGmfView != gmfView) {
+ NotificationChain msgs = null;
+ if (gmfView != null) {
+ msgs = ((InternalEObject) gmfView).eInverseRemove(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, null, msgs);
+ }
+ if (newGmfView != null) {
+ msgs = ((InternalEObject) newGmfView).eInverseAdd(this, InternalEObject.EOPPOSITE_FEATURE_BASE - LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, null, msgs);
+ }
+ msgs = basicSetGmfView(newGmfView, msgs);
+ if (msgs != null) {
+ msgs.dispatch();
+ }
+ } else if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW, newGmfView, newGmfView));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL:
return basicSetLabel(null, msgs);
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE:
+ return basicSetSiriusStyle(null, msgs);
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW:
+ return basicSetGmfView(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -219,6 +409,16 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
return getLabel();
}
return basicGetLabel();
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE:
+ if (resolve) {
+ return getSiriusStyle();
+ }
+ return basicGetSiriusStyle();
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW:
+ if (resolve) {
+ return getGmfView();
+ }
+ return basicGetGmfView();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -237,6 +437,12 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL:
setLabel((NodeLayoutData) newValue);
return;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE:
+ setSiriusStyle((Style) newValue);
+ return;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW:
+ setGmfView((View) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -255,6 +461,12 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL:
setLabel((NodeLayoutData) null);
return;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE:
+ setSiriusStyle((Style) null);
+ return;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW:
+ setGmfView((View) null);
+ return;
}
super.eUnset(featureID);
}
@@ -271,6 +483,10 @@ public abstract class AbstractLayoutDataImpl extends EObjectImpl implements Abst
return AbstractLayoutDataImpl.ID_EDEFAULT == null ? id != null : !AbstractLayoutDataImpl.ID_EDEFAULT.equals(id);
case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL:
return label != null;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE:
+ return siriusStyle != null;
+ case LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW:
+ return gmfView != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/LayoutdataPackageImpl.java b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/LayoutdataPackageImpl.java
index e6938f4649..416fecf9ea 100644
--- a/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/LayoutdataPackageImpl.java
+++ b/plugins/org.eclipse.sirius.diagram.layoutdata/src-gen/org/eclipse/sirius/diagram/layoutdata/impl/LayoutdataPackageImpl.java
@@ -15,12 +15,14 @@ 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.gmf.runtime.notation.NotationPackage;
import org.eclipse.sirius.diagram.layoutdata.AbstractLayoutData;
import org.eclipse.sirius.diagram.layoutdata.EdgeLayoutData;
import org.eclipse.sirius.diagram.layoutdata.LayoutdataFactory;
import org.eclipse.sirius.diagram.layoutdata.LayoutdataPackage;
import org.eclipse.sirius.diagram.layoutdata.NodeLayoutData;
import org.eclipse.sirius.diagram.layoutdata.Point;
+import org.eclipse.sirius.viewpoint.ViewpointPackage;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Package</b>. <!--
@@ -109,6 +111,10 @@ public class LayoutdataPackageImpl extends EPackageImpl implements LayoutdataPac
LayoutdataPackageImpl.isInited = true;
+ // Initialize simple dependencies
+ NotationPackage.eINSTANCE.eClass();
+ ViewpointPackage.eINSTANCE.eClass();
+
// Create package meta-data objects
theLayoutdataPackage.createPackageContents();
@@ -159,6 +165,26 @@ public class LayoutdataPackageImpl extends EPackageImpl implements LayoutdataPac
* @generated
*/
@Override
+ public EReference getAbstractLayoutData_SiriusStyle() {
+ return (EReference) abstractLayoutDataEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getAbstractLayoutData_GmfView() {
+ return (EReference) abstractLayoutDataEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
public EClass getNodeLayoutData() {
return nodeLayoutDataEClass;
}
@@ -387,6 +413,8 @@ public class LayoutdataPackageImpl extends EPackageImpl implements LayoutdataPac
abstractLayoutDataEClass = createEClass(LayoutdataPackage.ABSTRACT_LAYOUT_DATA);
createEAttribute(abstractLayoutDataEClass, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__ID);
createEReference(abstractLayoutDataEClass, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__LABEL);
+ createEReference(abstractLayoutDataEClass, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__SIRIUS_STYLE);
+ createEReference(abstractLayoutDataEClass, LayoutdataPackage.ABSTRACT_LAYOUT_DATA__GMF_VIEW);
nodeLayoutDataEClass = createEClass(LayoutdataPackage.NODE_LAYOUT_DATA);
createEAttribute(nodeLayoutDataEClass, LayoutdataPackage.NODE_LAYOUT_DATA__WIDTH);
@@ -437,6 +465,10 @@ public class LayoutdataPackageImpl extends EPackageImpl implements LayoutdataPac
setNsPrefix(LayoutdataPackage.eNS_PREFIX);
setNsURI(LayoutdataPackage.eNS_URI);
+ // Obtain other dependent packages
+ ViewpointPackage theViewpointPackage = (ViewpointPackage) EPackage.Registry.INSTANCE.getEPackage(ViewpointPackage.eNS_URI);
+ NotationPackage theNotationPackage = (NotationPackage) EPackage.Registry.INSTANCE.getEPackage(NotationPackage.eNS_URI);
+
// Create type parameters
// Set bounds for type parameters
@@ -453,6 +485,12 @@ public class LayoutdataPackageImpl extends EPackageImpl implements LayoutdataPac
initEReference(getAbstractLayoutData_Label(), this.getNodeLayoutData(), null, "label", null, 0, 1, AbstractLayoutData.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$
EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE,
EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getAbstractLayoutData_SiriusStyle(), theViewpointPackage.getStyle(), null, "siriusStyle", null, 1, 1, AbstractLayoutData.class, !EPackageImpl.IS_TRANSIENT, //$NON-NLS-1$
+ !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE,
+ EPackageImpl.IS_COMPOSITE, EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
+ initEReference(getAbstractLayoutData_GmfView(), theNotationPackage.getView(), null, "gmfView", null, 1, 1, AbstractLayoutData.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, //$NON-NLS-1$
+ EPackageImpl.IS_CHANGEABLE, EPackageImpl.IS_COMPOSITE,
+ EPackageImpl.IS_RESOLVE_PROXIES, !EPackageImpl.IS_UNSETTABLE, EPackageImpl.IS_UNIQUE, !EPackageImpl.IS_DERIVED, EPackageImpl.IS_ORDERED);
initEClass(nodeLayoutDataEClass, NodeLayoutData.class, "NodeLayoutData", !EPackageImpl.IS_ABSTRACT, !EPackageImpl.IS_INTERFACE, EPackageImpl.IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(getNodeLayoutData_Width(), ecorePackage.getEInt(), "width", "-2", 0, 1, NodeLayoutData.class, !EPackageImpl.IS_TRANSIENT, !EPackageImpl.IS_VOLATILE, EPackageImpl.IS_CHANGEABLE, //$NON-NLS-1$ //$NON-NLS-2$

Back to the top