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:37:41 +0000
commit2e90ebd361a5ec9e64244c734cacafbfc6df2ced (patch)
treea9ef404443700513a4552b7de487c38be63eb089 /plugins/uml/org.eclipse.papyrus.uml.modelrepair
parent5a2226b011989c4de4ec8cef444dba6d963cf2ce (diff)
downloadorg.eclipse.papyrus-2e90ebd361a5ec9e64244c734cacafbfc6df2ced.tar.gz
org.eclipse.papyrus-2e90ebd361a5ec9e64244c734cacafbfc6df2ced.tar.xz
org.eclipse.papyrus-2e90ebd361a5ec9e64244c734cacafbfc6df2ced.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/org.eclipse.papyrus.uml.modelrepair')
-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