svn commit: r18316 - trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: euluis
Date: 2010-04-20 14:25:25-0700
New Revision: 18316
Modified:
trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Log:
issue 6008: only top level packages are returned from getExtentPackages(); now works as documented.
Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java?view=diff&pathrev=18316&r1=18315&r2=18316
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java (original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/UmlFactoryMDRImpl.java 2010-04-20 14:25:25-0700
@@ -1,6 +1,6 @@
/* $Id$
*****************************************************************************
- * Copyright (c) 2009 Contributors - see below
+ * Copyright (c) 2009-2010 Contributors - see below
* 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,6 +8,7 @@
*
* Contributors:
* Bob Tarling
+ * Luis Sergio Oliveira (euluis)
*****************************************************************************
*
* Some portions of this file was previously release using the BSD License:
@@ -1624,7 +1625,15 @@
if (pkg == null) {
return null;
}
- return pkg.getModelManagement().getUmlPackage().refAllOfType();
+ Collection<Object> packages = pkg.getModelManagement().getUmlPackage().
+ refAllOfType();
+ Collection<Object> topLevelPackages = new ArrayList<Object>();
+ for (Object pack : packages) {
+ if (Model.getFacade().getNamespace(pack) == null) {
+ topLevelPackages.add(pack);
+ }
+ }
+ return topLevelPackages;
}
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2590834
To unsubscribe from this discussion, e-mail: [[email protected]].