Author: tfmorris Date: 2008-03-27 23:33:46-0700 New Revision: 14244 Modified: trunk/src/app/src/org/argouml/ui/TabResults.java trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java trunk/src/app/tests/org/argouml/cognitive/TestGoal.java trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java
Log: Style cleanup Modified: trunk/src/app/src/org/argouml/ui/TabResults.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/ui/TabResults.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/ui/TabResults.java&p2=trunk/src/app/src/org/argouml/ui/TabResults.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/ui/TabResults.java (original) +++ trunk/src/app/src/org/argouml/ui/TabResults.java 2008-03-27 23:33:46-0700 @@ -286,7 +286,7 @@ return; } sel = results.get(row); - d = (Diagram) diagrams.get(row); + d = diagrams.get(row); } else if (src == relatedTable) { int row = relatedTable.getSelectionModel().getMinSelectionIndex(); if (row < 0) { Modified: trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java&p2=trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java (original) +++ trunk/src/app/src/org/argouml/ui/ZoomSliderButton.java 2008-03-27 23:33:46-0700 @@ -195,6 +195,7 @@ } }); currentValue.addFocusListener(new FocusAdapter() { + @Override public void focusLost(FocusEvent e) { handleTextEntry(); } @@ -215,6 +216,7 @@ /** * Update the slider value every time the popup is shown. */ + @Override protected void showPopup() { if (slider == null) { createPopupComponent(); @@ -311,13 +313,14 @@ public void popupMenuWillBecomeVisible(PopupMenuEvent e) { } - }; + } private class MyMouseListener extends MouseInputAdapter { /** * Keeps track of mouseover status. */ + @Override public void mouseEntered(MouseEvent me) { mouseIsOverPopupButton = true; } @@ -325,6 +328,7 @@ /** * Keeps track of mouseover status, and renables button if necessary. */ + @Override public void mouseExited(MouseEvent me) { mouseIsOverPopupButton = false; if (!popupButtonIsActive && !popupMenuIsShowing) @@ -337,6 +341,7 @@ * Catch the down stroke of mouse click to make the popup appear a tiny * bit earlier. */ + @Override public void mousePressed(MouseEvent me) { if (popupButtonIsActive) { showPopup(); Modified: trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java&p2=trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java (original) +++ trunk/src/app/src/org/argouml/ui/cmd/ShortcutMgr.java 2008-03-27 23:33:46-0700 @@ -64,7 +64,6 @@ import org.argouml.uml.ui.ActionRevertToSaved; import org.argouml.uml.ui.ActionSaveAllGraphics; import org.argouml.uml.ui.ActionSaveGraphics; -import org.argouml.uml.ui.ActionSaveProject; import org.argouml.uml.ui.ActionSaveProjectAs; import org.argouml.uml.ui.ActionSequenceDiagram; import org.argouml.uml.ui.ActionStateDiagram; Modified: trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java&p2=trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java (original) +++ trunk/src/app/src/org/argouml/ui/explorer/rules/GoSummaryToOutgoingDependency.java 2008-03-27 23:33:46-0700 @@ -29,7 +29,6 @@ import java.util.Collections; import java.util.HashSet; import java.util.Iterator; -import java.util.List; import java.util.Set; import org.argouml.i18n.Translator; Modified: trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java&p2=trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/deployment/ui/AbstractFigComponent.java 2008-03-27 23:33:46-0700 @@ -186,38 +186,38 @@ @Override protected void setStandardBounds(int x, int y, int w, int h) { - if (getNameFig() == null) { - return; - } - - Rectangle oldBounds = getBounds(); - getBigPort().setBounds(x + BX, y, w - BX, h); - cover.setBounds(x + BX, y, w - BX, h); - - Dimension stereoDim = getStereotypeFig().getMinimumSize(); - Dimension nameDim = getNameFig().getMinimumSize(); - - int halfHeight = FINGER_HEIGHT / 2; - upperRect.setBounds(x, y + h / 3 - halfHeight, FINGER_WIDTH, - FINGER_HEIGHT); - lowerRect.setBounds(x, y + 2 * h / 3 - halfHeight, FINGER_WIDTH, - FINGER_HEIGHT); - - getStereotypeFig().setBounds(x + FINGER_WIDTH + 1, - y + 1, - w - FINGER_WIDTH - 2, - stereoDim.height); - getNameFig().setBounds(x + FINGER_WIDTH + 1, - y + stereoDim.height - OVERLAP + 1, - w - FINGER_WIDTH - 2, - nameDim.height); - _x = x; - _y = y; - _w = w; - _h = h; - firePropChange("bounds", oldBounds, getBounds()); - updateEdges(); - } + if (getNameFig() == null) { + return; + } + + Rectangle oldBounds = getBounds(); + getBigPort().setBounds(x + BX, y, w - BX, h); + cover.setBounds(x + BX, y, w - BX, h); + + Dimension stereoDim = getStereotypeFig().getMinimumSize(); + Dimension nameDim = getNameFig().getMinimumSize(); + + int halfHeight = FINGER_HEIGHT / 2; + upperRect.setBounds(x, y + h / 3 - halfHeight, FINGER_WIDTH, + FINGER_HEIGHT); + lowerRect.setBounds(x, y + 2 * h / 3 - halfHeight, FINGER_WIDTH, + FINGER_HEIGHT); + + getStereotypeFig().setBounds(x + FINGER_WIDTH + 1, + y + 1, + w - FINGER_WIDTH - 2, + stereoDim.height); + getNameFig().setBounds(x + FINGER_WIDTH + 1, + y + stereoDim.height - OVERLAP + 1, + w - FINGER_WIDTH - 2, + nameDim.height); + _x = x; + _y = y; + _w = w; + _h = h; + firePropChange("bounds", oldBounds, getBounds()); + updateEdges(); + } @Override public void setEnclosingFig(Fig encloser) { Modified: trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java&p2=trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/sequence/ui/UMLSequenceDiagram.java 2008-03-27 23:33:46-0700 @@ -26,7 +26,6 @@ import java.beans.PropertyVetoException; import java.util.Collection; -import java.util.HashSet; import java.util.Hashtable; import org.argouml.i18n.Translator; Modified: trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java&p2=trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/ui/ActionAddConcurrentRegion.java 2008-03-27 23:33:46-0700 @@ -114,7 +114,7 @@ Fig encloser = null; encloser = f; if (!(gm instanceof MutableGraphModel)) { - return; + return; } StateDiagramGraphModel mgm = (StateDiagramGraphModel) gm; Modified: trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java&p2=trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/ui/ArgoFigGroup.java 2008-03-27 23:33:46-0700 @@ -27,13 +27,6 @@ import java.util.List; import org.argouml.kernel.Project; -import org.argouml.kernel.ProjectManager; -import org.argouml.uml.diagram.UMLMutableGraphSupport; -import org.tigris.gef.base.Editor; -import org.tigris.gef.base.Globals; -import org.tigris.gef.base.Layer; -import org.tigris.gef.base.LayerPerspective; -import org.tigris.gef.graph.GraphModel; import org.tigris.gef.presentation.FigGroup; /** Modified: trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java&p2=trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java (original) +++ trunk/src/app/src/org/argouml/uml/diagram/ui/TabDiagram.java 2008-03-27 23:33:46-0700 @@ -33,7 +33,6 @@ import java.beans.PropertyChangeListener; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.List; import java.util.Vector; @@ -289,8 +288,8 @@ // Optimize for the normal case to minimize target changes TargetManager.getInstance().setTarget(addedTargets.get(0)); } else { - for (Object o : removedTargets) { - TargetManager.getInstance().removeTarget(o); + for (Object o : removedTargets) { + TargetManager.getInstance().removeTarget(o); } for (Object o : addedTargets) { TargetManager.getInstance().addTarget(o); Modified: trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java&p2=trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java (original) +++ trunk/src/app/src/org/argouml/uml/ui/UMLAddDialog.java 2008-03-27 23:33:46-0700 @@ -302,9 +302,8 @@ /** * Utility method to construct a DefaultListModel from a List - * - * @param vec - * the given list + * + * @param list the given list * @return DefaultListModel */ protected DefaultListModel constructListModel(List list) { @@ -368,8 +367,9 @@ * Returns the choices a user can make. * * @return Vector - * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] #getSelectedChoicesList()}. + * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] #getSelectedChoicesList()} */ + @Deprecated public Vector getChoices() { Vector result = new Vector(); getChoicesListInternal(result); @@ -398,8 +398,9 @@ * Returns the selected elements in the selected list * * @return Vector - * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] #getSelectedChoicesList()}. + * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] #getSelectedChoicesList()} */ + @Deprecated public Vector getSelectedChoices() { Vector result = new Vector(); getSelectedChoicesInternal(result); @@ -422,6 +423,7 @@ * @return Vector * @deprecated for 0.25.4 by tfmorris. Use [EMAIL PROTECTED] #getSelectedList()}. */ + @Deprecated public Vector getSelected() { // TODO: Because we return our internal data directly, we can't copy // it from a List to a Vector and keep the same semantics Modified: trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java&p2=trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java (original) +++ trunk/src/app/src/org/argouml/uml/ui/behavior/collaborations/PropPanelInteraction.java 2008-03-27 23:33:46-0700 @@ -32,7 +32,6 @@ import org.argouml.uml.ui.UMLLinkedList; import org.argouml.uml.ui.foundation.core.PropPanelModelElement; import org.argouml.uml.ui.foundation.extension_mechanisms.ActionNewStereotype; -import org.argouml.util.ConfigLoader; /** * Proppanel for interactions. Modified: trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java?view=diff&rev=14244&p1=trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java&p2=trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java (original) +++ trunk/src/app/src/org/argouml/uml/ui/foundation/extension_mechanisms/PropPanelTagDefinition.java 2008-03-27 23:33:46-0700 @@ -51,7 +51,6 @@ import org.argouml.uml.ui.UMLSearchableComboBox; import org.argouml.uml.ui.foundation.core.PropPanelModelElement; import org.argouml.uml.ui.foundation.core.UMLModelElementNamespaceComboBoxModel; -import org.argouml.uml.ui.foundation.core.UMLStructuralFeatureTypeComboBoxModel; import org.tigris.gef.undo.UndoableAction; /** Modified: trunk/src/app/tests/org/argouml/cognitive/TestGoal.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/cognitive/TestGoal.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/cognitive/TestGoal.java&p2=trunk/src/app/tests/org/argouml/cognitive/TestGoal.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/cognitive/TestGoal.java (original) +++ trunk/src/app/tests/org/argouml/cognitive/TestGoal.java 2008-03-27 23:33:46-0700 @@ -65,17 +65,18 @@ assertTrue("GoalModel not initilized with UnspecifiedGoal", goalModel.hasGoal(unspecifiedGoal.getName())); - // update the priority of the unspecified goal so we can verify it was updated - goalModel.setGoalPriority(unspecifiedGoal.getName(), - unspecifiedGoal.getPriority()+1); + // change priority of unspecified goal so we can verify it was updated + goalModel.setGoalPriority(unspecifiedGoal.getName(), unspecifiedGoal + .getPriority() + 1); // first verify that the set goal priority did not add an extra goal assertTrue("GoalModel.setGoalPriority added an extra Goal", goalModel.getGoalList().size() == 1); - // check that the model correctly updates a goals priority - assertTrue("GoalModel not correctly updating goal priority", - goalModel.getGoalList().get(0).getPriority() == unspecifiedGoal.getPriority()+1); + // check that the model correctly updates a goal's priority + assertTrue("GoalModel not correctly updating goal priority", goalModel + .getGoalList().get(0).getPriority() == unspecifiedGoal + .getPriority() + 1); // test the removal of a goal goalModel.removeGoal(unspecifiedGoal); @@ -84,8 +85,8 @@ assertTrue("GoalModel.removeGoal(goalName) failed", goalModel.getGoalList().size() == 0); - // start desiring a goal which should add a goal and bump the size to one - goalModel.startDesiring(unspecifiedGoal.getName()); + // start desiring a goal which should add a goal and bump the size to 1 + goalModel.startDesiring(unspecifiedGoal.getName()); // number of goals should now be 1 assertTrue("GoalModel.startDesiring did not add a Goal", Modified: trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java&p2=trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java (original) +++ trunk/src/app/tests/org/argouml/cognitive/TestStandardCM.java 2008-03-27 23:33:46-0700 @@ -85,16 +85,16 @@ critic.snooze(); // verify isRelevant returns true - assertTrue("NotSnoozedCM.isRelevant(Critic, Designer) is incorrect " + - "when critic snoozed", + assertTrue("NotSnoozedCM.isRelevant(Critic, Designer) is incorrect " + + "when critic snoozed", !cm.isRelevant(critic, Designer.theDesigner())); // unsnooze the critic to verify the critic is not relevant critic.unsnooze(); // verify isRelevant is true - assertTrue("NotSnoozedCM.isRelevant(Critic, Designer) is incorrect " + - "when critic not snoozed", + assertTrue("NotSnoozedCM.isRelevant(Critic, Designer) is incorrect " + + "when critic not snoozed", cm.isRelevant(critic, Designer.theDesigner())); } @@ -107,8 +107,8 @@ DesignGoalsCM cm = new DesignGoalsCM(); // DesignGoalsCM checks if the critic isRelevantToGoals of the Designer - // this value is always true for the Critic base class so DesignerGoalsCM - // should always return true in this condition + // this value is always true for the Critic base class so + // DesignerGoal should always return true in this condition assertTrue("DesignGoalsCM.isRelevant(Critic, Designer) is incorrect", cm.isRelevant(critic, Designer.theDesigner())); } @@ -125,8 +125,8 @@ // any decisions that have a priority > 0 and less than the // priority of the critic. By default the critic has no // decisions so isRelevant should return false. - assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is incorrect " + - "when critic has 0 decisions", + assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is incorrect " + + "when critic has 0 decisions", !cm.isRelevant(critic, Designer.theDesigner())); // add a decision but set the critic priority to 0 so isRelevant @@ -135,22 +135,25 @@ critic.addSupportedDecision(Decision.UNSPEC); // verify isRelevant is still false - assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is " + - "incorrect with one decision and critic has priority 0", - !cm.isRelevant(critic, Designer.theDesigner())); - - // update the priority of the critic to be the same priority as the decision - critic.setPriority(Decision.UNSPEC.getPriority()); - - // isRelevant should now be true - assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is incorrect with " + - "one decision and priority has equal priority", - cm.isRelevant(critic, Designer.theDesigner())); - - critic.setPriority(Decision.UNSPEC.getPriority()+1); - // isRelevant should still be true - assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is incorrect with one " + - "decision and priority has greater priority", - cm.isRelevant(critic, Designer.theDesigner())); + assertTrue("CurDecisionCM.isRelevant(Critic, Designer) is " + + "incorrect with one decision and critic has priority 0", + !cm.isRelevant(critic, Designer.theDesigner())); + + // update the priority of the critic to be the same priority as the + // decision + critic.setPriority(Decision.UNSPEC.getPriority()); + + // isRelevant should now be true + assertTrue( + "CurDecisionCM.isRelevant(Critic, Designer) is incorrect with " + + "one decision and priority has equal priority", + cm.isRelevant(critic, Designer.theDesigner())); + + critic.setPriority(Decision.UNSPEC.getPriority() + 1); + // isRelevant should still be true + assertTrue( + "CurDecisionCM.isRelevant(Critic, Designer) is incorrect with" + + " one decision and priority has greater priority", + cm.isRelevant(critic, Designer.theDesigner())); } - } +} Modified: trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java&p2=trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java (original) +++ trunk/src/app/tests/org/argouml/cognitive/TestToDoItem.java 2008-03-27 23:33:46-0700 @@ -26,10 +26,6 @@ import junit.framework.TestCase; - -import org.argouml.cognitive.ToDoItem; -import org.argouml.cognitive.Critic; - /** * Testing the creation of a ToDoItem. */ @@ -57,19 +53,22 @@ critic.setHeadline(headline); // initialize new ToDoItem - ToDoItem item = new ToDoItem(critic, headline, priority, description, moreInfo); - + ToDoItem item = new ToDoItem(critic, headline, priority, description, + moreInfo); + // test that properties were correctly initialized by the constructor - assertTrue("ToDoItem.getHeadline() incorrect after initialized constructor", - headline == item.getHeadline()); - assertTrue("ToDoItem.getDescription() incorrect after initialized by constructor", - description == item.getDescription()); - assertTrue("ToDoItem.getPriority() incorrect after initialized by constructor", - priority == item.getPriority()); - assertTrue("ToDoItem.getMoreInfoURL() incorrect after initialized by constructor", - moreInfo == item.getMoreInfoURL()); - assertTrue("((Critic)ToDoItem.getPoster()).getHeadline() incorrect after initialized by constructor", - headline == ((Critic)item.getPoster()).getHeadline()); + assertTrue("ToDoItem.getHeadline() incorrect after initialized" + + " constructor", headline == item.getHeadline()); + assertTrue("ToDoItem.getDescription() incorrect after initialized by" + + " constructor", description == item.getDescription()); + assertTrue("ToDoItem.getPriority() incorrect after initialized by" + + " constructor", priority == item.getPriority()); + assertTrue("ToDoItem.getMoreInfoURL() incorrect after initialized by" + + " constructor", moreInfo == item.getMoreInfoURL()); + assertTrue( + "((Critic)ToDoItem.getPoster()).getHeadline() incorrect after " + + "initialized by constructor", + headline == ((Critic) item.getPoster()).getHeadline()); // reset the values to a different value priority = ToDoItem.LOW_PRIORITY; @@ -84,13 +83,19 @@ item.setMoreInfoURL(moreInfo); // test that properties were correctly set by the setters - assertTrue("ToDoItem.getHeadline() incorrect after ToDoItem.setHeadline()", - headline == item.getHeadline()); - assertTrue("ToDoItem.getDescription() incorrect after ToDoItem.setDescription()", - description == item.getDescription()); - assertTrue("ToDoItem.getPriority() incorrect after ToDoItem.setPriority()", - priority == item.getPriority()); - assertTrue("ToDoItem.getMoreInfoURL() incorrect after ToDoItem.setMoreInfoURL()", - moreInfo == item.getMoreInfoURL()); + assertTrue( + "ToDoItem.getHeadline() incorrect after ToDoItem.setHeadline()", + headline == item.getHeadline()); + assertTrue( + "ToDoItem.getDescription() incorrect after " + + "ToDoItem.setDescription()", + description == item.getDescription()); + assertTrue( + "ToDoItem.getPriority() incorrect after ToDoItem.setPriority()", + priority == item.getPriority()); + assertTrue( + "ToDoItem.getMoreInfoURL() incorrect after " + + "ToDoItem.setMoreInfoURL()", + moreInfo == item.getMoreInfoURL()); } } Modified: trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java&p2=trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java (original) +++ trunk/src/app/tests/org/argouml/notation/providers/uml/TestCallStateNotationUml.java 2008-03-27 23:33:46-0700 @@ -169,9 +169,10 @@ Object op = Model.getFacade().getOperation(entry); assertNotNull("Operation not linked to entry action", op); String name = Model.getFacade().getName(op); - assertEquals("Operation name incorrect" ,"myOperB", name); + assertEquals("Operation name incorrect", "myOperB", name); String notationStr = notation.toString(aCallState, null); - assertEquals("Notation not correctly generated", "myOperB\n(ClassB)", notationStr); + assertEquals("Notation not correctly generated", "myOperB\n(ClassB)", + notationStr); } /** Modified: trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java&p2=trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java (original) +++ trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyAssoc.java 2008-03-27 23:33:46-0700 @@ -28,7 +28,7 @@ public class TestCrTooManyAssoc extends AbstractTestCrTooMany { - Object dm2; + private Object dm2; public TestCrTooManyAssoc(String arg0) { super(arg0); Modified: trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java?view=diff&rev=14244&p1=trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java&p2=trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java&r1=14243&r2=14244 ============================================================================== --- trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java (original) +++ trunk/src/app/tests/org/argouml/uml/cognitive/critics/TestCrTooManyTransitions.java 2008-03-27 23:33:46-0700 @@ -28,7 +28,7 @@ public class TestCrTooManyTransitions extends AbstractTestCrTooMany { - Object dm2; + private Object dm2; public TestCrTooManyTransitions(String arg0) { super(arg0); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
