svn commit: r14814 - trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-05-27 22:34:43-0700
New Revision: 14814

Modified:
   trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java

Log:
Make methods static when they don't need class fields.  Remove obsolete comment.  Add TODO

Modified: trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java?view=diff&rev=14814&p1=trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java&p2=trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java&r1=14813&r2=14814
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/persistence/ProfileConfigurationFilePersister.java	2008-05-27 22:34:43-0700
@@ -121,8 +121,8 @@
         }
     }
 
-    private Profile handlePluginProfile(BufferedReader br) throws IOException,
-        XmiReferenceException {
+    private static Profile handlePluginProfile(BufferedReader br)
+        throws IOException, XmiReferenceException {
         Profile profile;
         String className = br.readLine().trim();
         profile = ProfileFacade.getManager().getProfileForClass(
@@ -134,7 +134,7 @@
         return profile;
     }
 
-    private Profile handleUserDefinedProfile(BufferedReader br)
+    private static Profile handleUserDefinedProfile(BufferedReader br)
         throws IOException, XmiReferenceException {
         String line;
         Profile profile;
@@ -204,7 +204,7 @@
                 profilesDirectory.getAbsolutePath());
     }
 
-    private Profile getMatchingUserDefinedProfile(String fileName, 
+    private static Profile getMatchingUserDefinedProfile(String fileName, 
             ProfileManager profileManager) {
         for (Profile candidateProfile 
             : profileManager.getRegisteredProfiles()) {
@@ -219,7 +219,7 @@
         return null;
     }
 
-    private File getProfilesDirectory(ProfileManager profileManager) {
+    private static File getProfilesDirectory(ProfileManager profileManager) {
         if (isSomeProfileDirectoryConfigured(profileManager)) {
             List<String> directories = 
                 profileManager.getSearchPathDirectories();
@@ -232,7 +232,7 @@
         }
     }
 
-    private boolean isSomeProfileDirectoryConfigured(
+    private static boolean isSomeProfileDirectoryConfigured(
             ProfileManager profileManager) {
         return profileManager.getSearchPathDirectories().size() > 0;
     }
@@ -306,12 +306,10 @@
     private void printModelXMI(PrintWriter w, Collection profileModels) 
         throws UmlException {
         
+        // TODO: Why is this not executed?  Remove if not needed - tfm
         if (true) return;
+
         StringWriter myWriter = new StringWriter();
-        // FIXME: this is completely useless since the XMI writer won't 
-        // write the model it is given, but, a list of models which it 
-        // determines on its own. See XmiWriterMDRImpl.write() implementation 
-        // and the usage of the flag WRITE_ALL.
         for (Object model : profileModels) {
             XmiWriter xmiWriter = Model.getXmiWriter(model, 
                 (OutputStream) null, //myWriter,
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.