svn commit: r15621 - trunk/src: argouml-app/src/org/argouml/cognitive argouml-app/src/org/argouml/cognitive/ui argouml-app/src/org/argouml/uml/cognitive argouml-core-model-mdr/src/org/argouml/model/mdr

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2008-08-27 12:22:17-0700
New Revision: 15621

Modified:
   trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java
   trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java
   trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java
   trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java

Log:
RESOLVED - task 5024: ConcurrentModificationException in ToDo after project load 
http://argouml.tigris.org/issues/show_bug.cgi?id=5024

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/Designer.java	2008-08-27 12:22:17-0700
@@ -754,15 +754,6 @@
         return toDoList;
     }
 
-//    /**
-//     * Add all the items in the given list to my list.
-//     *
-//     * @param list the items to be added
-//     */
-//    public void addToDoItems(ToDoList list) {
-//        toDoList.addAll(list);
-//    }
-//
     /**
      * Remove all the items in the given list from my list.
      *
@@ -963,20 +954,4 @@
      */
     private static final long serialVersionUID = -3647853023882216454L;
 
-    /**
-     * Gets the number of ToDo items with the given priority.
-     * @param priority The priority filter
-     * @return The number of ToDo items with that priority
-     */
-    public int getToDoListCount(final int priority) {
-        int count = 0;
-        synchronized (toDoList) {
-            for (ToDoItem item :  toDoList) {
-                if (item.getPriority() == priority) {
-                    ++count;
-                }
-            }
-        }
-        return count;
-    }
 }

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ListSet.java	2008-08-27 12:22:17-0700
@@ -27,7 +27,9 @@
 import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Collections;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
 import java.util.ListIterator;
@@ -46,12 +48,26 @@
     private static final int TC_LIMIT = 50;
 
     private List<T> list;
+    
+    /**
+     * A hash set containing the same items as the list so that we can
+     * use it for fast lookups.  
+     */
+    private Set<T> set;
+    
+    /**
+     * The mutex/lock which is used for operations that need to check/modify
+     * both the set and list.  Get operations which only access the list can
+     * rely on the fact that it is a synchronized list.
+     */
+    private final Object mutex = new Object(); 
 
     /**
      * The constructor.
      */
     public ListSet() {
-        list = new ArrayList<T>();
+        list =  Collections.synchronizedList(new ArrayList<T>());
+        set = new HashSet<T>();
     }
 
     /**
@@ -60,7 +76,8 @@
      * @param n the initial capacity of the ListSet
      */
     public ListSet(int n) {
-        list = new ArrayList<T>(n);
+        list = Collections.synchronizedList(new ArrayList<T>(n));
+        set = new HashSet<T>(n);
     }
 
     /**
@@ -69,7 +86,8 @@
      * @param o1 the first object to add
      */
     public ListSet(T o1) {
-        list = new ArrayList<T>();
+        list = Collections.synchronizedList(new ArrayList<T>());
+        set = new HashSet<T>();
         add(o1);
     }
 
