Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas FAUVERGUE2016-08-02 08:54:08 -0400
committerGerrit Code Review @ Eclipse.org2016-08-08 03:58:43 -0400
commitef15ff64d8681bd86cd70f7d3d5fd5a3c8a3736b (patch)
tree6ec3362ddd09b4b60b0cb8805e1e27f26be8df1d
parentc285430cda9b82150288176f2237db5d637a14af (diff)
downloadorg.eclipse.papyrus-ef15ff64d8681bd86cd70f7d3d5fd5a3c8a3736b.tar.gz
org.eclipse.papyrus-ef15ff64d8681bd86cd70f7d3d5fd5a3c8a3736b.tar.xz
org.eclipse.papyrus-ef15ff64d8681bd86cd70f7d3d5fd5a3c8a3736b.zip
Bug 498754: [Table] NattablePropertyEditor and TreeTablePropertyEditor
have dependency on Notation#View -> it must be removed https://bugs.eclipse.org/bugs/show_bug.cgi?id=498754 - Remove View from TreeNattablePropertyEditor - Some deprecated in NattablePropertyEditor (not removed to manage API compatibility) Change-Id: I9ccb0ee315c9d3252aa4f3ada0d86a44bd2c37af Signed-off-by: Nicolas FAUVERGUE <nicolas.fauvergue@all4tec.net>
-rw-r--r--plugins/sysml/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.types.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF2
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF5
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/pom.xml2
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java43
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypeDisplayNattablePropertyEditor.java47
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/TreeNattablePropertyEditor.java10
10 files changed, 59 insertions, 58 deletions
diff --git a/plugins/sysml/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF b/plugins/sysml/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF
index bd5a400cb69..2273ae3bc10 100644
--- a/plugins/sysml/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF
+++ b/plugins/sysml/properties/org.eclipse.papyrus.sysml.properties/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.3.0,2.0.0)",
- org.eclipse.papyrus.uml.properties;bundle-version="[2.1.0,3.0.0)"
+ org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)"
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
index 216cccd5dd7..da339ba64b6 100644
--- a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.3.0,2.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.tools.utils;bundle-version="[2.0.0,3.0.0)",
- org.eclipse.papyrus.uml.properties;bundle-version="[2.1.0,3.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.uml.decoratormodel.ui;bundle-version="[1.2.0,2.0.0)"
Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.properties.constraints;x-internal:=true,
org.eclipse.papyrus.uml.decoratormodel.properties,
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties/META-INF/MANIFEST.MF
index c0b6965d115..46fafe0873d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.uml.properties;bundle-version="[2.1.0,3.0.0)",
+Require-Bundle: org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.3.0,2.0.0)",
org.eclipse.papyrus.uml.diagram.symbols;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: Eclipse Modeling Project
diff --git a/plugins/uml/org.eclipse.papyrus.uml.types.core/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.types.core/META-INF/MANIFEST.MF
index 5b3cc54bb49..72899c16c44 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.types.core/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.types.core/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.uml2.uml.edit;bundle-version="[5.1.0,6.0.0)";visibility:=reexport,
- org.eclipse.papyrus.uml.properties;bundle-version="[2.1.0,3.0.0)",
+ org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.views.properties;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.infra.types.rulebased;bundle-version="[3.0.0,4.0.0)";visibility:=reexport,
org.eclipse.papyrus.infra.emf.types;bundle-version="[3.0.0,4.0.0)",
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
index d3079308038..c0b40b51116 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext/META-INF/MANIFEST.MF
@@ -1,5 +1,5 @@
Manifest-Version: 1.0
-Require-Bundle: org.eclipse.papyrus.uml.properties;bundle-version="[2.1.0,3.0.0)",
+Require-Bundle: org.eclipse.papyrus.uml.properties;bundle-version="[3.0.0,4.0.0)",
org.eclipse.papyrus.infra.properties.ui;bundle-version="[1.3.0,2.0.0)",
org.eclipse.papyrus.uml.textedit.valuespecification.xtext.ui;bundle-version="[1.2.0,2.0.0)"
Bundle-Vendor: %providerName
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
index 68ef2d6e969..65faa42eb6f 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/META-INF/MANIFEST.MF
@@ -28,10 +28,11 @@ Require-Bundle: org.eclipse.papyrus.uml.profile;bundle-version="[2.0.0,3.0.0)";v
org.eclipse.papyrus.infra.emf.nattable;bundle-version="[2.0.0,3.0.0)",
org.eclipse.papyrus.uml.nattable.stereotype.display;bundle-version="[2.0.0,3.0.0)",
org.eclipse.nebula.widgets.richtext;bundle-version="[1.0.0,2.0.0)",
- org.eclipse.papyrus.uml.ui;bundle-version="[1.2.0,2.0.0)"
+ org.eclipse.papyrus.uml.ui;bundle-version="[1.2.0,2.0.0)",
+ org.eclipse.papyrus.infra.nattable;bundle-version="[2.0.0,3.0.0)"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy;exclude:="org.eclipse.papyrus.uml.properties.constraints"
-Bundle-Version: 2.1.0.qualifier
+Bundle-Version: 3.0.0.qualifier
Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-Activator: org.eclipse.papyrus.uml.properties.Activator
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/pom.xml b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/pom.xml
index ce96e327cf8..1264616a122 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/pom.xml
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/pom.xml
@@ -7,6 +7,6 @@
<version>0.0.1-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.papyrus.uml.properties</artifactId>
- <version>2.1.0-SNAPSHOT</version>
+ <version>3.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project> \ No newline at end of file
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
index 1ea642efaa7..5b81561a06d 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/NattablePropertyEditor.java
@@ -35,7 +35,6 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.xmi.XMLResource;
-import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.edit.command.SetCommand;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -60,8 +59,6 @@ import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager
import org.eclipse.papyrus.infra.nattable.model.nattable.NattableFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.NattablePackage;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
-import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.EStructuralFeatureValueFillingConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.IAxisConfiguration;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.TableHeaderAxisConfiguration;
@@ -72,7 +69,6 @@ import org.eclipse.papyrus.infra.nattable.model.nattable.nattableconfiguration.T
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.BooleanValueStyle;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.NattablestyleFactory;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattablestyle.Style;
-import org.eclipse.papyrus.infra.nattable.tree.ITreeItemAxisHelper;
import org.eclipse.papyrus.infra.nattable.utils.NamedStyleConstants;
import org.eclipse.papyrus.infra.nattable.utils.NattableModelManagerFactory;
import org.eclipse.papyrus.infra.properties.contexts.Property;
@@ -94,7 +90,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
-import org.eclipse.uml2.uml.Element;
/**
* The property editor for the nattable widget.
@@ -863,29 +858,6 @@ public class NattablePropertyEditor extends AbstractPropertyEditor {
return table;
}
-
- /**
- * This allow to add the tree item axis.
- *
- * @param axisProvider
- * The axis provider.
- * @param rep
- * The axis manager representation.
- * @param object
- * The object to add.
- *
- * @deprecated since 2.0, moved into {@link TreeNattablePropertyEditor} with command
- */
- @Deprecated
- protected void addTreeItemAxis(final AbstractAxisProvider axisProvider, final AxisManagerRepresentation rep, final Object object) {
- if (object instanceof View && isStereotypedElement((View) object)) {
- TransactionalEditingDomain domain = getTableEditingDomain();
- final IAxis axis = ITreeItemAxisHelper.createITreeItemAxis(null, null, object, rep);
- Command addCommand = AddCommand.create(getTableEditingDomain(), axisProvider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), Collections.singleton(axis));
- domain.getCommandStack().execute(addCommand);
- }
- }
-
/**
*
* @return
@@ -903,21 +875,6 @@ public class NattablePropertyEditor extends AbstractPropertyEditor {
}
/**
- * Check is the element of the view is stereotyped.
- *
- * @param view
- * The view.
- * @return <code>true</code> if the element of view is stereotyped, <code>false</code> otherwise.
- */
- protected boolean isStereotypedElement(final View view) {
- boolean result = false;
- if (view.getElement() instanceof Element && !((Element) view.getElement()).getAppliedStereotypes().isEmpty()) {
- result = true;
- }
- return result;
- }
-
- /**
* Get the table configuration (from the table configuration URI).
*
* @return The table configuration.
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypeDisplayNattablePropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypeDisplayNattablePropertyEditor.java
index 40ef541ca15..a3fac2db6e5 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypeDisplayNattablePropertyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/StereotypeDisplayNattablePropertyEditor.java
@@ -13,16 +13,28 @@
package org.eclipse.papyrus.uml.properties.widgets;
import java.util.Collection;
+import java.util.Collections;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.nebula.widgets.nattable.NatTable;
import org.eclipse.nebula.widgets.nattable.hideshow.RowHideShowLayer;
import org.eclipse.nebula.widgets.nattable.hideshow.command.RowHideCommand;
import org.eclipse.papyrus.infra.nattable.manager.table.INattableModelManager;
import org.eclipse.papyrus.infra.nattable.manager.table.TreeNattableModelManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.AbstractAxisProvider;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisprovider.NattableaxisproviderPackage;
+import org.eclipse.papyrus.infra.nattable.tree.ITreeItemAxisHelper;
import org.eclipse.papyrus.infra.nattable.utils.AxisUtils;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.uml2.uml.Element;
/**
* The property editor for the stereotype display nattable widget.
@@ -98,4 +110,39 @@ public class StereotypeDisplayNattablePropertyEditor extends TreeNattablePropert
protected EObject getEObjectAsTableContext(EObject element) {
return element;
}
+
+ /**
+ * This allow to add the tree item axis.
+ *
+ * @param axisProvider
+ * The axis provider.
+ * @param rep
+ * The axis manager representation.
+ * @param object
+ * The object to add.
+ * @since 3.0
+ */
+ protected void addTreeItemAxis(final TransactionalEditingDomain domain, final AbstractAxisProvider axisProvider, final AxisManagerRepresentation rep, final Object object, final CompoundCommand command) {
+ if (object instanceof View && isStereotypedElement((View) object)) {
+ final IAxis axis = ITreeItemAxisHelper.createITreeItemAxis(null, null, object, rep);
+ Command addCommand = AddCommand.create(getTableEditingDomain(), axisProvider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), Collections.singleton(axis));
+ command.append(addCommand);
+ }
+ }
+
+ /**
+ * Check is the element of the view is stereotyped.
+ *
+ * @param view
+ * The view.
+ * @return <code>true</code> if the element of view is stereotyped, <code>false</code> otherwise.
+ * @since 3.0
+ */
+ protected boolean isStereotypedElement(final View view) {
+ boolean result = false;
+ if (view.getElement() instanceof Element && !((Element) view.getElement()).getAppliedStereotypes().isEmpty()) {
+ result = true;
+ }
+ return result;
+ }
}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/TreeNattablePropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/TreeNattablePropertyEditor.java
index e6d5edea2a2..da5d290b117 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/TreeNattablePropertyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/TreeNattablePropertyEditor.java
@@ -22,7 +22,6 @@ import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.command.AddCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.IAxis;
import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxisconfiguration.AxisManagerRepresentation;
@@ -86,13 +85,10 @@ public class TreeNattablePropertyEditor extends NattablePropertyEditor {
* The axis manager representation.
* @param object
* The object to add.
- *
*/
protected void addTreeItemAxis(final TransactionalEditingDomain domain, final AbstractAxisProvider axisProvider, final AxisManagerRepresentation rep, final Object object, final CompoundCommand command) {
- if (object instanceof View && isStereotypedElement((View) object)) {
- final IAxis axis = ITreeItemAxisHelper.createITreeItemAxis(null, null, object, rep);
- Command addCommand = AddCommand.create(getTableEditingDomain(), axisProvider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), Collections.singleton(axis));
- command.append(addCommand);
- }
+ final IAxis axis = ITreeItemAxisHelper.createITreeItemAxis(null, null, object, rep);
+ Command addCommand = AddCommand.create(getTableEditingDomain(), axisProvider, NattableaxisproviderPackage.eINSTANCE.getAxisProvider_Axis(), Collections.singleton(axis));
+ command.append(addCommand);
}
}

Back to the top