Author: mvw
Date: 2012-04-23 23:34:14-0700
New Revision: 19879

Modified:
   trunk/src/argouml-app/src/org/argouml/ui/SaveSwingWorker.java

Log:
Now it is package scope, some changes are needed.
Comments. Rip out unused stuff.

Modified: trunk/src/argouml-app/src/org/argouml/ui/SaveSwingWorker.java
Url: 
http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/ui/SaveSwingWorker.java?view=diff&pathrev=19879&r1=19878&r2=19879
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/ui/SaveSwingWorker.java       
(original)
+++ trunk/src/argouml-app/src/org/argouml/ui/SaveSwingWorker.java       
2012-04-23 23:34:14-0700
@@ -8,6 +8,7 @@
  *
  * Contributors:
  *    Bob Tarling
+ *    Michiel van der Wulp
  *****************************************************************************
  *
  * Some portions of this file was previously release using the BSD License:
@@ -44,36 +45,34 @@
 
 import org.argouml.i18n.Translator;
 import org.argouml.kernel.Project;
-import org.argouml.kernel.ProjectManager;
 import org.argouml.taskmgmt.ProgressMonitor;
 import org.argouml.util.ArgoFrame;
 import org.tigris.gef.undo.UndoManager;
 
 /**
  * The specialized SwingWorker used for saving projects.
- * This is currently only used by
+ * Package visibility only. This class is currently only used by
  * ProjectBrowser and any client calling should use methods there for save.
  */
 class SaveSwingWorker extends SwingWorker {
 
-    private final boolean overwrite;
     private final File file;
     private boolean result;
-    private Project project;
+    private final Project project;
     private boolean exitAfterSave;
 
     /**
      * This is the only constructor for SaveSwingWorker.
      *
      * @param project   the project to save
-     * @param aFile        the file that's going to be saved
+     * @param aFile     the file that's going to be saved
+     * @param exit      if true: exit ArgoUML when done
      */
     public SaveSwingWorker(
             final Project project,
             final File aFile,
             final boolean exit) {
         super("ArgoSaveProjectThread");
-        overwrite = true;
         file = aFile;
         this.project = project;
         exitAfterSave = exit;
@@ -92,11 +91,6 @@
         Thread currentThread = Thread.currentThread();
         currentThread.setPriority(currentThread.getPriority() - 1);
         // saves the project
-        if (project == null) {
-            // TODO: When the constructor with no Project is removed we can
-            // delete this block and make project final.
-            project = ProjectManager.getManager().getCurrentProject();
-        }
         result = ProjectBrowser.getInstance().trySave(file, pmw, project);
         return null;
     }

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2951365

To unsubscribe from this discussion, e-mail: 
[commits-unsubscr...@argouml.tigris.org].

Reply via email to