diff options
author | Laurent Wouters | 2014-03-25 07:59:44 +0000 |
---|---|---|
committer | Laurent Wouters | 2014-03-25 14:16:45 +0000 |
commit | 1ccfec07a10987a0a2f0b90bc20d69a0fe7c5aaf (patch) | |
tree | 7a6f34699e6730d46aa7169c63cdb374031faa3d | |
parent | bd06e7715877e2dee9c8bbe0a7c7af6a927a3985 (diff) | |
download | org.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-x | plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java | 3 |
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);
}
}
|