Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Lorenzo2017-05-17 19:54:09 +0000
committervincent lorenzo2017-05-18 07:47:39 +0000
commit87e59afcb3ab0a3419e731c33530b41fa6bc2611 (patch)
tree93aac3b35d8795a5938d9835c08350bba049a94a /plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model
parentf5b53d07f5f3661301dfe9ceeecb0683dd5e5967 (diff)
downloadorg.eclipse.papyrus-87e59afcb3ab0a3419e731c33530b41fa6bc2611.tar.gz
org.eclipse.papyrus-87e59afcb3ab0a3419e731c33530b41fa6bc2611.tar.xz
org.eclipse.papyrus-87e59afcb3ab0a3419e731c33530b41fa6bc2611.zip
Bug 512564 - [Table][Matrix] Papyrus must provide a generic way to the user to create relationship matrix.
- set property GenericRelationshipMatrixCellEditorConfiguration#cellContentsFilter as containment a feature Change-Id: I88fbc98579f245eb66267e42279b250c8a246dc5 Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model')
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore3
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/GenericRelationshipMatrixCellEditorConfiguration.java10
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/NattablecelleditorPackage.java8
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/GenericRelationshipMatrixCellEditorConfigurationImpl.java53
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/NattablecelleditorPackageImpl.java2
5 files changed, 48 insertions, 28 deletions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
index ed024793389..4d4a9ffd0d2 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/model/nattable.ecore
@@ -2149,7 +2149,8 @@
<eStructuralFeatures
xsi:type="ecore:EReference"
name="cellContentsFilter"
- eType="ecore:EClass ../../org.eclipse.papyrus.infra.emf.expressions/model/expressions.ecore#//booleanexpressions/IBooleanEObjectExpression">
+ eType="ecore:EClass ../../org.eclipse.papyrus.infra.emf.expressions/model/expressions.ecore#//booleanexpressions/IBooleanEObjectExpression"
+ containment="true">
<eAnnotations
source="http://www.eclipse.org/emf/2002/GenModel">
<details
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/GenericRelationshipMatrixCellEditorConfiguration.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/GenericRelationshipMatrixCellEditorConfiguration.java
index 9c7d478776c..8fc1ea67c78 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/GenericRelationshipMatrixCellEditorConfiguration.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/GenericRelationshipMatrixCellEditorConfiguration.java
@@ -70,25 +70,25 @@ public interface GenericRelationshipMatrixCellEditorConfiguration extends IMatri
void setDirection(MatrixRelationShipDirection value);
/**
- * Returns the value of the '<em><b>Cell Contents Filter</b></em>' reference.
+ * Returns the value of the '<em><b>Cell Contents Filter</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* <!-- begin-model-doc -->
* This field allows to the user to filter the contents of the cells.
* <!-- end-model-doc -->
- * @return the value of the '<em>Cell Contents Filter</em>' reference.
+ * @return the value of the '<em>Cell Contents Filter</em>' containment reference.
* @see #setCellContentsFilter(IBooleanEObjectExpression)
* @see org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.NattablecelleditorPackage#getGenericRelationshipMatrixCellEditorConfiguration_CellContentsFilter()
- * @model
+ * @model containment="true"
* @generated
*/
IBooleanEObjectExpression getCellContentsFilter();
/**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.GenericRelationshipMatrixCellEditorConfiguration#getCellContentsFilter <em>Cell Contents Filter</em>}' reference.
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.GenericRelationshipMatrixCellEditorConfiguration#getCellContentsFilter <em>Cell Contents Filter</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Cell Contents Filter</em>' reference.
+ * @param value the new value of the '<em>Cell Contents Filter</em>' containment reference.
* @see #getCellContentsFilter()
* @generated
*/
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/NattablecelleditorPackage.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/NattablecelleditorPackage.java
index f9b027893a4..9b8c4b40dbd 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/NattablecelleditorPackage.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/NattablecelleditorPackage.java
@@ -298,7 +298,7 @@ public interface NattablecelleditorPackage extends EPackage {
int GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__DIRECTION = IMATRIX_CELL_EDITOR_CONFIGURATION_FEATURE_COUNT + 0;
/**
- * The feature id for the '<em><b>Cell Contents Filter</b></em>' reference.
+ * The feature id for the '<em><b>Cell Contents Filter</b></em>' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -423,10 +423,10 @@ public interface NattablecelleditorPackage extends EPackage {
EAttribute getGenericRelationshipMatrixCellEditorConfiguration_Direction();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.GenericRelationshipMatrixCellEditorConfiguration#getCellContentsFilter <em>Cell Contents Filter</em>}'.
+ * Returns the meta object for the containment reference '{@link org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.GenericRelationshipMatrixCellEditorConfiguration#getCellContentsFilter <em>Cell Contents Filter</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Cell Contents Filter</em>'.
+ * @return the meta object for the containment reference '<em>Cell Contents Filter</em>'.
* @see org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.GenericRelationshipMatrixCellEditorConfiguration#getCellContentsFilter()
* @see #getGenericRelationshipMatrixCellEditorConfiguration()
* @generated
@@ -524,7 +524,7 @@ public interface NattablecelleditorPackage extends EPackage {
EAttribute GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__DIRECTION = eINSTANCE.getGenericRelationshipMatrixCellEditorConfiguration_Direction();
/**
- * The meta object literal for the '<em><b>Cell Contents Filter</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Cell Contents Filter</b></em>' containment reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/GenericRelationshipMatrixCellEditorConfigurationImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/GenericRelationshipMatrixCellEditorConfigurationImpl.java
index 5e875a3a6dc..304e7555e29 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/GenericRelationshipMatrixCellEditorConfigurationImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/GenericRelationshipMatrixCellEditorConfigurationImpl.java
@@ -14,6 +14,7 @@ package org.eclipse.papyrus.infra.nattable.model.nattable.nattablecelleditor.imp
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;
@@ -87,7 +88,7 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
protected MatrixRelationShipDirection direction = DIRECTION_EDEFAULT;
/**
- * The cached value of the '{@link #getCellContentsFilter() <em>Cell Contents Filter</em>}' reference.
+ * The cached value of the '{@link #getCellContentsFilter() <em>Cell Contents Filter</em>}' containment reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCellContentsFilter()
@@ -173,14 +174,6 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
* @generated
*/
public IBooleanEObjectExpression getCellContentsFilter() {
- if (cellContentsFilter != null && cellContentsFilter.eIsProxy()) {
- InternalEObject oldCellContentsFilter = (InternalEObject)cellContentsFilter;
- cellContentsFilter = (IBooleanEObjectExpression)eResolveProxy(oldCellContentsFilter);
- if (cellContentsFilter != oldCellContentsFilter) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, oldCellContentsFilter, cellContentsFilter));
- }
- }
return cellContentsFilter;
}
@@ -189,8 +182,14 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
* <!-- end-user-doc -->
* @generated
*/
- public IBooleanEObjectExpression basicGetCellContentsFilter() {
- return cellContentsFilter;
+ public NotificationChain basicSetCellContentsFilter(IBooleanEObjectExpression newCellContentsFilter, NotificationChain msgs) {
+ IBooleanEObjectExpression oldCellContentsFilter = cellContentsFilter;
+ cellContentsFilter = newCellContentsFilter;
+ if (eNotificationRequired()) {
+ ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, oldCellContentsFilter, newCellContentsFilter);
+ if (msgs == null) msgs = notification; else msgs.add(notification);
+ }
+ return msgs;
}
/**
@@ -199,10 +198,17 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
* @generated
*/
public void setCellContentsFilter(IBooleanEObjectExpression newCellContentsFilter) {
- IBooleanEObjectExpression oldCellContentsFilter = cellContentsFilter;
- cellContentsFilter = newCellContentsFilter;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, oldCellContentsFilter, cellContentsFilter));
+ if (newCellContentsFilter != cellContentsFilter) {
+ NotificationChain msgs = null;
+ if (cellContentsFilter != null)
+ msgs = ((InternalEObject)cellContentsFilter).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, null, msgs);
+ if (newCellContentsFilter != null)
+ msgs = ((InternalEObject)newCellContentsFilter).eInverseAdd(this, EOPPOSITE_FEATURE_BASE - NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, null, msgs);
+ msgs = basicSetCellContentsFilter(newCellContentsFilter, msgs);
+ if (msgs != null) msgs.dispatch();
+ }
+ else if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER, newCellContentsFilter, newCellContentsFilter));
}
/**
@@ -249,6 +255,20 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
* @generated
*/
@Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER:
+ return basicSetCellContentsFilter(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 NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_EDITOR_ID:
@@ -256,8 +276,7 @@ public class GenericRelationshipMatrixCellEditorConfigurationImpl extends Styled
case NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__DIRECTION:
return getDirection();
case NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__CELL_CONTENTS_FILTER:
- if (resolve) return getCellContentsFilter();
- return basicGetCellContentsFilter();
+ return getCellContentsFilter();
case NattablecelleditorPackage.GENERIC_RELATIONSHIP_MATRIX_CELL_EDITOR_CONFIGURATION__EDITED_ELEMENT:
if (resolve) return getEditedElement();
return basicGetEditedElement();
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/NattablecelleditorPackageImpl.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/NattablecelleditorPackageImpl.java
index decb95ed621..d02180ba641 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/NattablecelleditorPackageImpl.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model/src-gen/org/eclipse/papyrus/infra/nattable/model/nattable/nattablecelleditor/impl/NattablecelleditorPackageImpl.java
@@ -371,7 +371,7 @@ public class NattablecelleditorPackageImpl extends EPackageImpl implements Natta
initEClass(genericRelationshipMatrixCellEditorConfigurationEClass, GenericRelationshipMatrixCellEditorConfiguration.class, "GenericRelationshipMatrixCellEditorConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
initEAttribute(getGenericRelationshipMatrixCellEditorConfiguration_Direction(), this.getMatrixRelationShipDirection(), "direction", "FROM_ROW_TO_COLUMN", 0, 1, GenericRelationshipMatrixCellEditorConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
- initEReference(getGenericRelationshipMatrixCellEditorConfiguration_CellContentsFilter(), theBooleanExpressionsPackage.getIBooleanEObjectExpression(), null, "cellContentsFilter", null, 0, 1, GenericRelationshipMatrixCellEditorConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEReference(getGenericRelationshipMatrixCellEditorConfiguration_CellContentsFilter(), theBooleanExpressionsPackage.getIBooleanEObjectExpression(), null, "cellContentsFilter", null, 0, 1, GenericRelationshipMatrixCellEditorConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEReference(getGenericRelationshipMatrixCellEditorConfiguration_EditedElement(), theElementTypesConfigurationsPackage.getElementTypeConfiguration(), null, "editedElement", null, 0, 1, GenericRelationshipMatrixCellEditorConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
initEClass(iMatrixCellEditorConfigurationEClass, IMatrixCellEditorConfiguration.class, "IMatrixCellEditorConfiguration", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$

Back to the top