Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2013-06-18 13:05:54 -0400
committercletavernie2013-06-18 13:05:54 -0400
commit33a0476dc0139c8003bd1668e343f77f41920cd4 (patch)
tree48530f5a192b44ad00a53ab6f0dd0978a5c0c7aa /sandbox
parentfda255be3d715df1dc5a23d0a3ad81f2aa7f63ea (diff)
downloadorg.eclipse.papyrus-33a0476dc0139c8003bd1668e343f77f41920cd4.tar.gz
org.eclipse.papyrus-33a0476dc0139c8003bd1668e343f77f41920cd4.tar.xz
org.eclipse.papyrus-33a0476dc0139c8003bd1668e343f77f41920cd4.zip
406896: [Properties View - Table] The new Table widget shall be integrated in the properties view as a Property Editor
https://bugs.eclipse.org/bugs/show_bug.cgi?id=406896
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/org.eclipse.papyrus.views.properties.table/META-INF/MANIFEST.MF2
-rw-r--r--sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java21
2 files changed, 18 insertions, 5 deletions
diff --git a/sandbox/org.eclipse.papyrus.views.properties.table/META-INF/MANIFEST.MF b/sandbox/org.eclipse.papyrus.views.properties.table/META-INF/MANIFEST.MF
index 448b79589ef..85d040ece78 100644
--- a/sandbox/org.eclipse.papyrus.views.properties.table/META-INF/MANIFEST.MF
+++ b/sandbox/org.eclipse.papyrus.views.properties.table/META-INF/MANIFEST.MF
@@ -28,5 +28,5 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0",
org.eclipse.papyrus.infra.services.edit;bundle-version="0.10.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="0.10.0"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ActivationPolicy: lazy
diff --git a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
index 6d47f1b700f..9f8ac002464 100644
--- a/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
+++ b/sandbox/org.eclipse.papyrus.views.properties.table/src/org/eclipse/papyrus/views/properties/table/cell/DerivedUMLPropertiesCellManager.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.papyrus.infra.nattable.manager.cell.AbstractCellManager;
import org.eclipse.papyrus.infra.nattable.manager.cell.ICellManager;
+import org.eclipse.papyrus.infra.nattable.model.nattable.nattableaxis.FeatureIdAxis;
import org.eclipse.papyrus.uml.tools.commands.SetMultiplicityCommand;
import org.eclipse.papyrus.uml.tools.util.MultiplicityParser;
import org.eclipse.papyrus.views.properties.table.axis.DerivedUMLPropertiesAxisManager;
@@ -95,13 +96,25 @@ public class DerivedUMLPropertiesCellManager extends AbstractCellManager impleme
}
private String getMultiplicityHandler(Object obj1, Object obj2) {
- if(DerivedUMLPropertiesAxisManager.MULTIPLICITY.equals(obj1)) {
- return (String)obj1;
+ String featureId = getFeatureId(obj1);
+ if(featureId != null) {
+ return featureId;
}
- if(DerivedUMLPropertiesAxisManager.MULTIPLICITY.equals(obj2)) {
- return (String)obj2;
+
+ featureId = getFeatureId(obj2);
+ if(featureId != null) {
+ return featureId;
}
+ return null;
+ }
+ private String getFeatureId(Object object) {
+ if(object instanceof FeatureIdAxis) {
+ FeatureIdAxis idAxis = (FeatureIdAxis)object;
+ if(DerivedUMLPropertiesAxisManager.MULTIPLICITY.equals(idAxis.getElement())) {
+ return DerivedUMLPropertiesAxisManager.MULTIPLICITY;
+ }
+ }
return null;
}

Back to the top