|
Lines 135-140
Link Here
|
| 135 |
|
135 |
|
| 136 |
public void stateChanged(ChangeEvent arg0) { |
136 |
public void stateChanged(ChangeEvent arg0) { |
| 137 |
boolean flag = isValid(true); |
137 |
boolean flag = isValid(true); |
|
|
138 |
validateName(); |
| 138 |
if (DriverDialog.this.mOKButton != null && !DriverDialog.this.mOKButton.isDisposed()) |
139 |
if (DriverDialog.this.mOKButton != null && !DriverDialog.this.mOKButton.isDisposed()) |
| 139 |
DriverDialog.this.mOKButton.setEnabled(flag); |
140 |
DriverDialog.this.mOKButton.setEnabled(flag); |
| 140 |
} |
141 |
} |
|
Lines 848-858
Link Here
|
| 848 |
throw e; |
849 |
throw e; |
| 849 |
} |
850 |
} |
| 850 |
|
851 |
|
| 851 |
if (this.mOKButton != null) |
852 |
if (this.mOKButton != null && !this.mOKButton.isDisposed()) |
| 852 |
this.mOKButton.setEnabled(flag); |
853 |
this.mOKButton.setEnabled(flag); |
| 853 |
} |
854 |
} |
| 854 |
else { |
855 |
else { |
| 855 |
if (this.mOKButton != null) |
856 |
if (this.mOKButton != null && !this.mOKButton.isDisposed()) |
| 856 |
this.mOKButton.setEnabled(false); |
857 |
this.mOKButton.setEnabled(false); |
| 857 |
return false; |
858 |
return false; |
| 858 |
} |
859 |
} |
|
Lines 1015-1021
Link Here
|
| 1015 |
// creating new driver, name matches existing driver |
1016 |
// creating new driver, name matches existing driver |
| 1016 |
String errorMessage = DriverMgmtMessages |
1017 |
String errorMessage = DriverMgmtMessages |
| 1017 |
.getString("NewDriverDialog.driverExistsWithName"); //$NON-NLS-1$ |
1018 |
.getString("NewDriverDialog.driverExistsWithName"); //$NON-NLS-1$ |
| 1018 |
this.setErrorMessage(errorMessage); |
1019 |
try { |
|
|
1020 |
this.setErrorMessage(errorMessage); |
| 1021 |
} catch (SWTException swt_e) { |
| 1022 |
// just in case the message widget is disposed, since we can't grab |
| 1023 |
// it directly |
| 1024 |
} |
| 1019 |
return; |
1025 |
return; |
| 1020 |
} |
1026 |
} |
| 1021 |
else { |
1027 |
else { |
|
Lines 1056-1062
Link Here
|
| 1056 |
isOk = isValid(true); |
1062 |
isOk = isValid(true); |
| 1057 |
} |
1063 |
} |
| 1058 |
|
1064 |
|
| 1059 |
if (this.mOKButton != null) |
1065 |
if (this.mOKButton != null && !this.mOKButton.isDisposed()) |
| 1060 |
this.mOKButton.setEnabled(isOk); |
1066 |
this.mOKButton.setEnabled(isOk); |
| 1061 |
} |
1067 |
} |
| 1062 |
|
1068 |
|
|
Lines 1376-1385
Link Here
|
| 1376 |
|
1382 |
|
| 1377 |
String propIdPrefix = DriverMgmtMessages |
1383 |
String propIdPrefix = DriverMgmtMessages |
| 1378 |
.getString("EditDriverDialog.text.id_prefix"); //$NON-NLS-1$ |
1384 |
.getString("EditDriverDialog.text.id_prefix"); //$NON-NLS-1$ |
| 1379 |
String propId = propIdPrefix + this.mDriverName; |
1385 |
String propId = propIdPrefix + this.descriptor.getId() + "." + this.mDriverName; //$NON-NLS-1$ |
|
|
1386 |
// String propId = propIdPrefix + this.mDriverName; |
| 1380 |
if (this.mPropertySet == null) { |
1387 |
if (this.mPropertySet == null) { |
| 1381 |
this.mPropertySet = new PropertySetImpl(propId, this.mDriverName); |
1388 |
this.mPropertySet = new PropertySetImpl(propId, this.mDriverName); |
| 1382 |
} |
1389 |
} |
|
|
1390 |
else { |
| 1391 |
this.mPropertySet.setID(propId); |
| 1392 |
} |
| 1383 |
this.mPropertySet.setName(this.mDriverName); |
1393 |
this.mPropertySet.setName(this.mDriverName); |
| 1384 |
Properties props = new Properties(); |
1394 |
Properties props = new Properties(); |
| 1385 |
props |
1395 |
props |