Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-01-20 08:33:54 -0500
committercletavernie2012-01-20 08:33:54 -0500
commit4419c6a7b502912ce78e6022eb1c57f6e07b67df (patch)
tree65d49e790d27d2984c1ad0b4db9126c84b9d2d1d /plugins/customization/org.eclipse.papyrus.customization.properties
parent0cc12e79115034e5e22892d9d18620e8bab0f0c2 (diff)
downloadorg.eclipse.papyrus-4419c6a7b502912ce78e6022eb1c57f6e07b67df.tar.gz
org.eclipse.papyrus-4419c6a7b502912ce78e6022eb1c57f6e07b67df.tar.xz
org.eclipse.papyrus-4419c6a7b502912ce78e6022eb1c57f6e07b67df.zip
359794: [UML - Tools] Content/Label providers
https://bugs.eclipse.org/bugs/show_bug.cgi?id=359794
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.properties')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java
index 5e0e2b024cb..a9b1a16cd7b 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties/src/org/eclipse/papyrus/customization/properties/providers/PropertyEditorTypeContentProvider.java
@@ -77,12 +77,20 @@ public class PropertyEditorTypeContentProvider extends EMFGraphicalContentProvid
if(source.getProperty() == null) {
return true;
}
- return editorType.getType() == source.getProperty().getType();
+ return editorType.getType() == source.getProperty().getType() && isMultiplicityEquivalent(editorType.getMultiplicity(), source.getProperty().getMultiplicity());
}
return false;
}
+ private boolean isMultiplicityEquivalent(int multiplicity, int multiplicity2) {
+ if(multiplicity < 0 || multiplicity > 1) {
+ return multiplicity2 < 0 || multiplicity2 > 1;
+ }
+
+ return multiplicity == 1 && multiplicity2 == 1;
+ }
+
public boolean getFilter() {
return filter;
}
@@ -91,7 +99,5 @@ public class PropertyEditorTypeContentProvider extends EMFGraphicalContentProvid
this.filter = filter;
clearCache();
}
-
}
-
}

Back to the top