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.

View | Details | Raw Unified | Return to bug 121186
Collapse All | Expand All

(-)db/src/org/netbeans/api/db/explorer/node/Bundle.properties (-2 / +4 lines)
Lines 48-55 Link Here
48
DatabaseURL=Database URL
48
DatabaseURL=Database URL
49
DatabaseURLDescription=URL of connected database
49
DatabaseURLDescription=URL of connected database
50
DriverFiles=Driver File(s)
50
DriverFiles=Driver File(s)
51
DriverURL=Driver
51
DriverURL=Driver class
52
DriverURLDescription=Database driver
52
DriverURLDescription=Database driver class
53
NBDriver=Driver
54
NBDriverDescription=Driver
53
DatabasePrefix=Database URL prefix
55
DatabasePrefix=Database URL prefix
54
DatabasePrefixDescription=Template for URL of database connection (for convenience)
56
DatabasePrefixDescription=Template for URL of database connection (for convenience)
55
User=User
57
User=User
(-)db/src/org/netbeans/modules/db/explorer/DatabaseConnection.java (-9 / +6 lines)
Lines 1061-1076 Link Here
1061
    public boolean equals(Object obj) {
1061
    public boolean equals(Object obj) {
1062
        if (obj instanceof DatabaseConnection) {
1062
        if (obj instanceof DatabaseConnection) {
1063
            DatabaseConnection conn = (DatabaseConnection) obj;
1063
            DatabaseConnection conn = (DatabaseConnection) obj;
1064
            if (toString().equals(conn.toString())) {
1064
            return Objects.equals(drv, conn.drv)
1065
                if ((connectionProperties == null
1065
                    && Objects.equals(drvname, conn.drvname)
1066
                        && conn.getConnectionProperties() == null)) {
1066
                    && Objects.equals(db, conn.db)
1067
                    return true;
1067
                    && Objects.equals(usr, conn.usr)
1068
                } else if (connectionProperties != null) {
1068
                    && Objects.equals(getSchema(), conn.getSchema())
1069
                    return connectionProperties.equals(
1069
                    && Objects.equals(getConnectionProperties(), conn.getConnectionProperties());
1070
                            conn.getConnectionProperties());
1071
        }
1070
        }
1072
            }
1073
        }
1074
1071
1075
        return false;
1072
        return false;
1076
    }
1073
    }
(-)db/src/org/netbeans/modules/db/explorer/node/ConnectionNode.java (-2 / +7 lines)
Lines 92-97 Link Here
92
    private static final String USESCROLLABLECURSORS = "UseScrollableCursors"; //NOI18N
92
    private static final String USESCROLLABLECURSORS = "UseScrollableCursors"; //NOI18N
93
    private static final String USESCROLLABLECURSORSDESC = "UseScrollableCursorsDescription"; //NOI18N
93
    private static final String USESCROLLABLECURSORSDESC = "UseScrollableCursorsDescription"; //NOI18N
94
    private static final String FOLDER = "Connection"; // NOI18N
94
    private static final String FOLDER = "Connection"; // NOI18N
95
    private static final String NBDRIVER = "NBDriver"; // NOI18N
96
    private static final String NBDRIVERDESC = "NBDriverDescription"; // NOI18N
95
    private static final RequestProcessor RP = new RequestProcessor(ConnectionNode.class.getName());
97
    private static final RequestProcessor RP = new RequestProcessor(ConnectionNode.class.getName());
96
    
98
    
97
    /** 
99
    /** 
Lines 153-158 Link Here
153
            refreshNode = false;
155
            refreshNode = false;
154
        } else if (nps.getName().equals(DATABASEURL)) {
156
        } else if (nps.getName().equals(DATABASEURL)) {
155
            connection.setDatabase(val.toString());
157
            connection.setDatabase(val.toString());
158
        } else if (nps.getName().equals(NBDRIVER)) {
159
            connection.setDriverName(val.toString());
156
        } else if (nps.getName().equals(DRIVER)) {
160
        } else if (nps.getName().equals(DRIVER)) {
157
            connection.setDriver(val.toString());
161
            connection.setDriver(val.toString());
158
        } else if (nps.getName().equals(SCHEMA)) {
162
        } else if (nps.getName().equals(SCHEMA)) {
Lines 197-202 Link Here
197
201
198
            addProperty(DISPLAYNAME, DISPLAYNAMEDESC, String.class, true, connection.getDisplayName());
202
            addProperty(DISPLAYNAME, DISPLAYNAMEDESC, String.class, true, connection.getDisplayName());
199
            addProperty(DATABASEURL, DATABASEURLDESC, String.class, !connected, connection.getDatabase());
203
            addProperty(DATABASEURL, DATABASEURLDESC, String.class, !connected, connection.getDatabase());
204
            addProperty(NBDRIVER, NBDRIVERDESC, String.class, !connected, connection.getDriverName());
200
            addProperty(DRIVER, DRIVERDESC, String.class, !connected, connection.getDriver());
205
            addProperty(DRIVER, DRIVERDESC, String.class, !connected, connection.getDriver());
201
            addProperty(SCHEMA, SCHEMADESC, String.class, !connected, connection.getSchema());
206
            addProperty(SCHEMA, SCHEMADESC, String.class, !connected, connection.getSchema());
202
            addProperty(USER, USERDESC, String.class, !connected, connection.getUser());
207
            addProperty(USER, USERDESC, String.class, !connected, connection.getUser());
Lines 404-416 Link Here
404
    
409
    
405
    @Override
410
    @Override
406
    public String getName() {
411
    public String getName() {
407
        return connection.getDisplayName();
412
        return connection.getName();
408
    }
413
    }
409
414
410
    @Override
415
    @Override
411
    public void setName(String name) {
416
    public void setName(String name) {
412
        String old = getName();
417
        String old = getName();
413
        connection.setDisplayName(name);
418
        connection.setName(name);
414
        fireNameChange(old, name);
419
        fireNameChange(old, name);
415
    }
420
    }
416
421

Return to bug 121186