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.

Bug 117948

Summary: ability to name SQL editor tabs
Product: db Reporter: athompson <athompson>
Component: CodeAssignee: Jiri Rechtacek <jrechtacek>
Status: VERIFIED FIXED    
Severity: blocker CC: romanmostyka
Priority: P3 Keywords: NETFIX, PATCH_AVAILABLE
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 152817    
Attachments: proposed patch v1

Description athompson 2007-10-05 19:08:09 UTC
there is currently no way to name SQL editor tabs; they are created with names like 'SQL Command 1'.  when working with
many SQL editor tabs, it would be far easier to keep track of what is in each one if the user could assign them more
descriptive names.
Comment 1 Jiri Rechtacek 2009-10-16 14:14:47 UTC
Reassigned to new owner.
Comment 2 Jiri Rechtacek 2009-10-23 09:00:30 UTC
*** Issue 169021 has been marked as a duplicate of this issue. ***
Comment 3 Jiri Rechtacek 2009-10-23 09:19:05 UTC
*** Issue 139057 has been marked as a duplicate of this issue. ***
Comment 4 athompson 2013-04-05 20:20:08 UTC
bump...
Comment 5 Jaroslav Havlin 2013-04-07 18:23:07 UTC
Names of SQL tabs have been modified recently, see bug 195880.
It's not exactly what you are requesting, but it could help a bit.
(Saving the tab to a file is not an option for you, I guess.)
Comment 6 athompson 2013-04-07 22:52:07 UTC
I didn't know the "save as" option was available; I'll try it. Ideally it would be nice to have something less permanent, but this would work fine if the default save directory were remembered independently of all other save dialogs (so that you could set it once and forget it). Is that doable?
Comment 7 Jaroslav Havlin 2013-04-11 06:18:04 UTC
(In reply to comment #6)
> [...] but this would work fine if the default save directory were remembered 
> independently of all other save dialogs (so that you could set it once and 
> forget it). Is that doable?
The save directory for SQL commands is not currently remembered independently. But as it is the only file type that I use outside of projects, it works quite fine for me. Please, try it and let us know whether this solution is fine to you.
Comment 8 matthias42 2013-05-18 22:29:59 UTC
Created attachment 134596 [details]
proposed patch v1

The proposed patch does two things:

1. Update editor tab name, when the name property of the underlying file changes
2. Add a TopComponent description to SQLClonableEditor

The first part addresses the issue presented here, as you can now open the properties window and change the "name". This in turn changes the title of the editor tab and accomplishes the reportes goal.

The second part is there because I was annoyed when testing. The icon of the SQL editor was only present, until I opened a second tab. Adding a TopComponent.Description fixed this.
Comment 9 Jaroslav Havlin 2013-05-20 15:40:52 UTC
Integrated as http://hg.netbeans.org/core-main/rev/fcc433ac1a03
Thank you for the patch, Matthias, very nice solution!
Comment 10 athompson 2013-05-21 21:28:36 UTC
Matthias, keep this up and Oracle will have to provide you with a cape.
Comment 11 Quality Engineering 2013-05-22 02:34:31 UTC
Integrated into 'main-golden', will be available in build *201305212300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/fcc433ac1a03
User: Jaroslav Havlin <jhavlin@netbeans.org>
Log: #117948: Ability to name SQL editor tabs
Comment 12 athompson 2013-05-22 12:22:56 UTC
Yup, both solutions combine nicely and are more than adequate. Thanks!