Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2013-07-04 18:11:23 +0000
committerKenn Hussey2013-07-04 18:11:23 +0000
commitc6135190af73a6df6e81e0af76bdbd7b541ec95e (patch)
treee62eecf73b429ab2d5897e42dc8e62cbfab4ee15
parent61ebc3cbda0235584c162227d48b876decc8fcc9 (diff)
downloadorg.eclipse.uml2-c6135190af73a6df6e81e0af76bdbd7b541ec95e.tar.gz
org.eclipse.uml2-c6135190af73a6df6e81e0af76bdbd7b541ec95e.tar.xz
org.eclipse.uml2-c6135190af73a6df6e81e0af76bdbd7b541ec95e.zip
[411731] Avoid performance problems around stereotype applications.
-rw-r--r--plugins/org.eclipse.uml2-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.uml2.sdk-feature/feature.xml2
-rw-r--r--plugins/org.eclipse.uml2.uml.edit/META-INF/MANIFEST.MF2
-rw-r--r--plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/UMLItemProviderAdapterFactory.java11
-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/util/UMLUtil.java7
6 files changed, 15 insertions, 11 deletions
diff --git a/plugins/org.eclipse.uml2-feature/feature.xml b/plugins/org.eclipse.uml2-feature/feature.xml
index 857402a12..ec71a20f1 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="4.1.0.qualifier"
+ version="4.2.0.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
diff --git a/plugins/org.eclipse.uml2.sdk-feature/feature.xml b/plugins/org.eclipse.uml2.sdk-feature/feature.xml
index 6a7e3017e..6da1851a8 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="4.1.0.qualifier"
+ version="4.2.0.qualifier"
provider-name="%feature.provider-name"
image="eclipse_update_120.jpg"
license-feature="org.eclipse.uml2.license"
diff --git a/plugins/org.eclipse.uml2.uml.edit/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.uml.edit/META-INF/MANIFEST.MF
index 880ec7c37..00482b36d 100644
--- a/plugins/org.eclipse.uml2.uml.edit/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.uml2.uml.edit/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.uml2.uml.edit; singleton:=true
-Bundle-Version: 4.1.0.qualifier
+Bundle-Version: 4.1.100.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.uml2.uml.edit.UMLEditPlugin$Implementation
Bundle-Vendor: %providerName
diff --git a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/UMLItemProviderAdapterFactory.java b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/UMLItemProviderAdapterFactory.java
index 49357d876..e53965b49 100644
--- a/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/UMLItemProviderAdapterFactory.java
+++ b/plugins/org.eclipse.uml2.uml.edit/src/org/eclipse/uml2/uml/edit/providers/UMLItemProviderAdapterFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2011 IBM Corporation, Embarcadero Technologies, CEA, and others.
+ * Copyright (c) 2005, 2013 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
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
* Kenn Hussey (Embarcadero Technologies) - 205188, 215418, 204200, 247980
- * Kenn Hussey (CEA) - 327039, 351774
+ * Kenn Hussey (CEA) - 327039, 351774, 411731
*
*/
package org.eclipse.uml2.uml.edit.providers;
@@ -4681,9 +4681,10 @@ public class UMLItemProviderAdapterFactory
@Override
public boolean isFactoryForType(Object type) {
return isFactoryForTypeGen(type)
- || (type instanceof EPackage && UMLUtil.getProfile((EPackage) type) != null)
- || (type instanceof EObject && UMLUtil
- .getStereotype((EObject) type) != null);
+ || (type instanceof EPackage
+ ? UMLUtil.getProfile((EPackage) type) != null
+ : (type instanceof EObject && UMLUtil
+ .getProfile(((EObject) type).eClass().getEPackage()) != null));
}
/**
diff --git a/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF b/plugins/org.eclipse.uml2.uml/META-INF/MANIFEST.MF
index 59228cf07..ea6f85b2b 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: 4.1.0.qualifier
+Bundle-Version: 4.1.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/util/UMLUtil.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
index f0f95fe30..b090cccae 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
@@ -10,7 +10,7 @@
* Kenn Hussey (Embarcadero Technologies) - 199624, 184249, 204406, 208125, 204200, 213218, 213903, 220669, 208016, 226396, 271470
* Nicolas Rouquette (JPL) - 260120, 313837
* Kenn Hussey - 286329, 313601, 314971, 344907, 236184, 335125
- * Kenn Hussey (CEA) - 327039, 358792, 364419, 366350, 307343, 382637, 273949, 389542, 389495, 316165, 392833, 399544, 322715, 163556, 212765, 397324, 204658, 408612
+ * Kenn Hussey (CEA) - 327039, 358792, 364419, 366350, 307343, 382637, 273949, 389542, 389495, 316165, 392833, 399544, 322715, 163556, 212765, 397324, 204658, 408612, 411731
* Yann Tanguy (CEA) - 350402
* Christian W. Damus (CEA) - 392833
*
@@ -9429,6 +9429,7 @@ public class UMLUtil
*/
public static Stereotype getStereotype(EObject stereotypeApplication) {
return stereotypeApplication == null
+ || stereotypeApplication instanceof Element
? null
: getStereotype(stereotypeApplication.eClass(),
stereotypeApplication);
@@ -9485,7 +9486,9 @@ public class UMLUtil
*/
public static Element getBaseElement(EObject stereotypeApplication) {
- if (stereotypeApplication != null) {
+ if (stereotypeApplication != null
+ && !(stereotypeApplication instanceof Element)) {
+
EClass eClass = stereotypeApplication.eClass();
if (getStereotype(eClass, stereotypeApplication) != null) {

Back to the top