svn commit: r13582 - trunk/src_new/org/argouml/cognitive/ToDoList.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2007-09-24 13:39:58-0700
New Revision: 13582

Modified:
   trunk/src_new/org/argouml/cognitive/ToDoList.java

Log:
Give thread a more identifiable name.  Fix typos.  Refactor magic number.

Modified: trunk/src_new/org/argouml/cognitive/ToDoList.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/cognitive/ToDoList.java?view=diff&rev=13582&p1=trunk/src_new/org/argouml/cognitive/ToDoList.java&p2=trunk/src_new/org/argouml/cognitive/ToDoList.java&r1=13581&r2=13582
==============================================================================
--- trunk/src_new/org/argouml/cognitive/ToDoList.java	(original)
+++ trunk/src_new/org/argouml/cognitive/ToDoList.java	2007-09-24 13:39:58-0700
@@ -43,12 +43,12 @@
  * Implements a list of ToDoItem's.<p>
  *
  * It spawns a "sweeper" thread that periodically goes through the list
- * and elimiates ToDoItem's that are no longer valid.<p>
+ * and eliminates ToDoItem's that are no longer valid.<p>
  *
  * One difficulty designers face is keeping track of all
- * the myrid details of their task. It is all to
+ * the myriad details of their task. It is all too
  * easy to skip a step in the design process,
- * leave part of the design unspecified, of make
+ * leave part of the design unspecified, or make
  * a mistake that requires revision. ArgoUML provides
  * the designer with a "to do" list user interface
  * that presents action items in an organized form.
@@ -74,6 +74,11 @@
      * Logger.
      */
     private static final Logger LOG = Logger.getLogger(ToDoList.class);
+    
+    /**
+     * Number of seconds thread should sleep between passes
+     */
+    private static final int SLEEP_SECONDS = 3;
 
     // TODO: Offenders need to be more strongly typed. - tfm 20070630
     private static Object recentOffender;
@@ -151,7 +156,7 @@
      */
     public synchronized void spawnValidityChecker(Designer d) {
         designer = d;
-        validityChecker = new Thread(this, "ValidityCheckingThread");
+        validityChecker = new Thread(this, "Argo-ToDoValidityCheckingThread");
         validityChecker.setDaemon(true);
         validityChecker.setPriority(Thread.MIN_PRIORITY);
         validityChecker.start();
@@ -178,7 +183,7 @@
             forceValidityCheck(removes);
             removes.clear();
             try {
-		Thread.sleep(3000);
+		Thread.sleep(SLEEP_SECONDS * 1000);
 	    } catch (InterruptedException ignore) {
                 LOG.error("InterruptedException!!!", ignore);
             }
@@ -767,9 +772,6 @@
         }
     }
 
-    ////////////////////////////////////////////////////////////////
-    // internal methods
-
 
     @Override
     public String toString() {
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.