Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2006-05-29 21:10:14 +0000
committerkhussey2006-05-29 21:10:14 +0000
commitcdd6e4c755fc5d4d09d3a9a076d0254662e1f27b (patch)
treec96b7534aadfeceff7405ec3ad8ce69d5abeb2a9
parent42aeafa78171cf3723604b43905bb11117bbdfcf (diff)
downloadorg.eclipse.uml2.test-cdd6e4c755fc5d4d09d3a9a076d0254662e1f27b.tar.gz
org.eclipse.uml2.test-cdd6e4c755fc5d4d09d3a9a076d0254662e1f27b.tar.xz
org.eclipse.uml2.test-cdd6e4c755fc5d4d09d3a9a076d0254662e1f27b.zip
[144311] Looking for specializations in nested packages.
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ProfileOperations.java28
1 files changed, 20 insertions, 8 deletions
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ProfileOperations.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ProfileOperations.java
index 4f22c32a..b2714b58 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ProfileOperations.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/internal/operations/ProfileOperations.java
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: ProfileOperations.java,v 1.27 2006/05/16 14:59:38 khussey Exp $
+ * $Id: ProfileOperations.java,v 1.28 2006/05/29 21:10:14 khussey Exp $
*/
package org.eclipse.uml2.uml.internal.operations;
@@ -31,6 +31,7 @@ import org.eclipse.emf.ecore.EEnum;
import org.eclipse.emf.ecore.ENamedElement;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
+
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.uml2.uml.Classifier;
@@ -41,15 +42,13 @@ import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.PackageImport;
import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLPackage;
import org.eclipse.uml2.uml.UMLPlugin;
import org.eclipse.uml2.uml.VisibilityKind;
-import org.eclipse.uml2.uml.Profile;
-
-import org.eclipse.uml2.uml.Stereotype;
-
import org.eclipse.uml2.uml.util.UMLSwitch;
import org.eclipse.uml2.uml.util.UMLValidator;
@@ -112,9 +111,22 @@ public class ProfileOperations
org.eclipse.uml2.uml.Class referencedMetaclass = (org.eclipse.uml2.uml.Class) referencedMetaclasses
.next();
- if (containsSpecializations(profile, referencedMetaclass)) {
- result = false;
- } else {
+ for (Iterator allContents = getAllContents(profile, true, false); allContents
+ .hasNext();) {
+
+ Object object = allContents.next();
+
+ if (object instanceof org.eclipse.uml2.uml.Package
+ && containsSpecializations(
+ (org.eclipse.uml2.uml.Package) object,
+ referencedMetaclass)) {
+
+ result = false;
+ break;
+ }
+ }
+
+ if (result) {
for (Iterator allParents = referencedMetaclass.allParents()
.iterator(); allParents.hasNext();) {

Back to the top