@@ -81,9 +99,7 @@
      */
     @Deprecated
     public void addElement(T o) {
-        if (!contains(o)) {
-            list.add(o);
-        }
+        add(o);
     }
     
     /**
@@ -174,7 +190,9 @@
     @Deprecated
     public void addAllElementsSuchThat(ListSet<T> s, 
     		org.tigris.gef.util.Predicate p) {
-        addAllElementsSuchThat(s.iterator(), p);
+        synchronized (s.mutex()) {
+            addAllElementsSuchThat(s.iterator(), p);
+        }
     }
 
     /**
@@ -183,18 +201,23 @@
      */
     public void addAllElementsSuchThat(ListSet<T> s, 
     		org.argouml.util.Predicate p) {
-        addAllElementsSuchThat(s.iterator(), p);
+        synchronized (s.mutex()) {
+            addAllElementsSuchThat(s.iterator(), p);
+        }
     }
     
     /*
      * @see java.util.Collection#remove(java.lang.Object)
      */
     public boolean remove(Object o) {
-        boolean result = contains(o);
-        if (o != null) {
-            list.remove(o);
+        synchronized (mutex) {
+            boolean result = contains(o);
+            if (o != null) {
+                list.remove(o);
+                set.remove(o);
+            }
+            return result;
         }
-        return result;
     }
 
     /**
@@ -210,15 +233,17 @@
      * Remove all objects.
      */
     public void removeAllElements() {
-        list.clear();
+        clear();
     }
 
     /*
      * @see java.util.Collection#contains(java.lang.Object)
      */
     public boolean contains(Object o) {
-        if (o != null) {
-            return list.contains(o);
+        synchronized (mutex) {
+            if (o != null) {
+                return set.contains(o);
+            }
         }
         return false;
     }
@@ -254,9 +279,11 @@
      */
     @Deprecated
     public Object findSuchThat(org.tigris.gef.util.Predicate p) {
-        for (Object o : list) {
-            if (p.predicate(o)) {
-                return o;
+        synchronized (list) {
+            for (Object o : list) {
+                if (p.predicate(o)) {
+                    return o;
+                }
             }
         }
         return null;
@@ -271,9 +298,11 @@
      * @return the found object or null
      */
     public Object findSuchThat(org.argouml.util.Predicate p) {
-        for (Object o : list) {
-            if (p.evaluate(o)) {
-                return o;
+        synchronized (list) {
+            for (Object o : list) {
+                if (p.evaluate(o)) {
+                    return o;
+                }
             }
         }
         return null;
@@ -343,9 +372,8 @@
         return 0;
     }
 
-    /*
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
+
+    @Override
     public boolean equals(Object o) {
         if (!(o instanceof ListSet)) {
             return false;
@@ -354,9 +382,11 @@
         if (set.size() != size()) {
             return false;
         }
-        for (Object obj : list) {
-            if (!(set.contains(obj))) {
-                return false;
+        synchronized (list) {
+            for (Object obj : list) {
+                if (!(set.contains(obj))) {
+                    return false;
+                }
             }
         }
         return true;
@@ -379,15 +409,16 @@
         return list.size();
     }
 
-    /*
-     * @see java.lang.Object#toString()
-     */
+
+    @Override
     public String toString() {
-        StringBuilder sb = new StringBuilder("Set{");        
-        for (Iterator it = iterator(); it.hasNext(); ) {
-            sb.append(it.next());
-            if (it.hasNext()) {
-                sb.append(", ");
+        StringBuilder sb = new StringBuilder("Set{");  
+        synchronized (list) {
+            for (Iterator it = iterator(); it.hasNext();) {
+                sb.append(it.next());
+                if (it.hasNext()) {
+                    sb.append(", ");
+                }
             }
         }
         sb.append("}");
@@ -489,8 +520,10 @@
     public ListSet<T> reachable(org.tigris.gef.util.ChildGenerator cg, int max, 
     		org.tigris.gef.util.Predicate p) {
         ListSet<T> kids = new ListSet<T>();
-        for (Object r : list) {
-            kids.addAllElementsSuchThat(cg.gen(r), p);
+        synchronized (list) {
+            for (Object r : list) {
+                kids.addAllElementsSuchThat(cg.gen(r), p);
+            }
         }
         return kids.transitiveClosure(cg, max, p);
     }
@@ -512,8 +545,10 @@
     public ListSet<T> reachable(org.argouml.util.ChildGenerator cg, int max, 
     		org.argouml.util.Predicate predicate) {
         ListSet<T> kids = new ListSet<T>();
-        for (Object r : list) {
-            kids.addAllElementsSuchThat(cg.childIterator(r), predicate);
+        synchronized (list) {
+            for (Object r : list) {
+                kids.addAllElementsSuchThat(cg.childIterator(r), predicate);
+            }
         }
         return kids.transitiveClosure(cg, max, predicate);
     }
@@ -590,9 +625,12 @@
             iterCount++;
             lastSize = touched.size();
             frontier = new ListSet<T>();
-            for (T recentElement : recent) {
-                Iterator frontierChildren = cg.childIterator(recentElement);
-                frontier.addAllElementsSuchThat(frontierChildren, predicate);
+            synchronized (recent) {
+                for (T recentElement : recent) {
+                    Iterator frontierChildren = cg.childIterator(recentElement);
+                    frontier.addAllElementsSuchThat(frontierChildren, 
+                            predicate);
+                }
             }
             touched.addAll(frontier);
             recent = frontier;
@@ -613,6 +651,13 @@
     public Iterator<T> iterator() {
         return list.iterator();
     }
+    
+    /**
+     * @return mutex object to synchronize on for iteration
+     */
+    public Object mutex() {
+        return list;
+    }
 
     /*
      * @see java.util.Collection#toArray()
@@ -633,18 +678,23 @@
      * @see java.util.Collection#add(java.lang.Object)
      */
     public boolean add(T arg0) {
-        boolean result = list.contains(arg0);
-        if (!result) {
-            list.add(arg0);
+        synchronized (mutex) {
+            boolean result = set.contains(arg0);
+            if (!result) {
+                set.add(arg0);
+                list.add(arg0);
+            }
+            return !result;
         }
-        return !result;
     }
 
     /*
      * @see java.util.Collection#containsAll(java.util.Collection)
      */
     public boolean containsAll(Collection arg0) {
-        return list.containsAll(arg0);
+        synchronized (mutex) {
+            return set.containsAll(arg0);
+        }
     }
 
 
@@ -678,7 +728,10 @@
      * @see java.util.Collection#clear()
      */
     public void clear() {
-        list.clear();
+        synchronized (mutex) {
+            list.clear();
+            set.clear();
+        }
     }
 
     /*
@@ -699,18 +752,17 @@
      * @see java.util.List#set(int, java.lang.Object)
      */
     public T set(int arg0, T o) {
-        if (contains(o)) {
-            list.remove(o);
-        }
-        return list.set(arg0, o);
+        throw new UnsupportedOperationException("set() method not supported");
     }
 
     /*
      * @see java.util.List#add(int, java.lang.Object)
      */
     public void add(int arg0, T arg1) {
-        if (!list.contains(arg1)) {
-            list.add(arg0, arg1);
+        synchronized (mutex) {
+            if (!set.contains(arg1)) {
+                list.add(arg0, arg1);
+            }
         }
     }
 
@@ -718,7 +770,11 @@
      * @see java.util.List#remove(int)
      */
     public T remove(int index) {
-        return list.remove(index);
+        synchronized (mutex) {
+            T removedElement = list.remove(index);
+            set.remove(removedElement);
+            return removedElement;
+        }
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java	2008-08-27 12:22:17-0700
@@ -402,10 +402,6 @@
         if (getPoster() != null) {
             code += getPoster().hashCode();
         }
-        // The VectorSet.hashCode() doesn't exist so this will not work.
-        // if (getOffenders() != null) {
-        //     code += getOffenders().hashCode();
-        // }
         return code;
     }
 
@@ -435,6 +431,8 @@
 	}
 	return true;
     }
+    
+    
 
     ////////////////////////////////////////////////////////////////
     // user interface

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -27,6 +27,7 @@
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.ArrayList;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.List;
@@ -67,8 +68,7 @@
  * @see Designer#inform
  * @author Jason Robbins
  */
-public class ToDoList extends Observable implements Runnable,
-        Iterable<ToDoItem> {
+public class ToDoList extends Observable implements Runnable {
     /**
      * Logger.
      */
@@ -84,16 +84,18 @@
      */
     private List<ToDoItem> items;
 
+    private Set<ToDoItem> itemSet;
+    
     /**
      * These are computed when needed. 
      */
     // TODO: Offenders need to be more strongly typed. - tfm 20070630
-    private ListSet allOffenders;
+    private volatile ListSet allOffenders;
 
     /**
      * These are computed when needed.
      */
-    private ListSet<Poster> allPosters;
+    private volatile ListSet<Poster> allPosters;
 
     /**
      * ToDoItems that the designer has explicitly indicated that (s)he considers
@@ -101,7 +103,7 @@
      * <p>
      * TODO: generalize into a design rationale logging facility.
      */
-    private LinkedHashSet<ResolvedCritic> resolvedItems;
+    private Set<ResolvedCritic> resolvedItems;
 
     /**
      * A Thread that keeps checking if the items on the list are still valid.
@@ -124,14 +126,18 @@
      * (waiting).
      */
     private boolean isPaused;
+    
+    private Object pausedMutex = new Object();
 
     /**
      * Creates a new todolist. The only ToDoList is owned by the Designer.
      */
     ToDoList() {
 
-        items = new ArrayList<ToDoItem>(100);
-        resolvedItems = new LinkedHashSet<ResolvedCritic>(100);
+        items = Collections.synchronizedList(new ArrayList<ToDoItem>(100));
+        itemSet = Collections.synchronizedSet(new HashSet<ToDoItem>(100));
+        resolvedItems = 
+            Collections.synchronizedSet(new LinkedHashSet<ResolvedCritic>(100));
         listenerList = new EventListenerList();
         longestToDoList = 0;
         numNotValid = 0;
@@ -147,21 +153,24 @@
         validityChecker = new Thread(this, "Argo-ToDoValidityCheckingThread");
         validityChecker.setDaemon(true);
         validityChecker.setPriority(Thread.MIN_PRIORITY);
+        setPaused(false);
         validityChecker.start();
     }
 
     /**
-     * Periodically check to see if items on the list are still valid.
+     * Entry point for validity checker thread. Periodically check to see if
+     * items on the list are still valid.
      */
     public void run() {
-        List<ToDoItem> removes = new ArrayList<ToDoItem>();
+        List<ToDoItem> removes = 
+            Collections.synchronizedList(new ArrayList<ToDoItem>());
         while (true) {
 
             // the validity checking thread should wait if disabled.
-            synchronized (this) {
+            synchronized (pausedMutex) {
                 while (isPaused) {
                     try {
-                        this.wait();
+                        pausedMutex.wait();
                     } catch (InterruptedException ignore) {
                         LOG.error("InterruptedException!!!", ignore);
                     }
@@ -185,7 +194,8 @@
      * button via forceValidityCheck().
      */
     public void forceValidityCheck() {
-        List<ToDoItem> removes = new ArrayList<ToDoItem>();
+        List<ToDoItem> removes = 
+            Collections.synchronizedList(new ArrayList<ToDoItem>());
         forceValidityCheck(removes);
     }
 
@@ -199,57 +209,69 @@
      * <em>Warning: Fragile code!</em> No method that this method calls can
      * synchronized the Designer, otherwise there will be deadlock.
      * 
-     * @param removes the items removed
+     * @param removes a synchronized list containing the items to be removed
      */
     protected synchronized void forceValidityCheck(List<ToDoItem> removes) {
-        for (ToDoItem item : items) {
-            boolean valid;
-            try {
-                valid = item.stillValid(designer);
-            } catch (Exception ex) {
-                valid = false;
-                StringBuffer buf = new StringBuffer(
-                        "Exception raised in to do list cleaning");
-                buf.append("\n");
-                buf.append(item.toString());
-                LOG.error(buf.toString(), ex);
-            }
-            if (!valid) {
-                numNotValid++;
-                removes.add(item);
+        synchronized (items) {
+            for (ToDoItem item : items) {
+                boolean valid;
+                try {
+                    valid = item.stillValid(designer);
+                } catch (Exception ex) {
+                    valid = false;
+                    StringBuffer buf = new StringBuffer(
+                            "Exception raised in ToDo list cleaning");
+                    buf.append("\n");
+                    buf.append(item.toString());
+                    LOG.error(buf.toString(), ex);
+                }
+                if (!valid) {
+                    numNotValid++;
+                    removes.add(item);
+                }
             }
         }
 
-        for (ToDoItem item : removes) {
-            removeE(item);
-            // History.TheHistory.addItemResolution(item, "no longer valid");
-            // ((ToDoItem)item).resolve("no longer valid");
-            // notifyObservers("removeElement", item);
+        synchronized (removes) {
+            for (ToDoItem item : removes) {
+                removeE(item);
+                // History.TheHistory.addItemResolution(item,
+                // "no longer valid");
+                // ((ToDoItem)item).resolve("no longer valid");
+                // notifyObservers("removeElement", item);
+            }
+            recomputeAllOffenders();
+            recomputeAllPosters();
+            fireToDoItemsRemoved(removes);
         }
-        recomputeAllOffenders();
-        recomputeAllPosters();
-        fireToDoItemsRemoved(removes);
     }
 
     /**
-     * Pause.
+     * Pause the validity checking thread.
      */
     public void pause() {
-        isPaused = true;
+        synchronized (pausedMutex) {
+            isPaused = true;
+        }
     }
 
     /**
-     * Resume.
+     * Resume the validity checking thread.
      */
-    public synchronized void resume() {
-        notifyAll();
+    public void resume() {
+        synchronized (pausedMutex) {
+            isPaused = false;
+            pausedMutex.notifyAll();
+        }
     }
 
     /**
      * @return true is paused
      */
     public boolean isPaused() {
-        return isPaused;
+        synchronized (pausedMutex) {
+            return isPaused;
+        }
     }
 
     /**
@@ -258,8 +280,9 @@
      * @param paused if set to false, calls resume() also to start working
      */
     public void setPaused(boolean paused) {
-        isPaused = paused;
-        if (!isPaused) {
+        if (paused) {
+            pause();
+        } else {
             resume();
         }
     }
@@ -304,7 +327,20 @@
         return new Vector<ToDoItem>(items);
     }
 
+
     /**
+     * Returns the List of the ToDoItems.  It is <em>mandatory</em> that
+     * code iterating over this list synchronize access to the list as described
+     * in {@link Collections#synchronizedList(List)}.
+     * <pre>
+     *  List<ToDoItem> list = toDoList.getToDoItemList();
+     *      ...
+     *  synchronized(list) {
+     *      for (ToDoItem item : list ) { // Must be in synchronized block
+     *      ....
+     *  }
+     * </pre>
+     * @see Collections#synchronizedList
      * @return the List of ToDo items.
      */
     public List<ToDoItem> getToDoItemList() {
@@ -312,6 +348,18 @@
     }
 
     /**
+     * Returns the set of ResolvedCritics.  It is <em>mandatory</em> that
+     * code iterating over this set synchronize access to the set as described
+     * in {@link Collections#synchronizedSet(Set)}.
+     * <pre>
+     *  Set<ResolvedCritic> set = toDoList.getResolvedItems();
+     *      ...
+     *  synchronized(set) {
+     *      for (ResolvedCritic item : set ) { // Must be in synchronized block
+     *      ....
+     *  }
+     * </pre>
+     * @see Collections#synchronizedSet(Set)
      * @return the resolved items
      */
     public Set<ResolvedCritic> getResolvedItems() {
@@ -330,8 +378,10 @@
         if (all == null) {
             int size = items.size();
             all = new ListSet(size * 2);
-            for (ToDoItem item : items) {
-                all.addAll(item.getOffenders());
+            synchronized (items) {
+                for (ToDoItem item : items) {
+                    all.addAll(item.getOffenders());
+                }
             }
             allOffenders = all;
         }
@@ -353,8 +403,10 @@
         ListSet<Poster> all = allPosters;
         if (all == null) {
             all = new ListSet<Poster>();
-            for (ToDoItem item : items) {
-                all.add(item.getPoster());
+            synchronized (items) {
+                for (ToDoItem item : items) {
+                    all.add(item.getPoster());
+                }
             }
             allPosters = all;
         }
@@ -402,9 +454,9 @@
     /*
      * TODO: needs documenting, why synchronized?
      */
-    private synchronized void addE(ToDoItem item) {
-        /* remove any identical items already on the list */
-        if (items.contains(item)) {
+    private void addE(ToDoItem item) {
+        /* skip any identical items already on the list */
+        if (itemSet.contains(item)) {
             return;
         }
 
@@ -426,6 +478,7 @@
         }
 
         items.add(item);
+        itemSet.add(item);
         longestToDoList = Math.max(longestToDoList, items.size());
         addOffenders(item.getOffenders());
         addPosters(item.getPoster());
@@ -440,7 +493,7 @@
     /**
      * @param item the todo item to be added
      */
-    public synchronized void addElement(ToDoItem item) {
+    public void addElement(ToDoItem item) {
         addE(item);
     }
 
@@ -448,12 +501,15 @@
      * @param list the todo items to be removed
      */
     public void removeAll(ToDoList list) {
-        for (ToDoItem item : list) {
-            removeE(item);
+        List<ToDoItem> itemList = list.getToDoItemList();
+        synchronized (itemList) {
+            for (ToDoItem item : itemList) {
+                removeE(item);
+            }
+            recomputeAllOffenders();
+            recomputeAllPosters();
+            fireToDoItemsRemoved(itemList);
         }
-        recomputeAllOffenders();
-        recomputeAllPosters();
-        fireToDoItemsRemoved(list.getToDoItemList());
     }
 
     /**
@@ -461,9 +517,9 @@
      * @return <code>true</code> if the argument was a component of this list;
      *         <code>false</code> otherwise
      */
-    private synchronized boolean removeE(ToDoItem item) {
-        boolean res = items.remove(item);
-        return res;
+    private boolean removeE(ToDoItem item) {
+        itemSet.remove(item);
+        return items.remove(item);
     }
 
     /**
@@ -536,12 +592,11 @@
     /**
      * Remove all todo items.
      */
-    public synchronized void removeAllElements() {
+    public void removeAllElements() {
         LOG.debug("removing all todo items");
         List<ToDoItem> oldItems = new ArrayList<ToDoItem>(items);
-        for (ToDoItem tdi : oldItems) {
-            removeE(tdi);
-        }
+        items.clear();
+        itemSet.clear();
 
         recomputeAllOffenders();
         recomputeAllPosters();
@@ -592,7 +647,7 @@
 
     /**
      * @return the todo items
-     * @deprecated for 0.25.4 by tfmorris. Use {@link #iterator()}.
+     * @deprecated for 0.25.4 by tfmorris. Use {@link #getToDoItemList()}.
      */
     @Deprecated
     public Enumeration<ToDoItem> elements() {
@@ -600,13 +655,6 @@
     }
 
     /**
-     * @return an iterator for the ToDoItems
-     */
-    public Iterator<ToDoItem> iterator() {
-        return items.iterator();
-    }
-
-    /**
      * @param index an index into the todo items list
      * @return the item at the index
      * @deprecated for 0.25.4 by tfmorris. Use {@link #get(int)}.
@@ -616,6 +664,10 @@
         return get(index);
     }
 
+    /**
+     * @param index 0-based index to retrieve ToDoItem from
+     * @return the ToDoItem at the given index
+     */
     public ToDoItem get(int index) {
         return items.get(index);
     }
@@ -641,6 +693,8 @@
      * @param l the listener to be added
      */
     public void addToDoListListener(ToDoListListener l) {
+        // EventListenerList.add() is synchronized, so we don't need to 
+        // synchronize ourselves
         listenerList.add(ToDoListListener.class, l);
     }
 
@@ -648,6 +702,8 @@
      * @param l the listener to be removed
      */
     public void removeToDoListListener(ToDoListListener l) {
+        // EventListenerList.remove() is synchronized, so we don't need to 
+        // synchronize ourselves
         listenerList.remove(ToDoListListener.class, l);
     }
 
@@ -758,8 +814,11 @@
     public String toString() {
         StringBuffer res = new StringBuffer(100);
         res.append(getClass().getName()).append(" {\n");
-        for (ToDoItem item : this) {
-            res.append("    ").append(item.toString()).append("\n");
+        List<ToDoItem> itemList = getToDoItemList();
+        synchronized (itemList) {
+            for (ToDoItem item : itemList) {
+                res.append("    ").append(item.toString()).append("\n");
+            }
         }
         res.append("  }");
         return res.toString();

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -55,14 +55,20 @@
 	    return getDecisionList().get(index);
 	}
 	if (parent instanceof Decision) {
-	    Decision dec = (Decision) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(dec)) {
-		    if (index == 0) return item;
-		    index--;
-		}
-	    }
-	}
+            Decision dec = (Decision) parent;
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(dec)) {
+                        if (index == 0) {
+                            return item;
+                        }
+                        index--;
+                    }
+                }
+            }
+        }
 
 	throw new IndexOutOfBoundsException("getChild shouldn't get here "
 					    + "GoListToDecisionsToItems");
@@ -75,10 +81,18 @@
 	if (parent instanceof Decision) {
 	    Decision dec = (Decision) parent;
             int count = 0;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(dec)) count++;
-		if (stopafterone && count > 0) break;
-	    }
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(dec)) {
+                        count++;
+                    }
+                    if (stopafterone && count > 0) {
+                        break;
+                    }
+                }
+            }
 	    return count;
 	}
 	return 0;
@@ -113,11 +127,15 @@
 	    // found and index == 0
 	    List<ToDoItem> candidates = new ArrayList<ToDoItem>();
 	    Decision dec = (Decision) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(dec)) {
-                    candidates.add(item);
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(dec)) {
+                        candidates.add(item);
+                    }
                 }
-	    }
+            }
 	    return candidates.indexOf(child);
 	}
 	return -1;

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -55,13 +55,19 @@
 	    return getGoalList().get(index);
 	}
 	if (parent instanceof Goal) {
-	    Goal g = (Goal) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(g)) {
-		    if (index == 0) return item;
-		    index--;
-		}
-	    }
+            Goal g = (Goal) parent;
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(g)) {
+                        if (index == 0) {
+                            return item;
+                        }
+                        index--;
+                    }
+                }
+            }
 	}
 	throw new IndexOutOfBoundsException("getChild shouldnt get here "
 					    + "GoListToGoalsToItems");
@@ -77,9 +83,15 @@
 	if (parent instanceof Goal) {
 	    Goal g = (Goal) parent;
 	    int count = 0;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(g)) count++;
-	    }
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(g)) {
+                        count++;
+                    }
+                }
+            }
 	    return count;
 	}
 	return 0;
@@ -98,11 +110,15 @@
 	    // found and index == 0
 	    List<ToDoItem> candidates = new ArrayList<ToDoItem>();
 	    Goal g = (Goal) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.getPoster().supports(g)) {
-                    candidates.add(item);
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPoster().supports(g)) {
+                        candidates.add(item);
+                    }
                 }
-	    }
+            }
 	    return candidates.indexOf(child);
 	}
 	return -1;
@@ -112,8 +128,12 @@
      * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
      */
     public boolean isLeaf(Object node) {
-	if (node instanceof ToDoList) return false;
-	if (node instanceof Goal && getChildCount(node) > 0) return false;
+	if (node instanceof ToDoList) {
+	    return false;
+	}
+	if (node instanceof Goal && getChildCount(node) > 0) {
+	    return false;
+	}
 	return true;
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToOffenderToItem.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -39,12 +39,17 @@
 import org.argouml.uml.PredicateNotInTrash;
 
 
+
 /**
  * Rule for sorting the ToDo list: Offender -> Item.
  *
  */
 public class GoListToOffenderToItem extends AbstractGoList {
 
+    private Object lastParent;
+    
+    private List<ToDoItem> cachedChildrenList;
+    
     /**
      * The constructor.
      */
@@ -59,6 +64,7 @@
      * @see javax.swing.tree.TreeModel#getChild(java.lang.Object, int)
      */
     public Object getChild(Object parent, int index) {
+        // TODO: This should only be building list up to 'index'
 	return getChildrenList(parent).get(index);
     }
 
@@ -84,9 +90,21 @@
         if (node instanceof ToDoList) {
             return false;
         }
-        if (getChildCount(node) > 0) {
-            return false;
+        // TODO: This is a very expensive way to do this
+//        if (getChildCount(node) > 0) {
+//            return false;
+//        }
+        
+        List<ToDoItem> itemList = 
+            Designer.theDesigner().getToDoList().getToDoItemList();
+        synchronized (itemList) {
+            for (ToDoItem item : itemList) {
+                if (item.getOffenders().contains(node)) {
+                    return false;
+                }
+            }
         }
+        
         return true;
     }
 
@@ -114,29 +132,43 @@
      * @return a list of children for the given object
      */
     public List<ToDoItem> getChildrenList(Object parent) {
+        if (parent.equals(lastParent)) {
+            return cachedChildrenList;
+        }
+        lastParent = parent;
         ListSet<ToDoItem> allOffenders = new ListSet<ToDoItem>();
-        allOffenders.addAllElementsSuchThat(
-                Designer.theDesigner().getToDoList().getOffenders(), 
-                getListPredicate());
+        ListSet designerOffenders = 
+            Designer.theDesigner().getToDoList().getOffenders();
+        synchronized (designerOffenders) {
+            allOffenders.addAllElementsSuchThat(designerOffenders,
+                    getListPredicate());
+        }
 
         if (parent instanceof ToDoList) {
-            return allOffenders;
+            cachedChildrenList = allOffenders;
+            return cachedChildrenList;
         }
         
         //otherwise parent must be an offending design material
         if (allOffenders.contains(parent)) {
             List<ToDoItem> result = new ArrayList<ToDoItem>();
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-                ListSet offs = new ListSet();
-                offs.addAllElementsSuchThat(item.getOffenders(),
-                    getListPredicate());
-                if (offs.contains(parent)) {
-                    result.add(item);
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    ListSet offs = new ListSet();
+                    offs.addAllElementsSuchThat(item.getOffenders(),
+                            getListPredicate());
+                    if (offs.contains(parent)) {
+                        result.add(item);
+                    }
                 }
             }
-            return result;
+            cachedChildrenList = result;
+            return cachedChildrenList;
         }
-        return Collections.EMPTY_LIST;
+        cachedChildrenList = Collections.emptyList();
+        return cachedChildrenList;
     }
     
     /*

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2007 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -75,8 +75,12 @@
      * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
      */
     public boolean isLeaf(Object node) {
-	if (node instanceof ToDoList) return false;
-	if (getChildCount(node) > 0) return false;
+	if (node instanceof ToDoList) {
+	    return false;
+	}
+	if (getChildCount(node) > 0) {
+	    return false;
+	}
 	return true;
     }
 
@@ -112,15 +116,19 @@
         //otherwise parent must be an offending design material
         if (allPosters.contains(parent)) {
             List<ToDoItem> result = new ArrayList<ToDoItem>();
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-                Poster post = item.getPoster();
-                if (post == parent) {
-                    result.add(item);
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    Poster post = item.getPoster();
+                    if (post == parent) {
+                        result.add(item);
+                    }
                 }
             }
             return result;
         }
-        return Collections.EMPTY_LIST;
+        return Collections.emptyList();
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -24,8 +24,11 @@
 
 package org.argouml.cognitive.ui;
 
+import java.util.List;
+
 import javax.swing.event.TreeModelListener;
 import javax.swing.tree.TreePath;
+
 import org.argouml.cognitive.Designer;
 import org.argouml.cognitive.ToDoItem;
 import org.argouml.cognitive.ToDoList;
@@ -48,16 +51,20 @@
 	    return PriorityNode.getPriorityList().get(index);
 	}
 	if (parent instanceof PriorityNode) {
-	    PriorityNode pn = (PriorityNode) parent;
-            for (ToDoItem item :  Designer.theDesigner().getToDoList()) {
-		if (item.getPriority() == pn.getPriority()) {
-		    if (index == 0) {
-                        return item;
+            PriorityNode pn = (PriorityNode) parent;
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPriority() == pn.getPriority()) {
+                        if (index == 0) {
+                            return item;
+                        }
+                        index--;
                     }
-		    index--;
-		}
-	    }
-	}
+                }
+            }
+        }
 	throw new IndexOutOfBoundsException("getChild shouldnt get here "
 					    + "GoListToPriorityToItem");
     }
