svn commit: r13251 - branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-08-06 09:05:18-0700
New Revision: 13251

Modified:
   branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java

Log:
merging tests with modifications in trunk

solving bugs on branch code

Modified: branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java?view=diff&rev=13251&p1=branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java&p2=branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java&r1=13250&r2=13251
==============================================================================
--- branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java	(original)
+++ branches/gsoc2007/maurelio1234/src_new/org/argouml/uml/profile/ProfileConfiguration.java	2007-08-06 09:05:18-0700
@@ -51,13 +51,7 @@
      * The extension used in serialization and returned by {@link #getType()}
      */
     public static final String EXTENSION = "profile";
-    
-    /**
-     * Logger.
-     */
-//    private static final Logger LOG = 
-//    		Logger.getLogger(ProfileConfiguration.class);
-    
+        
     /**
      * The default constructor for this class. Sets the Java profile as the 
      * default one and its formating strategy as the default one.
@@ -88,7 +82,7 @@
      * @param profile the profile providing the current formating strategy
      */
     public void activateFormatingStrategy(Profile profile) {
-	if (profile.getFormatingStrategy() != null
+	if (profile != null && profile.getFormatingStrategy() != null
 		&& getProfiles().contains(profile)) {
 	    this.formatingStrategy = profile.getFormatingStrategy();
 	}
@@ -160,6 +154,10 @@
 		figNodeStrategies.remove(fns);
 	    }
 
+	    if (formatingStrategy == p.getFormatingStrategy()) {
+	        formatingStrategy = null;
+	    }
+	    
             ExplorerEventAdaptor.getInstance().structureChanged();
 	}
     }
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.