Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization')
-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