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 - Connection-List in SQL Editor is sorted different from nodes
Summary: Connection-List in SQL Editor is sorted different from nodes
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: SQL Editor (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal (vote)
Assignee: Libor Fischmeistr
URL:
Keywords: PATCH_AVAILABLE
Depends on:
Blocks:
 
Reported: 2014-02-26 20:58 UTC by matthias42
Modified: 2014-02-28 02:35 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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