Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-01-21 17:13:29 +0000
committerChristian W. Damus2015-01-21 20:50:49 +0000
commit83de1b8003bf87fcfa260982f15975a117fc71b5 (patch)
tree11cd54d74f3ed70e054854f0e466be6f7c28ce6a /extraplugins/migration
parentc42dda4199efe4f677ce20e510a3eb80f38605a2 (diff)
downloadorg.eclipse.papyrus-83de1b8003bf87fcfa260982f15975a117fc71b5.tar.gz
org.eclipse.papyrus-83de1b8003bf87fcfa260982f15975a117fc71b5.tar.xz
org.eclipse.papyrus-83de1b8003bf87fcfa260982f15975a117fc71b5.zip
436666: "Stereotype repair" pop-up for already upgraded model
https://bugs.eclipse.org/bugs/show_bug.cgi?id=436666 Detect orphaned (dangling) stereotype instances and suggest to delete them. Orphans are treated as a separate group from properly attached stereotype instances of the same schema (broken or not) because they cannot be repaired by profile application; they are not stereotype applications because they have no base elements. Also update some test models that are opened in editors to remove orphaned stereotype instances (which cause tests to hang on the repair dialog). Conflicts: extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/ui/ZombieStereotypesDialog.java
Diffstat (limited to 'extraplugins/migration')
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
index ca28961f1f6..0d9f524b785 100644
--- a/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
+++ b/extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
+ * Copyright (c) 2014, 2015 CEA LIST, 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:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 436666
*****************************************************************************/
package org.eclipse.papyrus.migration.rsa.transformation;
@@ -17,6 +18,7 @@ import java.util.HashMap;
import java.util.Map;
import java.util.Set;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.emf.common.util.BasicDiagnostic;
import org.eclipse.emf.common.util.TreeIterator;
@@ -148,7 +150,7 @@ public class RepairStereotypes {
try {
final BasicDiagnostic diagnostics = new BasicDiagnostic(Activator.PLUGIN_ID, 0, "Problems in repairing stereotypes", null);
- for (EPackage packageToRepair : descriptor.getZombiePackages()) {
+ for (IAdaptable packageToRepair : descriptor.getZombieSchemas()) {
IRepairAction action = descriptor.getRepairAction(packageToRepair, IRepairAction.Kind.APPLY_LATEST_PROFILE_DEFINITION);
descriptor.repair(packageToRepair, action, diagnostics, new NullProgressMonitor());
}

Back to the top