Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java')
-rw-r--r--extraplugins/migration/org.eclipse.papyrus.migration.rsa/src/org/eclipse/papyrus/migration/rsa/transformation/RepairStereotypes.java11
1 files changed, 6 insertions, 5 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 f13de92d7e1..db122ffe79f 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
@@ -78,7 +78,7 @@ public class RepairStereotypes {
* Finds all zombie stereotypes, and repair them with the default action.
*
* If the profile can't be found automatically, the profileMappings map is used
- *
+ *
* @throws InterruptedException
* @throws RollbackException
*/
@@ -97,13 +97,13 @@ public class RepairStereotypes {
for (Resource resource : resourcesToRepair) {
Element rootElement = (Element) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.ELEMENT);
-
- if (rootElement == null || rootElement.getNearestPackage() == null){
+
+ if (rootElement == null || rootElement.getNearestPackage() == null) {
continue;
}
-
+
Package rootPackage = rootElement.getNearestPackage();
-
+
Collection<ProfileApplication> profileApplications = Lists.newArrayList();
for (TreeIterator<EObject> iter = EcoreUtil.getAllProperContents(Collections.singleton(rootPackage), false); iter.hasNext();) {
EObject next = iter.next();
@@ -145,6 +145,7 @@ public class RepairStereotypes {
options.put(Transaction.OPTION_NO_UNDO, true);
options.put(Transaction.OPTION_NO_VALIDATION, true);
options.put(Transaction.OPTION_NO_TRIGGERS, true);
+ options.put(Transaction.OPTION_UNPROTECTED, true);
// We're in a batch environment, with no undo/redo support. Run a vanilla transaction to improve performances
Transaction fastTransaction = internalDomain.startTransaction(false, options);

Back to the top