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.
The connection dialog is a modal dialog and is distracting. The DB explorer should allow background operation to connect to the db without this modal dialog. Or at least show the progress in the status bar. This is annoying in the case of code completion for database tables and column names in Hibernate module.
Probably would be nice to add a ConnectionManager.connect(DatabaseConnection) method.
This is really affecting the code completion in Hibernate plugin. First time when the user requests for code completion of database data (such as table names and column names), this dialog pops up and code completion dialog will even come up. Once this happens, the connection is established and hence forth the code completion works properly. I would like to prioritize this.
We should do this for 6.5
Please review this API change to add a new method to the ConnectionManager, connect(), which synchronously connects to the database without bringing up any UI. The attached patch includes the change as well as a new unit test that passes. Apologies for the spurious irrelevant diffs, I'm using hg queues and it seems to be doing something odd to the diffs.
Created attachment 63586 [details] Patch file for changes to API
One issue I found already is I didn't add the check to see if it's on the event thread. I've added this, but will await other comments before submitting a new patch.
This looks very good, this will be very useful not only to DataView but all the editors that we have SOA team. Thanks much. Check for event thread sounds OK to me, but can't we have this as guideline instead of enforcing it. May be log a warning, when the check fails... But I am OK either way.
Looks fine to me. Checking for event thread is needed.
Created attachment 63781 [details] This updated patch includes the check for running on the event thread
AB01: connect() should return false when not all credentials are present, instead of throwing an exception. You should not use exceptions for control flow, and also, the exception makes it difficult for the caller to distinguish between a real error and the credentials not being present.
http://hg.netbeans.org/main?cmd=changeset;node=f12f9b38fab2
Verified with build 080714.