Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-04-27 11:22:08 +0000
committerCamille Letavernier2015-04-27 11:22:08 +0000
commit8734af6f9a23f9a8fec4d2fa9ab592868839be75 (patch)
treeab8a3184755c770d815c8a12bb0bf933443d1490 /extraplugins/migration/org.eclipse.papyrus.migration.rsa
parent23c169d68ee0bf2b385ea0c14b874546eba0cc38 (diff)
downloadorg.eclipse.papyrus-8734af6f9a23f9a8fec4d2fa9ab592868839be75.tar.gz
org.eclipse.papyrus-8734af6f9a23f9a8fec4d2fa9ab592868839be75.tar.xz
org.eclipse.papyrus-8734af6f9a23f9a8fec4d2fa9ab592868839be75.zip
464853: [Model Import] Increased import time due to repair stereotypes
https://bugs.eclipse.org/bugs/show_bug.cgi?id=464853 Change-Id: I811637e59cb5fd3620123ac3e396ec49dc1c045c Signed-off-by: Camille Letavernier <camille.letavernier@cea.fr>
Diffstat (limited to 'extraplugins/migration/org.eclipse.papyrus.migration.rsa')
-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