svn commit: r13172 - trunk/src_new/org/argouml/uml/ProfileJava.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-07-27 15:55:53-0700
New Revision: 13172

Modified:
   trunk/src_new/org/argouml/uml/ProfileJava.java

Log:
Delete old profile before loading new one

Modified: trunk/src_new/org/argouml/uml/ProfileJava.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ProfileJava.java?view=diff&rev=13172&p1=trunk/src_new/org/argouml/uml/ProfileJava.java&p2=trunk/src_new/org/argouml/uml/ProfileJava.java&r1=13171&r2=13172
==============================================================================
--- trunk/src_new/org/argouml/uml/ProfileJava.java	(original)
+++ trunk/src_new/org/argouml/uml/ProfileJava.java	2007-07-27 15:55:53-0700
@@ -335,6 +335,12 @@
      * @return the profile model object or null
      */
     private Collection loadProfileModel() {
+        // Remove old profile packages, if any
+        if (profileElements != null) {
+            for (Object element : profileElements) {
+                Model.getUmlFactory().delete(element);
+            }
+        }
         Collection elements = new ArrayList();
         String modelFilename = getProfileModelFilename();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.