Created attachment 111322 [details]
node shows all DBs/schemas
When creating a new database connection in NB for SQL server (and others), you specify what DB you want to connect to and what schema to use. However, when the connection node is open, you still have to find and open the previously-specified DB (true, it's in bold) and then find and open the previously-specified schema. This is a waste of time and clicks because 99% of the time you want the DB and schema when you created the connection, and a big waste of UI real-estate listing all those other DBs and schemas. See picture.
How about instead showing just the specified schema? So directly under the root node (research-dev in the picture), show the "Tables", "Views", and "Procedures" nodes which is all the user wants to see 99% of the time. In the root node's context menu, you can add a "Show All Databases/Schemas" button, which would revert to the current layout if needed.
This applies to other DB connection types as well. For example, with javaDB you almost never need to use all those system DBs so why show them?
I understand your point of view but it's right opposite of RFE show all available schemas which an db user is granted to select (I don't remember the number of that issue, but it was in plan for some previous release, reviewed by UI team that time and deliver in NB6.5 I guess. I was not a member of DB team that time so I don't know more details.). So I think it is a candidate for review UI again and should be tracked as RFE. Thanks for your feedback anyway.
Yup, I'm not saying that NB shouldn't show all available schemas and DBs--they should just be hidden by default, and shown through the context menu or something similar. That should make both camps happy.
*** Bug 179346 has been marked as a duplicate of this bug. ***
This needs to be configurable. There is the group that works regularly across different schemas and databases (count me to that group). This groups needs to see alls dbs and all schemas in these dbs. The other groups mostly/only works in one db in one schema - for these the information about the other databases/schemas on the server is useless.
Before now someone decides filtering is a good idea by default, keep in mind, that the second group can work with the current situation, while the first group can't work around a potentially filtered list.
Yup, I addressed that in comment #2--just hide them by default and expose them on demand. Another possibility is to just create a new connection for each schema you want to work with...
*** Bug 218135 has been marked as a duplicate of this bug. ***
*** Bug 219153 has been marked as a duplicate of this bug. ***
Summary from 219153: The schema list should be groupable.
Apparently the alternative "to just create a new connection for each
schema you want to work with" is not applicable to Oracle. Probably is neither applicable for other databases too.
*** Bug 64167 has been marked as a duplicate of this bug. ***
(In reply to comment #11)
> *** Bug 64167 has been marked as a duplicate of this bug. ***
Summary from #64167: Add ability to filter tablelist by regular expressions.
I can't believe this bug is still around. It's been ages since I reported what must have become a duplicate of this. Yes, it's a bug, not a RFE. If you select a certain schema as the one to use and then the software simply ignores that selection, that's a bug. And it never used to behave that way. It's all very well to come up with a new UI which lets you switch between
- show all
- show some (checkboxes? With 'All' and 'None' options? I think that's the only thing needed, how hard can it be?)
- filter (can't be the only way to show only 'the' selected scheme, it makes no sense to have to filter every time)
but until that's in place this is an ugly bug. So ugly in fact that folks simply stopped using NB for this purpose. I know I did and a lot of other people too. It takes me more effort to wade through the dozens of schemas every single time that I need one of them, than to fire up SQLDeveloper or something like that. Which I didn't do before, when the DB viewer in NB worked the way it is expected to work.
Sorry for the tone but this really bothers me. Even a single small note in the connection wizard explaining why this has been done would have been enough, but we've not even had that.
Created attachment 131431 [details]
Proposed Patch - not finished
What about adding node "Other schemas", plus some action to mark important schemas that should be displayed besides the default schema?
Created attachment 131432 [details]
Screenshot - DB Explorer with "Other schemas" node
Created attachment 131440 [details]
proposed patch v2 (based on 131431: Proposed Patch - not finished)
Sorry - could not resist :-) - the not finished part also applies here.
Changes I made:
1. Add same filtering ability to catalogs
2. Make sure the "Other schema/catalog" nodes are sorted last
3. Add ability to ToggleAction to work on multiple nodes
I tested with informix and metadata retrieval is dog slow. This motivated me to work on 3 - It should be considered not to invalidate the metadata, as it is not changed, but only the structural side.
Created attachment 131453 [details]
proposed patch v3 (based on 131431: Proposed Patch - not finished)
- Change name in DatabaseConnection from importantDatabases to importantCatalogs
- Use (Weak) PropertyChangeListener to rebuild the node tree (without refetching DB metadata)
- Switch to Sets to hold "important databases" and "important" schemas
Wow, great job, thank you very much!
Applied as http://hg.netbeans.org/core-main/rev/268ae2935a0a
Integrated into 'main-golden', will be available in build *201302182300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jaroslav Havlin <email@example.com>
Log: #202833: Add ability to filter the listed database/schemas in the Databases node
One corner case was forgotten: In org.netbeans.modules.db.explorer.action.ToggleImportantAction#enable. The Action Name is only set in the "enabled" case. This is visible after starting the IDE and selecting the main database entry. Please apply the following - it sets the action name to "Toggle important" if it is disabled:
--- Base (BASE)
+++ Locally Modified (Based On LOCAL)
@@ -95,6 +95,10 @@
+ actionDisplayName = actionDisplayName = NbBundle.getMessage(
+ "ToggleImportant"); //NOI18N
(In reply to comment #20)
> One corner case was forgotten: [...]
Thank you, Matthias.
Fixed in http://hg.netbeans.org/core-main/rev/239f5bc6a7dd
Matthias, have I mentioned recently that YOU'RE THE MAN? Outstanding!
(In reply to comment #22)
> Matthias, have I mentioned recently that YOU'RE THE MAN? Outstanding!
Absolutely agree, the big thank you, Matthias.
Integrated into 'main-golden', will be available in build *201302270948* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jaroslav Havlin <firstname.lastname@example.org>
Log: #202833: Set ToggleImportantAction name also if it is disabled
*** Bug 153622 has been marked as a duplicate of this bug. ***