summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-06-13 09:26:46 (EDT)
committerCamille Letavernier2014-06-20 11:46:23 (EDT)
commita537140d5630adc81b22bf1801b10662e253ee77 (patch)
tree13529945933428738063cbfbde48f22fae973a45
parent1b5d901fb45531a90c8817e8dacd3ad373478dd1 (diff)
downloadorg.eclipse.papyrus-a537140d5630adc81b22bf1801b10662e253ee77.zip
org.eclipse.papyrus-a537140d5630adc81b22bf1801b10662e253ee77.tar.gz
org.eclipse.papyrus-a537140d5630adc81b22bf1801b10662e253ee77.tar.bz2
Bug 437350 - [Component Diagram] Can not add any element in a Component Diagram contained by a Componentrefs/changes/72/28472/2
Fixed the bug that was due to old refactoring 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.java6
1 files changed, 3 insertions, 3 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 19f68ec..0280472 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 <code>element</code>
* @return The check result
*/
- private int allows(ChildRule rule, EObject origin, EObject element, Collection<EClass> stereotypes) {
+ private int allows(ChildRule rule, EClass origin, EClass element, Collection<EClass> 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))