Author: tfmorris
Date: 2007-11-22 20:37:00-0800
New Revision: 13808
Modified:
trunk/src_new/org/argouml/ui/LoadSwingWorker.java
trunk/src_new/org/argouml/ui/SaveSwingWorker.java
trunk/src_new/org/argouml/ui/SwingWorker.java
Log:
Name our load/save threads so we can find them
Modified: trunk/src_new/org/argouml/ui/LoadSwingWorker.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/LoadSwingWorker.java?view=diff&rev=13808&p1=trunk/src_new/org/argouml/ui/LoadSwingWorker.java&p2=trunk/src_new/org/argouml/ui/LoadSwingWorker.java&r1=13807&r2=13808
==============================================================================
--- trunk/src_new/org/argouml/ui/LoadSwingWorker.java (original)
+++ trunk/src_new/org/argouml/ui/LoadSwingWorker.java 2007-11-22 20:37:00-0800
@@ -49,6 +49,7 @@
* @param aShowUi whether to show the UI or not
*/
public LoadSwingWorker(File aFile, boolean aShowUi) {
+ super("ArgoLoadProjectThread");
this.showUi = aShowUi;
this.file = aFile;
}
Modified: trunk/src_new/org/argouml/ui/SaveSwingWorker.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/SaveSwingWorker.java?view=diff&rev=13808&p1=trunk/src_new/org/argouml/ui/SaveSwingWorker.java&p2=trunk/src_new/org/argouml/ui/SaveSwingWorker.java&r1=13807&r2=13808
==============================================================================
--- trunk/src_new/org/argouml/ui/SaveSwingWorker.java (original)
+++ trunk/src_new/org/argouml/ui/SaveSwingWorker.java 2007-11-22 20:37:00-0800
@@ -48,6 +48,7 @@
* @param aOverwrite whether to show the UI or not
*/
public SaveSwingWorker(boolean aOverwrite, File aFile) {
+ super("ArgoSaveProjectThread");
overwrite = aOverwrite;
file = aFile;
}
Modified: trunk/src_new/org/argouml/ui/SwingWorker.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/ui/SwingWorker.java?view=diff&rev=13808&p1=trunk/src_new/org/argouml/ui/SwingWorker.java&p2=trunk/src_new/org/argouml/ui/SwingWorker.java&r1=13807&r2=13808
==============================================================================
--- trunk/src_new/org/argouml/ui/SwingWorker.java (original)
+++ trunk/src_new/org/argouml/ui/SwingWorker.java 2007-11-22 20:37:00-0800
@@ -66,9 +66,18 @@
*/
private static class ThreadVar {
private Thread thread;
- ThreadVar(Thread t) { thread = t; }
- synchronized Thread get() { return thread; }
- synchronized void clear() { thread = null; }
+
+ ThreadVar(Thread t) {
+ thread = t;
+ }
+
+ synchronized Thread get() {
+ return thread;
+ }
+
+ synchronized void clear() {
+ thread = null;
+ }
}
private ThreadVar threadVar;
@@ -241,7 +250,7 @@
/**
- * Start a thread that will call the <code>construct</code> method
+ * Construct a worker thread that will call the <code>construct</code> method
* and then exit.
*/
public SwingWorker() {
@@ -268,6 +277,11 @@
threadVar = new ThreadVar(t);
}
+
+ public SwingWorker(String threadName) {
+ this();
+ threadVar.get().setName(threadName);
+ }
/**
* Start the worker thread.
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.