This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 242384

Summary: Connection-List in SQL Editor is sorted different from nodes
Product: db Reporter: matthias42
Component: SQL EditorAssignee: Libor Fischmeistr <lfischmeistr>
Status: RESOLVED FIXED    
Severity: normal Keywords: PATCH_AVAILABLE
Priority: P3    
Version: 8.0   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description matthias42 2014-02-26 20:58:53 UTC
The connection nodes in the services windows are sorted case insensitive (ConnectionNodeProvider.ConnectionComparator), as is the connection list (DatabaseExplorerUIs.ConnectionComparator). In contrast to this the drop down list in the SQL editor toolbar is sorted case sensitive. This should be unified:

# This patch file was generated by NetBeans IDE
# It uses platform neutral UTF-8 encoding and \n newlines.
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -338,7 +338,7 @@
             Collections.sort(connectionList, new Comparator<DatabaseConnection>() {
                 @Override
                 public int compare(DatabaseConnection o1, DatabaseConnection o2) {
-                    return o1.getDisplayName().compareTo(o2.getDisplayName());
+                    return o1.getDisplayName().compareToIgnoreCase(o2.getDisplayName());
                 }
             });
         }
Comment 1 matthias42 2014-02-26 21:00:17 UTC
The change needs to be done in ConnectionAction.java:

ConnectionAction.DatabaseConnectionModel#sortConnections
Comment 2 Libor Fischmeistr 2014-02-27 09:46:04 UTC
Patch applied - http://hg.netbeans.org/core-main/rev/6be44d32c03d

Thank you Matthias
Comment 3 Quality Engineering 2014-02-28 02:35:08 UTC
Integrated into 'main-silver', will be available in build *201402280001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/6be44d32c03d
User: Libor Fischmeistr <lfischmeistr@netbeans.org>
Log: #242384: Connection-List in SQL Editor is sorted different from nodes