svn commit: r17034 - trunk/src/argouml-app: src/org/argouml/cognitive src/org/argouml/cognitive/checklist src/org/argouml/cognitive/ui src/org/argouml/uml/cognitive src/org/argouml/uml/cognitive/checklist tests/org/argouml/cognitive
Linus Tolke <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: linus
Date: 2009-04-04 22:39:22-0700
New Revision: 17034
Removed:
trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList.java
trunk/src/argouml-app/src/org/argouml/uml/cognitive/ChildGenFind.java
Modified:
trunk/src/argouml-app/src/org/argouml/cognitive/Critic.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/checklist/CheckItem.java
trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.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/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/uml/cognitive/checklist/UMLCheckItem.java
trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java
Log:
Removed deprecated methods from the Cognitive subsystem.
This is the simple part of the work where the methods are not used.
Modified: trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java?view=diff&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/Critic.java 2009-04-04 22:39:22-0700
@@ -186,17 +186,6 @@
private String moreInfoURL;
/**
- * Arguments used to configure the critic.
- * TODO: Could this be removed from the main critics class?
- * @deprecated for 0.25.4 by Linus Tolke.
- * This way of storing information encourages
- * violation of type safety.
- * Create member attributes instead.
- */
- @Deprecated
- private Hashtable<String, Object> args = new Hashtable<String, Object>();
-
- /**
* The icon representing the resource.
*/
public static final Icon DEFAULT_CLARIFIER =
@@ -972,57 +961,6 @@
}
/**
- * @param name the key
- * @param value the value
- * @deprecated for 0.25.4 by Linus Tolke.
- * This way of storing information encourages
- * violation of type safety.
- * Create member attributes instead.
- */
- @Deprecated
- protected void setArg(String name, Object value) {
- args.put(name, value);
- }
-
- /**
- * @param name the key
- * @return the value
- * @deprecated for 0.25.4 by Linus Tolke.
- * This way of storing information encourages
- * violation of type safety.
- * Create member attributes instead.
- */
- @Deprecated
- protected Object getArg(String name) {
- return args.get(name);
- }
-
- /**
- * @return the (key, value) pairs
- * @deprecated for 0.25.4 by Linus Tolke.
- * This way of storing information encourages
- * violation of type safety.
- * Create member attributes instead.
- */
- @Deprecated
- public Hashtable<String, Object> getArgs() {
- return args;
- }
-
- /**
- * @param h the new table of (key, value) pairs
- * @deprecated for 0.25.4 by Linus Tolke.
- * This way of storing information encourages
- * violation of type safety.
- * Create member attributes instead.
- */
- @Deprecated
- public void setArgs(Hashtable<String, Object> h) {
- args = h;
- }
-
-
- /**
* Get the design materials to be criticized by this critic
*
* @return the design materials
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ToDoItem.java 2009-04-04 22:39:22-0700
@@ -263,18 +263,6 @@
}
/**
- * @deprecated in 0.27.2 byb Bob Tarling. A ToDoItem should be immutable
- * to guarantee it can be passed safely between threads. Only use the
- * constructor to set this value.
- * @param h the headline
- */
- @Deprecated
- public void setHeadline(String h) {
- theHeadline = h;
- cachedExpandedHeadline = null;
- }
-
- /**
* @return the description
*/
public String getDescription() {
@@ -286,50 +274,16 @@
}
/**
- * @deprecated in 0.27.2 byb Bob Tarling. A ToDoItem should be immutable
- * to guarantee it can be passed safely between threads. Only use the
- * constructor to set this value.
- * @param d the description
- */
- @Deprecated
- public void setDescription(String d) {
- theDescription = d;
- cachedExpandedDescription = null;
- }
-
- /**
* @return the more-info-url
*/
public String getMoreInfoURL() { return theMoreInfoURL; }
/**
- * @deprecated in 0.27.2 byb Bob Tarling. A ToDoItem should be immutable
- * to guarantee it can be passed safely between threads. Only use the
- * constructor to set this value.
- * @param m the more-info-url
- */
- @Deprecated
- public void setMoreInfoURL(String m) {
- theMoreInfoURL = m;
- }
-
- /**
* @return the priority
*/
public int getPriority() { return thePriority; }
/**
- * @deprecated in 0.27.2 by Bob Tarling. A ToDoItem should be immutable
- * to guarantee it can be passed safely between threads. Only use the
- * constructor to set this value.
- * @param p the priority
- */
- @Deprecated
- public void setPriority(int p) {
- thePriority = p;
- }
-
- /**
* @return the wizard progress. An integer between 0 and 100,
* shows percent done.
*/
@@ -355,22 +309,6 @@
}
/**
- * Set the design material that is subject of this ToDoItem.
- *
- * @param offenders the offenders
- * TODO: Offenders need to be more strongly typed. - tfm 20070630
- * TODO: Provide a constructor argument for this so that the class can
- * become immutable
- * @deprecated in 0.27.2 by Bob Tarling. A ToDoItem should be immutable
- * to guarantee it can be passed safely between threads. Only use the
- * constructor to set this value.
- */
- @Deprecated
- public void setOffenders(ListSet offenders) {
- theOffenders = offenders;
- }
-
- /**
* Reply the Critic or Designer that posted this ToDoItem.
*
* @return the poster
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ToDoList.java 2009-04-04 22:39:22-0700
@@ -208,12 +208,8 @@
* synchronized the Designer, otherwise there will be deadlock.
*
* @param removes a list containing the items to be removed
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected synchronized void forceValidityCheck(
+ private synchronized void forceValidityCheck(
final List<ToDoItem> removes) {
synchronized (items) {
for (ToDoItem item : items) {
@@ -335,7 +331,7 @@
* ....
* }
* </pre>
- * @see Collections#synchronizedList
+ * @see Collections#synchronizedList(List)
* @return the List of ToDo items.
*/
public List<ToDoItem> getToDoItemList() {
@@ -624,23 +620,15 @@
/**
* Re-compute all offenders.
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected void recomputeAllOffenders() {
+ private void recomputeAllOffenders() {
allOffenders = null;
}
/**
* Reset all posters.
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected void recomputeAllPosters() {
+ private void recomputeAllPosters() {
allPosters = null;
}
@@ -665,33 +653,6 @@
listenerList.remove(ToDoListListener.class, l);
}
- /**
- * Notify all listeners that have registered interest for notification on
- * this event type. The event instance is lazily created using the
- * parameters passed into the fire method.
- *
- * @see EventListenerList
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
- */
- @Deprecated
- protected void fireToDoListChanged() {
- // Guaranteed to return a non-null array
- Object[] listeners = listenerList.getListenerList();
- ToDoListEvent e = null;
- // Process the listeners last to first, notifying
- // those that are interested in this event
- for (int i = listeners.length - 2; i >= 0; i -= 2) {
- if (listeners[i] == ToDoListListener.class) {
- // Lazily create the event:
- if (e == null) {
- e = new ToDoListEvent();
- }
- ((ToDoListListener) listeners[i + 1]).toDoListChanged(e);
- }
- }
- }
/**
* @param item the todo item
@@ -720,12 +681,8 @@
/**
* @param item the todo item
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
- * @Deprecated
*/
- protected void fireToDoItemAdded(ToDoItem item) {
+ private void fireToDoItemAdded(ToDoItem item) {
List<ToDoItem> l = new ArrayList<ToDoItem>();
l.add(item);
fireToDoItemsAdded(l);
@@ -733,12 +690,8 @@
/**
* @param theItems the todo items
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected void fireToDoItemsAdded(List<ToDoItem> theItems) {
+ private void fireToDoItemsAdded(List<ToDoItem> theItems) {
if (theItems.size() > 0) {
// Guaranteed to return a non-null array
final Object[] listeners = listenerList.getListenerList();
@@ -759,12 +712,8 @@
/**
* @param item the todo item
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected void fireToDoItemRemoved(ToDoItem item) {
+ private void fireToDoItemRemoved(ToDoItem item) {
List<ToDoItem> l = new ArrayList<ToDoItem>();
l.add(item);
fireToDoItemsRemoved(l);
@@ -772,12 +721,8 @@
/**
* @param theItems the todo items
- * @deprecated in 0.27.2 by Bob Tarling. ToDoList is not designed to be
- * extended so protected is not required. This method is not used with the
- * package so scope will become private in future.
*/
- @Deprecated
- protected void fireToDoItemsRemoved(final List<ToDoItem> theItems) {
+ private void fireToDoItemsRemoved(final List<ToDoItem> theItems) {
if (theItems.size() > 0) {
// Guaranteed to return a non-null array
final Object[] listeners = listenerList.getListenerList();
Modified: trunk/src/argouml-app/src/org/argouml/cognitive/checklist/CheckItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/checklist/CheckItem.java?view=diff&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/checklist/CheckItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/checklist/CheckItem.java 2009-04-04 22:39:22-0700
@@ -27,7 +27,6 @@
import java.io.Serializable;
import org.argouml.util.Predicate;
-import org.argouml.util.PredicateGefWrapper;
import org.argouml.util.PredicateTrue;
@@ -93,27 +92,6 @@
* @param d the description
* @param m the more-info-url
* @param p the predicate
- *
- * @deprecated for 0.26 by tfmorris. Use
- * {@link #CheckItem(String, String, String, Predicate)}.
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public CheckItem(String c, String d, String m,
- org.tigris.gef.util.Predicate p) {
- this(c, d);
- setMoreInfoURL(m);
- predicate = new PredicateGefWrapper(p);
- }
-
-
- /**
- * The constructor.
- *
- * @param c the category
- * @param d the description
- * @param m the more-info-url
- * @param p the predicate
*/
public CheckItem(String c, String d, String m,
Predicate p) {
@@ -160,20 +138,6 @@
public void setMoreInfoURL(String m) { moreInfoURL = m; }
/**
- * @return the GEF predicate
- * @deprecated for 0.26 by tfmorris. Use {@link #getPredicate2()}.
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public org.tigris.gef.util.Predicate getPredicate() {
- if (predicate instanceof PredicateGefWrapper) {
- return ((PredicateGefWrapper) predicate).getGefPredicate();
- }
- throw new IllegalStateException("Mixing legacy API and new API is not"
- + "supported. Please update your code.");
- }
-
- /**
* @return the predicate
*/
public Predicate getPredicate2() {
@@ -182,17 +146,6 @@
/**
* @param p the predicate
- * @deprecated for 0.27.3 by tfmorris. Use
- * {@link CheckItem#setPredicate(Predicate)}.
- */
- @SuppressWarnings("deprecation")
- @Deprecated
- public void setPredicate(org.tigris.gef.util.Predicate p) {
- predicate = new PredicateGefWrapper(p);
- }
-
- /**
- * @param p the predicate
*/
public void setPredicate(Predicate p) {
predicate = p;
Removed: trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList.java?view=markup&pathrev=17033
Modified: trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.java?view=diff&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/AbstractGoList2.java 2009-04-04 22:39:22-0700
@@ -37,8 +37,7 @@
* @author MarkusK
*
*/
-public abstract class AbstractGoList2 extends AbstractGoList implements
- TreeModel {
+public abstract class AbstractGoList2 implements TreeModel {
private Predicate listPredicate = PredicateTrue.getInstance();
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToDecisionsToItems.java 2009-04-04 22:39:22-0700
@@ -26,7 +26,6 @@
import java.util.ArrayList;
import java.util.List;
-import java.util.Vector;
import javax.swing.event.TreeModelListener;
import javax.swing.tree.TreePath;
@@ -41,7 +40,7 @@
* Rule for sorting the ToDo list: Decision -> Item.
*
*/
-public class GoListToDecisionsToItems extends AbstractGoList {
+public class GoListToDecisionsToItems extends AbstractGoList2 {
////////////////////////////////////////////////////////////////
// TreeModel implementation
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToGoalsToItems.java 2009-04-04 22:39:22-0700
@@ -40,7 +40,7 @@
* Rule for sorting the ToDo list: Goal -> Item.
*
*/
-public class GoListToGoalsToItems extends AbstractGoList {
+public class GoListToGoalsToItems extends AbstractGoList2 {
////////////////////////////////////////////////////////////////
// TreeModel implementation
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPosterToItem.java 2009-04-04 22:39:22-0700
@@ -43,7 +43,7 @@
* Rule for sorting the ToDo list: Poster -> Item.
*
*/
-public class GoListToPosterToItem extends AbstractGoList {
+public class GoListToPosterToItem extends AbstractGoList2 {
////////////////////////////////////////////////////////////////
// TreeModel implementation
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToPriorityToItem.java 2009-04-04 22:39:22-0700
@@ -38,7 +38,7 @@
* Rule for sorting the ToDo list: Priority -> Item.
*
*/
-public class GoListToPriorityToItem extends AbstractGoList {
+public class GoListToPriorityToItem extends AbstractGoList2 {
////////////////////////////////////////////////////////////////
// TreeModel implementation
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&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/cognitive/ui/GoListToTypeToItem.java 2009-04-04 22:39:22-0700
@@ -39,7 +39,7 @@
* Rule for sorting the ToDo list: Type -> Item.
*
*/
-public class GoListToTypeToItem extends AbstractGoList {
+public class GoListToTypeToItem extends AbstractGoList2 {
////////////////////////////////////////////////////////////////
// TreeModel implementation
Removed: trunk/src/argouml-app/src/org/argouml/uml/cognitive/ChildGenFind.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/ChildGenFind.java?view=markup&pathrev=17033
Modified: trunk/src/argouml-app/src/org/argouml/uml/cognitive/checklist/UMLCheckItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/src/org/argouml/uml/cognitive/checklist/UMLCheckItem.java?view=diff&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/src/org/argouml/uml/cognitive/checklist/UMLCheckItem.java (original)
+++ trunk/src/argouml-app/src/org/argouml/uml/cognitive/checklist/UMLCheckItem.java 2009-04-04 22:39:22-0700
@@ -57,21 +57,6 @@
* @param d the description
* @param m the more-info-url
* @param p the predicate
- * @deprecated for 0.27.3 by tfmorris. Use
- * {@link #UMLCheckItem(String, String, String, org.argouml.util.Predicate)}.
- */
- public UMLCheckItem(String c, String d, String m,
- org.tigris.gef.util.Predicate p) {
- super(c, d, m, p);
- }
-
- /**
- * The constructor.
- *
- * @param c the category
- * @param d the description
- * @param m the more-info-url
- * @param p the predicate
*/
public UMLCheckItem(String c, String d, String m,
org.argouml.util.Predicate p) {
Modified: trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java?view=diff&pathrev=17034&r1=17033&r2=17034
==============================================================================
--- trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java (original)
+++ trunk/src/argouml-app/tests/org/argouml/cognitive/TestToDoItem.java 2009-04-04 22:39:22-0700
@@ -75,15 +75,7 @@
headline += " - Set Test";
description += " - Set Test";
moreInfo += "/settest.htm";
-
- // update the properties of the ToDoItem
- // TODO: We are testing deprecated methods here that aren't actually used by
- // the application. Just remove this when removing deprecated methods.
- item.setHeadline(headline);
- item.setPriority(priority);
- item.setDescription(description);
- item.setMoreInfoURL(moreInfo);
-
+
// test that properties were correctly set by the setters
assertTrue(
"ToDoItem.getHeadline() incorrect after ToDoItem.setHeadline()",
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1548573
To unsubscribe from this discussion, e-mail: [[email protected]].