svn commit: r13759 - trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: tfmorris
Date: 2007-11-11 16:47:31-0800
New Revision: 13759
Modified:
trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
Log:
Issue 4760 - Don't eliminate candidates based on same name. More work required
Modified: trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java?view=diff&rev=13759&p1=trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java&p2=trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java&r1=13758&r2=13759
==============================================================================
--- trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java (original)
+++ trunk/src_new/org/argouml/uml/ui/foundation/extension_mechanisms/UMLTagDefinitionComboBoxModel.java 2007-11-11 16:47:31-0800
@@ -1,5 +1,5 @@
// $Id$
-// Copyright (c) 2005-2006 The Regents of the University of California. All
+// Copyright (c) 2005-2007 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
@@ -101,8 +101,13 @@
String name2 = Model.getFacade().getName(o2);
name1 = (name1 != null ? name1 : "");
name2 = (name2 != null ? name2 : "");
-
- return name1.compareTo(name2);
+ int result = name1.compareTo(name2);
+ if (result == 0) {
+ // Never eliminate anything
+ return 1;
+ } else {
+ return result;
+ }
} catch (Exception e) {
throw new ClassCastException(e.getMessage());
}