Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-12-15 19:26:22 +0000
committerChristian W. Damus2014-12-15 19:26:22 +0000
commite02728cd745de91b1660a67df6caf00aa097a4a0 (patch)
tree39fa392fa9defd8033d77f8837b2acac435e3cb9 /plugins/uml
parent7327003ac1b6d10612eca9a5270f30c521964c3a (diff)
downloadorg.eclipse.papyrus-e02728cd745de91b1660a67df6caf00aa097a4a0.tar.gz
org.eclipse.papyrus-e02728cd745de91b1660a67df6caf00aa097a4a0.tar.xz
org.eclipse.papyrus-e02728cd745de91b1660a67df6caf00aa097a4a0.zip
455248: [Stereotypes Repair] The Stereotypes Repair dialog doesn't properly handle Controlled Packages without their own Profile Application
https://bugs.eclipse.org/bugs/show_bug.cgi?id=455248 Ensure that profile applications inherited from containing package contents (in case of a package unit being loaded) are properly accounted for to avoid spurious zombie reports.
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippet.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippet.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippet.java
index a859686ec1e..f3d1bd3cfb7 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippet.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/StereotypeApplicationRepairSnippet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 455248
*
*/
package org.eclipse.papyrus.uml.modelrepair.internal.stereotypes;
@@ -167,6 +168,14 @@ public class StereotypeApplicationRepairSnippet implements IModelSetSnippet {
}
}
+ // We also need to get all profile applications inherited from containing packages in parent model units
+ if (root.eContainer() instanceof Element) {
+ Package containingPackage = ((Element) root.eContainer()).getNearestPackage();
+ if (containingPackage != null) {
+ profileApplications.addAll(containingPackage.getAllProfileApplications());
+ }
+ }
+
Set<EPackage> appliedDefinitions = getAppliedDefinitions(profileApplications);
Function<? super EPackage, Profile> profileSupplier = dynamicProfileSupplier;

Back to the top