Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2016-07-04 19:24:52 +0000
committerKenn Hussey2016-07-04 19:24:52 +0000
commita4cefa6e1adf193dc410ac831e3528d46558be2a (patch)
tree0597aaa622ad7a921fa92d65678f9abd25a94350
parent24737cd75c86b967fce794598c4d6ecaf90f1939 (diff)
downloadorg.eclipse.uml2-a4cefa6e1adf193dc410ac831e3528d46558be2a.tar.gz
org.eclipse.uml2-a4cefa6e1adf193dc410ac831e3528d46558be2a.tar.xz
org.eclipse.uml2-a4cefa6e1adf193dc410ac831e3528d46558be2a.zip
[497153] Caching targets when copying stereotype applications.
-rw-r--r--plugins/org.eclipse.uml2-feature/feature.xml4
-rw-r--r--plugins/org.eclipse.uml2.sdk-feature/feature.xml4
-rw-r--r--plugins/org.eclipse.uml2.uml-feature/feature.xml4
-rw-r--r--plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/PackageOperations.java18
5 files changed, 25 insertions, 7 deletions
diff --git a/plugins/org.eclipse.uml2-feature/feature.xml b/plugins/org.eclipse.uml2-feature/feature.xml
index f22bed56a..141536598 100644
--- a/plugins/org.eclipse.uml2-feature/feature.xml
+++ b/plugins/org.eclipse.uml2-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.uml2"
label="%feature.label"
- version="5.2.0.qualifier"
+ version="5.3.0.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
@@ -13,7 +13,7 @@
</description>
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 2003, 2015 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ Copyright (c) 2003, 2016 IBM Corporation, Embarcadero Technologies, CEA, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
diff --git a/plugins/org.eclipse.uml2.sdk-feature/feature.xml b/plugins/org.eclipse.uml2.sdk-feature/feature.xml
index ab06235be..0dbedb440 100644
--- a/plugins/org.eclipse.uml2.sdk-feature/feature.xml
+++ b/plugins/org.eclipse.uml2.sdk-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.uml2.sdk"
label="%feature.label"
- version="5.2.0.qualifier"
+ version="5.3.0.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
@@ -13,7 +13,7 @@
</description>
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 2003, 2015 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ Copyright (c) 2003, 2016 IBM Corporation, Embarcadero Technologies, CEA, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
diff --git a/plugins/org.eclipse.uml2.uml-feature/feature.xml b/plugins/org.eclipse.uml2.uml-feature/feature.xml
index 34dda3364..4c9ff73a7 100644
--- a/plugins/org.eclipse.uml2.uml-feature/feature.xml
+++ b/plugins/org.eclipse.uml2.uml-feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.uml2.uml"
label="%feature.label"
- version="5.2.0.qualifier"
+ version="5.3.0.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
@@ -13,7 +13,7 @@
</description>
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 2003, 2015 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ Copyright (c) 2003, 2016 IBM Corporation, Embarcadero Technologies, CEA, and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
diff --git a/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF
index d3ee58f72..a7d12fd89 100644
--- a/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.uml2.uml; singleton:=true
-Bundle-Version: 5.2.0.qualifier
+Bundle-Version: 5.2.100.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.uml2.uml.UMLPlugin$Implementation
Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/PackageOperations.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/PackageOperations.java
index 7c3de03bf..708cc1fbb 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/PackageOperations.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/PackageOperations.java
@@ -12,12 +12,14 @@
* Kenn Hussey (CEA) - 327039, 369492, 313951, 163556, 418466, 447901, 451350, 458658, 485756
* Christian W. Damus (CEA) - 300957, 431998
* Christian W. Damus - 444588
+ * Alain Le Guennec (Esterel Technologies SAS) - 497153
*
*/
package org.eclipse.uml2.uml.internal.operations;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -122,6 +124,10 @@ public class PackageOperations
protected final List<Profile> profiles;
+ protected final Map<EClass, EClass> targetClasses = new HashMap<EClass, EClass>();
+
+ protected final Map<EStructuralFeature, EStructuralFeature> targetFeatures = new HashMap<EStructuralFeature, EStructuralFeature>();
+
protected StereotypeApplicationCopier(Profile profile) {
this(profile == null
? Collections.<Profile> emptyList()
@@ -147,8 +153,14 @@ public class PackageOperations
@Override
protected EClass getTarget(EClass eClass) {
+
+ if (targetClasses.containsKey(eClass)) {
+ return targetClasses.get(eClass);
+ }
+
NamedElement namedElement = getNamedElement(eClass);
EClass definition = (EClass) getDefinition(namedElement);
+ targetClasses.put(eClass, definition);
if (definition != null) {
return definition;
@@ -164,9 +176,15 @@ public class PackageOperations
@Override
protected EStructuralFeature getTarget(
EStructuralFeature eStructuralFeature) {
+
+ if (targetFeatures.containsKey(eStructuralFeature)) {
+ return targetFeatures.get(eStructuralFeature);
+ }
+
NamedElement namedElement = getNamedElement(eStructuralFeature);
EStructuralFeature definition = (EStructuralFeature) getDefinition(
namedElement);
+ targetFeatures.put(eStructuralFeature, definition);
if (definition != null) {
return definition;

Back to the top