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.
(this has been talked about -- often in terms of the editor tabs -- frequently, so I hope this is not a duplicate -- there is no bug listed in http://editor.netbeans.org/doc/Requirements.html) Navigating among open files using the editor tabs is painful if there are 7+-2 files opened. The jumplist can take some of the pain away, but it requires that an edit has been made, and it also doesn't feel quite as friendly (I'm pretty sure it doesn't use a stack, but uses a list instead). There is a need for quick open file navigation. One way to fix this is to provide a way to navigate without using the tabs, ideally by using only the keyboard so the user don't need to shift their focus from the code to navigation. IMO, the best way to do this is to provide a stack of the recently shown files (note: not edited files). I included a small patch that does this here: http://www.netbeans.org/servlets/ReadMsg?msgId=159061&listName=nbuihttp://www.netbeans.org/servlets/ReadMsg?msgId=159061&listName=nbui
Ideally, for this to work it needs some visual feedback (like what happens on windows when you hit Alt-Tab) and the filename tabs need to be removed (or maybe move to an alternate tab mechanism).
Also see http://www.netbeans.org/issues/show_bug.cgi?id=17829
Target milestone -> 3.3.1.
Hmmm... I'm not sure how this blocks issue 18257.
I don't think such a feature should be resolved by the editor... this seems like a window-system feature to me. Ideally (IMHO) one option for arranging the window system would be to discard all the extra GUI elements for tabs and so on and navigate among components with the keyboard, with some notion of last-opened, and with some navigation based on component name with completion. This would work for anything, not just editor tabs. Compare Emacs' C-x b.
Jesse -- I agree completely. Well, maybe not 100% completely, as I'd like to see what it feels like to navigate not only though editor files, but also though (in theory) less visited components. But it would be great to switch among recently used source files, form designer panels, XML trees, search results, etc... And anything would be better than hunting around the tabs for a source file!
I didn't mention that the mechanism I described originally is essentially what J++ (and other tools) does.
Set target milestone to TBD
Note that there is a description of an implementation for this at http://ui.netbeans.org/docs/ui/viewsSwitcher/viewsSwitcherUISpec.html.
Created attachment 8401 [details] source and jar for editornav prototype
Created attachment 8402 [details] just jar for editornav prototype
I attached a jar of something which switches between editor windows. To use, put the jar in the modules directory, restart, and then use Control-Shift-L to popup the editor navigation window. Further uses of Control-Shift-L will push you down the stack, Control-L will pull you up the stack. Return opens the currently selected editor. Normal keystrokes (arrow keys) should work too. There is at least one bug: for some reasons Filesystems shows up as an editor. This probably belongs in the accelerators module, not standalone.
Another shot at this... with some fixes based on a suggestion from Milos Kleint... this lists though all editor windows. Anyway, there is another bug, if an editor window isn't opened yet (can happen after IDE start) it doesn't jump to it. But it will the next time.
Created attachment 8406 [details] binary and source for quick nav editor module prototype
Created attachment 8407 [details] bugfix for quick open file nav prototype
I just noticed that #2 was adding a few too many listeners... here's a fix. I think I found the problem with refusing to jump to windows. It appears some keystrokes "leak" between the dialog and main window. The keystoke is delivered to the previous editor window. A workaround might be to invokeLater, but I haven't tried that yet.
You do know about Alt-Left and Alt-Right, right? Just checking...
re: alt-left, alt-right. Yup, I've used them for about 2 years or so. But, they don't really provide _quick_ open file navigation, only open file navigation. With this mechanism, there is a stack of recently viewed editor windows. To jump between two editor windows, I just need to hit one keystroke. I don't need to know the name of the files or alt-right/left multiple times to jump to a target editor window.
Created attachment 9233 [details] quick editor navigation, working better
I updated my prototype. Now opening windows works (turned out almost everything needed to be done on the AWT thread). I also switched the keyboard accellerator to ctrl-i and ctrl-shift-i.
Created attachment 9336 [details] more bugs fixed, new dialog for closing editor windows
Created attachment 9419 [details] more fixed bugs
I'm pretty sure this can be closed now due to the new winsys.
Right, I'm presuming that the Ctrl-` shortcut basically fulfills what you were asking for. If you think its functionality should be tweaked a bit in some way, it would probably be better to open a fresh enhancement request in "core"/"window system" with a precise description of what you expect, since otherwise the long history of this issue is liable to be more confusing than helpful.