@@ -71,41 +78,58 @@
 	}
 	if (parent instanceof PriorityNode) {
 	    PriorityNode pn = (PriorityNode) parent;
-	    return Designer.theDesigner().getToDoListCount(pn.getPriority());
-	}
+            int count = 0;
+            List<ToDoItem> itemList = Designer.theDesigner().getToDoList()
+                    .getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPriority() == pn.getPriority()) {
+                        count++;
+                    }
+                }
+            }
+            return count;
+        }
 	return 0;
     }
-
+   
+    
     /*
-     * @see javax.swing.tree.TreeModel#getIndexOfChild(
-     * java.lang.Object, java.lang.Object)
+     * @see javax.swing.tree.TreeModel#getIndexOfChild(java.lang.Object, java.lang.Object)
      */
     public int getIndexOfChild(Object parent, Object child) {
 	if (parent instanceof ToDoList) {
 	    return PriorityNode.getPriorityList().indexOf(child);
 	}
 	if (parent instanceof PriorityNode) {
-	    int index = 0;
-	    PriorityNode pn = (PriorityNode) parent;
-            for (ToDoItem item :  Designer.theDesigner().getToDoList()) {
-		if (item.getPriority() == pn.getPriority()) {
-		    if (item == child) {
-                        return index;
+            int index = 0;
+            PriorityNode pn = (PriorityNode) parent;
+            List<ToDoItem> itemList = Designer.theDesigner().getToDoList()
+                    .getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.getPriority() == pn.getPriority()) {
+                        if (item == child) {
+                            return index;
+                        }
+                        index++;
                     }
-		    index++;
-		}
-	    }
-	}
-	return -1;
+                }
+            }
+        }
+        return -1;
     }
 
     /*
      * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
      */
     public boolean isLeaf(Object node) {
-	if (node instanceof ToDoList) return false;
-	if (node instanceof PriorityNode && getChildCount(node) > 0)
+	if (node instanceof ToDoList) {
 	    return false;
+	}
+	if (node instanceof PriorityNode && getChildCount(node) > 0) {
+	    return false;
+	}
 	return true;
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java	2008-08-27 12:22:17-0700
@@ -1,5 +1,5 @@
 // $Id$
-// Copyright (c) 1996-2006 The Regents of the University of California. All
+// Copyright (c) 1996-2008 The Regents of the University of California. All
 // Rights Reserved. Permission to use, copy, modify, and distribute this
 // software and its documentation without fee, and without a written
 // agreement is hereby granted, provided that the above copyright notice
@@ -54,12 +54,18 @@
 	}
 	if (parent instanceof KnowledgeTypeNode) {
 	    KnowledgeTypeNode ktn = (KnowledgeTypeNode) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.containsKnowledgeType(ktn.getName())) {
-		    if (index == 0) return item;
-		    index--;
-		}
-	    }
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.containsKnowledgeType(ktn.getName())) {
+                        if (index == 0) {
+                            return item;
+                        }
+                        index--;
+                    }
+                }
+            }
 	}
 	throw new IndexOutOfBoundsException("getChild shouldnt get here "
 					    + "GoListToTypeToItem");
