From c04928427ba782343f4d710832307655ce1a6c4c Mon Sep 17 00:00:00 2001 From: Laurent Wouters Date: Fri, 13 Jun 2014 15:44:13 +0200 Subject: Fixed the RobotML viewpoint configuration to use static identifier Signed-off-by: Laurent Wouters --- .../viewpoints/robotml.configuration | 73 ++++++++++++++-------- .../infra/viewpoints/policy/PolicyChecker.java | 6 +- 2 files changed, 50 insertions(+), 29 deletions(-) diff --git a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration index 0d82eda5809..2a92dd79497 100755 --- a/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration +++ b/extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common/viewpoints/robotml.configuration @@ -1,33 +1,54 @@ - - - - - - - - + + + + + + + + + + + + + - - - - - + + + + + + + + + + - - - - - - + + + + + + + + + + + - - - - - - + + + + + + + + + + + - + + 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 19f68ecd8f4..02804729480 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 @@ -990,11 +990,11 @@ public class PolicyChecker { * The stereotypes applied on element * @return The check result */ - private int allows(ChildRule rule, EObject origin, EObject element, Collection stereotypes) { + private int allows(ChildRule rule, EClass origin, EClass element, Collection stereotypes) { EClass ce = rule.getElement(); EClass co = rule.getOrigin(); - if ((ce == null || ce.isSuperTypeOf(element.eClass())) - && (co == null || co.isSuperTypeOf(origin.eClass()))) { + if ((ce == null || ce.isSuperTypeOf(element)) + && (co == null || co.isSuperTypeOf(origin))) { // matching type => check the application of the required stereotypes for (EClass stereotype : rule.getStereotypes()) if (!stereotypes.contains(stereotype)) -- cgit v1.2.3