Using JDBCDriverManager.getDefault().showAddDriverDialog(), one can register a non-existent driver into the IDE.
But this method call do not have any kind of feedback as to whether the operation was successful and a new driver is
registered into the IDE or not.
The work around is to call JDBCDriver drivers = JDBCDriverManager.getDefault().getDrivers(driverClassName) and check
the array size and if this is still zero, display the add driver dialog again (possibly in a loop). This is annoying.
Probably a method like
needs to be provided which can only be called in the event dispatching thread and can return the new driver. Similar to
I know this is frustrating, but it's not a defect, it really is an enhancement request. I like Andrei's suggestion.
Let's do this, it shouldn't be hard at all, and will provide a real benefit.
Created attachment 63625 [details]
Patch for proposed change
Please review patch for proposed change.
I tested this manually and it works as desired.
Patch looks good to me.
API looks fine.
Ready for integration
Verified with build 080714.