@@ -75,12 +81,16 @@
 	if (parent instanceof KnowledgeTypeNode) {
 	    KnowledgeTypeNode ktn = (KnowledgeTypeNode) parent;
 	    int count = 0;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.containsKnowledgeType(ktn.getName())) {
-		    count++;
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.containsKnowledgeType(ktn.getName())) {
+                        count++;
+                    }
                 }
-	    }
-	    return count;
+            }
+            return count;
 	}
 	return 0;
     }
@@ -98,11 +108,15 @@
 	    // found and index == 0
 	    List<ToDoItem> candidates = new ArrayList<ToDoItem>();
 	    KnowledgeTypeNode ktn = (KnowledgeTypeNode) parent;
-            for (ToDoItem item : Designer.theDesigner().getToDoList()) {
-		if (item.containsKnowledgeType(ktn.getName())) {
-		    candidates.add(item);
+            List<ToDoItem> itemList = 
+                Designer.theDesigner().getToDoList().getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.containsKnowledgeType(ktn.getName())) {
+                        candidates.add(item);
+                    }
                 }
-	    }
+            }
 	    return candidates.indexOf(child);
 	}
 	return -1;
@@ -112,10 +126,22 @@
      * @see javax.swing.tree.TreeModel#isLeaf(java.lang.Object)
      */
     public boolean isLeaf(Object node) {
-	if (node instanceof ToDoList) return false;
-	if (node instanceof KnowledgeTypeNode && getChildCount(node) > 0)
+	if (node instanceof ToDoList) {
 	    return false;
-	return true;
+	}
+	if (node instanceof KnowledgeTypeNode) {
+            KnowledgeTypeNode ktn = (KnowledgeTypeNode) node;
+            List<ToDoItem> itemList = Designer.theDesigner().getToDoList()
+                    .getToDoItemList();
+            synchronized (itemList) {
+                for (ToDoItem item : itemList) {
+                    if (item.containsKnowledgeType(ktn.getName())) {
+                        return false;
+                    }
+                }
+            }
+        }
+        return true;
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByOffender.java	2008-08-27 12:22:17-0700
@@ -65,26 +65,39 @@
 
         ListSet allOffenders = Designer.theDesigner().getToDoList()
                 .getOffenders();
-        for (Object off : allOffenders) {
-            path[1] = off;
-            int nMatchingItems = 0;
-            for (ToDoItem item : items) {
-                ListSet offenders = item.getOffenders();
-                if (!offenders.contains(off)) continue;
-                nMatchingItems++;
-            }
-            if (nMatchingItems == 0) continue;
-            int[] childIndices = new int[nMatchingItems];
-            Object[] children = new Object[nMatchingItems];
-            nMatchingItems = 0;
-            for (ToDoItem item : items) {
-                ListSet offenders = item.getOffenders();
-                if (!offenders.contains(off)) continue;
-                childIndices[nMatchingItems] = getIndexOfChild(off, item);
-                children[nMatchingItems] = item;
-                nMatchingItems++;
+        synchronized (allOffenders) {
+            for (Object off : allOffenders) {
+                path[1] = off;
+                int nMatchingItems = 0;
+                synchronized (items) {
+                    for (ToDoItem item : items) {
+                        ListSet offenders = item.getOffenders();
+                        if (!offenders.contains(off)) {
+                            continue;
+                        }
+                        nMatchingItems++;
+                    }
+                }
+                if (nMatchingItems == 0) {
+                    continue;
+                }
+                int[] childIndices = new int[nMatchingItems];
+                Object[] children = new Object[nMatchingItems];
+                nMatchingItems = 0;
+                synchronized (items) {
+                    for (ToDoItem item : items) {
+                        ListSet offenders = item.getOffenders();
+                        if (!offenders.contains(off)) {
+                            continue;
+                        }
+                        childIndices[nMatchingItems] = getIndexOfChild(off,
+                                item);
+                        children[nMatchingItems] = item;
+                        nMatchingItems++;
+                    }
+                }
+                fireTreeNodesChanged(this, path, childIndices, children);
             }
-            fireTreeNodesChanged(this, path, childIndices, children);
         }
     }
 
@@ -97,34 +110,43 @@
         Object[] path = new Object[2];
         path[0] = Designer.theDesigner().getToDoList();
 
-        for (Object off : Designer.theDesigner().getToDoList().getOffenders()) {
-            path[1] = off;
-            int nMatchingItems = 0;
-            // TODO: This first loop just to count the items appears 
-            // redundant to me - tfm 20070630
-            for (ToDoItem item : items) {
-                ListSet offenders = item.getOffenders();
-                if (!offenders.contains(off)) {
-                    continue;
+        ListSet allOffenders = Designer.theDesigner().getToDoList()
+                .getOffenders();
+        synchronized (allOffenders) {
+            for (Object off : allOffenders) {
+                path[1] = off;
+                int nMatchingItems = 0;
+                // TODO: This first loop just to count the items appears
+                // redundant to me - tfm 20070630
+                synchronized (items) {
+                    for (ToDoItem item : items) {
+                        ListSet offenders = item.getOffenders();
+                        if (!offenders.contains(off)) {
+                            continue;
+                        }
+                        nMatchingItems++;
+                    }
                 }
-                nMatchingItems++;
-            }
-            if (nMatchingItems == 0) {
-                continue;
-            }
-            int[] childIndices = new int[nMatchingItems];
-            Object[] children = new Object[nMatchingItems];
-            nMatchingItems = 0;
-            for (ToDoItem item : items) {
-                ListSet offenders = item.getOffenders();
-                if (!offenders.contains(off)) {
+                if (nMatchingItems == 0) {
                     continue;
                 }
-                childIndices[nMatchingItems] = getIndexOfChild(off, item);
-                children[nMatchingItems] = item;
-                nMatchingItems++;
+                int[] childIndices = new int[nMatchingItems];
+                Object[] children = new Object[nMatchingItems];
+                nMatchingItems = 0;
+                synchronized (items) {
+                    for (ToDoItem item : items) {
+                        ListSet offenders = item.getOffenders();
+                        if (!offenders.contains(off)) {
+                            continue;
+                        }
+                        childIndices[nMatchingItems] = getIndexOfChild(off,
+                                item);
+                        children[nMatchingItems] = item;
+                        nMatchingItems++;
+                    }
+                }
+                fireTreeNodesInserted(this, path, childIndices, children);
             }
-            fireTreeNodesInserted(this, path, childIndices, children);
         }
     }
 
@@ -137,23 +159,30 @@
         Object[] path = new Object[2];
         path[0] = Designer.theDesigner().getToDoList();
 
-        for (Object off : Designer.theDesigner().getToDoList().getOffenders()) {
-            boolean anyInOff = false;
-            for (ToDoItem item : items) {
-                ListSet offenders = item.getOffenders();
-                if (offenders.contains(off)) { 
-                    anyInOff = true;
-                    break;
+        ListSet allOffenders = Designer.theDesigner().getToDoList()
+                .getOffenders();
+        synchronized (allOffenders) {
+            for (Object off : allOffenders) {
+                boolean anyInOff = false;
+                synchronized (items) {
+                    for (ToDoItem item : items) {
+                        ListSet offenders = item.getOffenders();
+                        // TODO: This looks O(n^2)
+                        if (offenders.contains(off)) {
+                            anyInOff = true;
+                            break;
+                        }
+                    }
+                }
+                if (!anyInOff) {
+                    continue;
                 }
-            }
-            if (!anyInOff) { 
-                continue;
-            }
 
-            LOG.debug("toDoItemRemoved updating PriorityNode");
-            path[1] = off;
-            //fireTreeNodesChanged(this, path, childIndices, children);
-            fireTreeStructureChanged(path);
+                LOG.debug("toDoItemRemoved updating PriorityNode");
+                path[1] = off;
+                // fireTreeNodesChanged(this, path, childIndices, children);
+                fireTreeStructureChanged(path);
+            }
         }
     }
 

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPoster.java	2008-08-27 12:22:17-0700
@@ -28,6 +28,7 @@
 
 import org.apache.log4j.Logger;
 import org.argouml.cognitive.Designer;
+import org.argouml.cognitive.ListSet;
 import org.argouml.cognitive.Poster;
 import org.argouml.cognitive.ToDoItem;
 import org.argouml.cognitive.ToDoListEvent;
@@ -63,27 +64,37 @@
 	Object[] path = new Object[2];
 	path[0] = Designer.theDesigner().getToDoList();
 
-        for (Poster p : Designer.theDesigner().getToDoList().getPosters()) {
-	    path[1] = p;
-	    int nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		Poster post = item.getPoster();
-		if (post != p) continue;
-		nMatchingItems++;
-	    }
-	    if (nMatchingItems == 0) continue;
-	    int[] childIndices = new int[nMatchingItems];
-	    Object[] children = new Object[nMatchingItems];
-	    nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		Poster post = item.getPoster();
-		if (post != p) continue;
-		childIndices[nMatchingItems] = getIndexOfChild(p, item);
-		children[nMatchingItems] = item;
-		nMatchingItems++;
-	    }
-	    fireTreeNodesChanged(this, path, childIndices, children);
-	}
+	ListSet<Poster> allPosters = 
+	    Designer.theDesigner().getToDoList().getPosters();
+        synchronized (allPosters) {
+            for (Poster p : allPosters) {
+                path[1] = p;
+                int nMatchingItems = 0;
+                for (ToDoItem item : items) {
+                    Poster post = item.getPoster();
+                    if (post != p) {
+                        continue;
+                    }
+                    nMatchingItems++;
+                }
+                if (nMatchingItems == 0) {
+                    continue;
+                }
+                int[] childIndices = new int[nMatchingItems];
+                Object[] children = new Object[nMatchingItems];
+                nMatchingItems = 0;
+                for (ToDoItem item : items) {
+                    Poster post = item.getPoster();
+                    if (post != p) {
+                        continue;
+                    }
+                    childIndices[nMatchingItems] = getIndexOfChild(p, item);
+                    children[nMatchingItems] = item;
+                    nMatchingItems++;
+                }
+                fireTreeNodesChanged(this, path, childIndices, children);
+            }
+        }
     }
 
     /*
@@ -95,27 +106,37 @@
 	Object[] path = new Object[2];
 	path[0] = Designer.theDesigner().getToDoList();
 
-        for (Poster p : Designer.theDesigner().getToDoList().getPosters()) {
-	    path[1] = p;
-	    int nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		Poster post = item.getPoster();
-		if (post != p) continue;
-		nMatchingItems++;
-	    }
-	    if (nMatchingItems == 0) continue;
-	    int[] childIndices = new int[nMatchingItems];
-	    Object[] children = new Object[nMatchingItems];
-	    nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		Poster post = item.getPoster();
-		if (post != p) continue;
-		childIndices[nMatchingItems] = getIndexOfChild(p, item);
-		children[nMatchingItems] = item;
-		nMatchingItems++;
-	    }
-	    fireTreeNodesInserted(this, path, childIndices, children);
-	}
+	ListSet<Poster> allPosters = 
+	    Designer.theDesigner().getToDoList().getPosters();
+	synchronized (allPosters) {
+            for (Poster p : allPosters) {
+                path[1] = p;
+                int nMatchingItems = 0;
+                for (ToDoItem item : items) {
+                    Poster post = item.getPoster();
+                    if (post != p) {
+                        continue;
+                    }
+                    nMatchingItems++;
+                }
+                if (nMatchingItems == 0) {
+                    continue;
+                }
+                int[] childIndices = new int[nMatchingItems];
+                Object[] children = new Object[nMatchingItems];
+                nMatchingItems = 0;
+                for (ToDoItem item : items) {
+                    Poster post = item.getPoster();
+                    if (post != p) {
+                        continue;
+                    }
+                    childIndices[nMatchingItems] = getIndexOfChild(p, item);
+                    children[nMatchingItems] = item;
+                    nMatchingItems++;
+                }
+                fireTreeNodesInserted(this, path, childIndices, children);
+            }
+        }
     }
 
     /*
@@ -128,21 +149,25 @@
 	Object[] path = new Object[2];
 	path[0] = Designer.theDesigner().getToDoList();
 
-        for (Poster p : Designer.theDesigner().getToDoList().getPosters()) {
-            boolean anyInPoster = false;
-            for (ToDoItem item : items) {
-                Poster post = item.getPoster();
-                if (post == p) { 
-                    anyInPoster = true;
-                    break;
+	ListSet<Poster> allPosters = Designer.theDesigner().getToDoList()
+                .getPosters();
+        synchronized (allPosters) {
+            for (Poster p : allPosters) {
+                boolean anyInPoster = false;
+                for (ToDoItem item : items) {
+                    Poster post = item.getPoster();
+                    if (post == p) {
+                        anyInPoster = true;
+                        break;
+                    }
                 }
+                if (!anyInPoster) {
+                    continue;
+                }
+                path[1] = p;
+                fireTreeStructureChanged(path);
             }
-            if (!anyInPoster) { 
-                continue;
-            }
-	    path[1] = p;
-	    fireTreeStructureChanged(path);
-	}
+        }
     }
 
     /*

Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java&p2=trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/ToDoByPriority.java	2008-08-27 12:22:17-0700
@@ -65,26 +65,30 @@
         for (PriorityNode pn : PriorityNode.getPriorityList()) {
 	    path[1] = pn;
 	    int nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		if (item.getPriority() != pn.getPriority()) {
-                    continue;
+	    synchronized (items) {
+                for (ToDoItem item : items) {
+                    if (item.getPriority() != pn.getPriority()) {
+                        continue;
+                    }
+                    nMatchingItems++;
                 }
-		nMatchingItems++;
-	    }
+            }
 	    if (nMatchingItems == 0) {
                 continue;
             }
 	    int[] childIndices = new int[nMatchingItems];
 	    Object[] children = new Object[nMatchingItems];
 	    nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		if (item.getPriority() != pn.getPriority()) {
-                    continue;
+            synchronized (items) {
+                for (ToDoItem item : items) {
+                    if (item.getPriority() != pn.getPriority()) {
+                        continue;
+                    }
+                    childIndices[nMatchingItems] = getIndexOfChild(pn, item);
+                    children[nMatchingItems] = item;
+                    nMatchingItems++;
                 }
-		childIndices[nMatchingItems] = getIndexOfChild(pn, item);
-		children[nMatchingItems] = item;
-		nMatchingItems++;
-	    }
+            }
 	    fireTreeNodesChanged(this, path, childIndices, children);
 	}
     }
@@ -101,26 +105,30 @@
         for (PriorityNode pn : PriorityNode.getPriorityList()) {
 	    path[1] = pn;
 	    int nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		if (item.getPriority() != pn.getPriority()) {
-                    continue;
+	    synchronized (items) {
+                for (ToDoItem item : items) {
+                    if (item.getPriority() != pn.getPriority()) {
+                        continue;
+                    }
+                    nMatchingItems++;
                 }
-		nMatchingItems++;
-	    }
+            }
 	    if (nMatchingItems == 0) {
                 continue;
             }
 	    int[] childIndices = new int[nMatchingItems];
 	    Object[] children = new Object[nMatchingItems];
 	    nMatchingItems = 0;
-            for (ToDoItem item : items) {
-		if (item.getPriority() != pn.getPriority()) {
-                    continue;
+	    synchronized (items) {
+                for (ToDoItem item : items) {
+                    if (item.getPriority() != pn.getPriority()) {
+                        continue;
+                    }
+                    childIndices[nMatchingItems] = getIndexOfChild(pn, item);
+                    children[nMatchingItems] = item;
+                    nMatchingItems++;
                 }
-		childIndices[nMatchingItems] = getIndexOfChild(pn, item);
-		children[nMatchingItems] = item;
-		nMatchingItems++;
-	    }
+            }
 	    fireTreeNodesInserted(this, path, childIndices, children);
 	}
     }
@@ -137,12 +145,14 @@
         for (PriorityNode pn : PriorityNode.getPriorityList()) {
 	    int nodePriority = pn.getPriority();
 	    boolean anyInPri = false;
-            for (ToDoItem item : items) {
-		int pri = item.getPriority();
-		if (pri == nodePriority) {
-                    anyInPri = true;
+	    synchronized (items) {
+                for (ToDoItem item : items) {
+                    int pri = item.getPriority();
+                    if (pri == nodePriority) {
+                        anyInPri = true;
+                    }
                 }
-	    }
+            }
 	    if (!anyInPri) {
                 continue;
             }

Modified: trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java?view=diff&rev=15621&p1=trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java&p2=trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java	(original)
+++ trunk/src/argouml-app/src/org/argouml/uml/cognitive/ProjectMemberTodoList.java	2008-08-27 12:22:17-0700
@@ -24,6 +24,8 @@
 
 package org.argouml.uml.cognitive;
 
+import java.util.List;
+import java.util.Set;
 import java.util.Vector;
 
 import org.argouml.cognitive.Designer;
@@ -76,28 +78,34 @@
      */
     public Vector<ToDoItemXMLHelper> getToDoList() {
         Vector<ToDoItemXMLHelper> out = new Vector<ToDoItemXMLHelper>();
-        Designer dsgr = Designer.theDesigner();
-        for (ToDoItem tdi : dsgr.getToDoList().getToDoItemList()) {
-            if (tdi != null && tdi.getPoster() instanceof Designer) {
-                out.addElement(new ToDoItemXMLHelper(tdi));
+        List<ToDoItem> tdiList = 
+            Designer.theDesigner().getToDoList().getToDoItemList();
+        synchronized (tdiList) {
+            for (ToDoItem tdi : tdiList) {
+                if (tdi != null && tdi.getPoster() instanceof Designer) {
+                    out.addElement(new ToDoItemXMLHelper(tdi));
+                }
             }
         }
         return out;
     }
 
     /**
-     * @return Vector conaining the resolved critics list
+     * @return Vector containing the resolved critics list
      * Used by todo.tee
      */
     public Vector<ResolvedCriticXMLHelper> getResolvedCriticsList() {
         Vector<ResolvedCriticXMLHelper> out = 
             new Vector<ResolvedCriticXMLHelper>();
-    	Designer dsgr = Designer.theDesigner();
-    	for (ResolvedCritic rci : dsgr.getToDoList().getResolvedItems()) {
-    	    if (rci != null) {
-                out.addElement(new ResolvedCriticXMLHelper(rci));
+    	Set<ResolvedCritic> resolvedSet = 
+    	    Designer.theDesigner().getToDoList().getResolvedItems();
+    	synchronized (resolvedSet) {
+            for (ResolvedCritic rci : resolvedSet) {
+                if (rci != null) {
+                    out.addElement(new ResolvedCriticXMLHelper(rci));
+                }
             }
-    	}
+        }
     	return out;
     }
 

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java?view=diff&rev=15621&p1=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java&p2=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/DataTypesFactoryMDRImpl.java	2008-08-27 12:22:17-0700
@@ -29,6 +29,7 @@
 import java.util.List;
 import java.util.StringTokenizer;
 
+import org.apache.log4j.Logger;
 import org.argouml.model.DataTypesFactory;
 import org.omg.uml.foundation.datatypes.ActionExpression;
 import org.omg.uml.foundation.datatypes.ArgListsExpression;
@@ -55,6 +56,8 @@
 class DataTypesFactoryMDRImpl extends AbstractUmlModelFactoryMDR
         implements DataTypesFactory {
 
+    private static final Logger LOG = 
+        Logger.getLogger(DataTypesFactoryMDRImpl.class);
     /**
      * The model implementation.
      */
@@ -163,6 +166,9 @@
     public Multiplicity createMultiplicity(int lower, int upper) {
         Multiplicity multiplicity = modelImpl.getUmlPackage().getDataTypes()
                 .getMultiplicity().createMultiplicity();
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Multiplicity created for range " + lower + ".." + upper);
+        }
         multiplicity.getRange().add(createMultiplicityRange(lower, upper));
         super.initialize(multiplicity);
         return multiplicity;
@@ -178,6 +184,9 @@
     public Multiplicity createMultiplicity(List range) {
         Multiplicity multiplicity = modelImpl.getUmlPackage().getDataTypes()
                 .getMultiplicity().createMultiplicity();
+        if (LOG.isDebugEnabled()) {
+            LOG.debug("Multiplicity created for list " + range);
+        }
         multiplicity.getRange().addAll(range);
         super.initialize(multiplicity);
         return multiplicity;

Modified: trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java?view=diff&rev=15621&p1=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java&p2=trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java&r1=15620&r2=15621
==============================================================================
--- trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java	(original)
+++ trunk/src/argouml-core-model-mdr/src/org/argouml/model/mdr/XmiReaderImpl.java	2008-08-27 12:22:17-0700
@@ -57,7 +57,6 @@
 import org.argouml.model.UmlException;
 import org.argouml.model.XmiException;
 import org.argouml.model.XmiReader;
-import org.argouml.model.XmiReferenceException;
 import org.netbeans.api.xmi.XMIReader;
 import org.netbeans.api.xmi.XMIReaderFactory;
 import org.netbeans.lib.jmi.xmi.InputConfig;
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.