Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2015-01-14 18:25:04 +0000
committerCamille Letavernier2015-01-14 18:29:05 +0000
commite35adb880826499c778110c338a90f72f30b6d8c (patch)
treebdbf46d7bd4a42fc4510bfe068cce1915b05077a /plugins/uml
parent33ddf1b25c991279d4032c6c4e2ff94e52810316 (diff)
downloadorg.eclipse.papyrus-e35adb880826499c778110c338a90f72f30b6d8c.tar.gz
org.eclipse.papyrus-e35adb880826499c778110c338a90f72f30b6d8c.tar.xz
org.eclipse.papyrus-e35adb880826499c778110c338a90f72f30b6d8c.zip
457341: [Model Import] Identify and fix performances bottlenecks
https://bugs.eclipse.org/bugs/show_bug.cgi?id=457341 - Add a cache for the EClass-to-Definition conversion in StereotypeApplicationRepairParticipant
Diffstat (limited to 'plugins/uml')
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
index 7eb284007be..4a7280795e8 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
@@ -14,6 +14,7 @@
package org.eclipse.papyrus.uml.modelrepair.internal.participants;
import java.util.Collection;
+import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
@@ -722,5 +723,17 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
return result;
}
+
+
+ protected Map<EClass, EClass> stereotypeDefinitionCache = new HashMap<EClass, EClass>();
+
+ @Override
+ protected EClass getTarget(EClass eClass) {
+ if (!stereotypeDefinitionCache.containsKey(eClass)) {
+ EClass result = super.getTarget(eClass);
+ stereotypeDefinitionCache.put(eClass, result);
+ }
+ return stereotypeDefinitionCache.get(eClass);
+ }
}
}

Back to the top