Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-03-25 07:59:44 +0000
committerLaurent Wouters2014-03-25 14:16:45 +0000
commit1ccfec07a10987a0a2f0b90bc20d69a0fe7c5aaf (patch)
tree7a6f34699e6730d46aa7169c63cdb374031faa3d
parentbd06e7715877e2dee9c8bbe0a7c7af6a927a3985 (diff)
downloadorg.eclipse.papyrus-1ccfec07a10987a0a2f0b90bc20d69a0fe7c5aaf.tar.gz
org.eclipse.papyrus-1ccfec07a10987a0a2f0b90bc20d69a0fe7c5aaf.tar.xz
org.eclipse.papyrus-1ccfec07a10987a0a2f0b90bc20d69a0fe7c5aaf.zip
#430703: [Model Explorer] NPE throw when an invalid diagram is added to the model
Reduced the possible view creation on an element to views that can both be owned and have the element as root https://bugs.eclipse.org/bugs/show_bug.cgi?id=430703 Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
index 81156d18a14..18fbec7302d 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
@@ -628,6 +628,9 @@ public class PolicyChecker {
int count = getOwnedViewCount(element, proto);
if (!matchesOwnerMultiplicity(view, element.eClass(), stereotypes, count))
continue;
+ count = getViewCountOn(element, proto);
+ if (!matchesRootMultiplicity(view, element.eClass(), stereotypes, count))
+ continue;
result.add(proto);
}
}

Back to the top