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 18856 - Add 'show in explorer' functionality to editor
Summary: Add 'show in explorer' functionality to editor
Status: VERIFIED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker with 1 vote (vote)
Assignee: issues@editor
URL:
Keywords:
: 6559 20643 26525 35652 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-12-20 10:42 UTC by kurti
Modified: 2007-11-05 13:42 UTC (History)
4 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
The simplest possible fix (1.37 KB, patch)
2003-11-20 16:09 UTC, Jaroslav Tulach
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description kurti 2001-12-20 10:42:16 UTC
When jumping around the code with Alt-O (Go to source), I sometimes don't know
where the file is in the explorer. I would like to have something like the 'show
in explorer' button of the results of 'search filesystem'. Clicking on it should
expand the filesystemtree and highlight the file that I am viewing in the editor.
Comment 1 Marek Grummich 2002-07-22 09:55:19 UTC
Set target milestone to TBD
Comment 2 Marek Grummich 2002-07-22 09:58:15 UTC
Set target milestone to TBD
Comment 3 Jaroslav Tulach 2003-11-20 16:09:45 UTC
Created attachment 12248 [details]
The simplest possible fix
Comment 4 David Simonek 2003-11-20 16:31:16 UTC
Yarda just showed me his fix working, and it's doing exactly what is
asked for, invoked by shortcut Ctrl+2 when you're in source editor.
One hint for Jano - discoverability of such shortcut is a problem,
solution would be to add this action into editor popup menu with title
"Show in Filesystems" or "Select in Filesystems". Into editor document
tab popup menu as well.
Comment 5 Dusan Balek 2003-11-24 14:51:47 UTC
There is the UI specification covering this feature available at: 
http://ui.netbeans.org/docs/ui/select_node_in_explorer/select_node_in_explorer.html

As there can be more explorer windows which provide for access to
files opened in editor (e.g. Filesystems, Projects, VCS Filesystems),
this specification introduces a dialog that allows users to select in
which of the available explorer windows the currently edited file
should be highlighted.

However, this dialog (displayed with each SelectDocumentNodeAction
invocation) represents a considerable overhead in the situation
when the Filesystems tab would be the user selected explorer window in
majority of SelectDocumentNodeAction invocations. Therefore, I would
prefer to modify the proposed UI and allow for direct access to the
SelectIn...Tab actions (without a dialog).

On the other hand, as Jano and Peter pointed out,
ViewFilesystemsTabAction has been designed to simply move focus to the
Filesystes explorer tab without changing any selection. Thus, its
modification proposed by Yarda could represent an unacceptable change
of user experience.

Based on these facts, an alternate proposal could be:
Leave ViewFilesystemsTabAction (Ctrl+2) for moving focus to the
Filesystems explorer tab as it works now and introduce a new action -
SelectInFilesystemsTabAction (Ctrl+Alt+2) which moves focus to the
Filesystems explorer tab and selects the currently edited file in it.
Similarly, leave ViewProjectsTabAction (Ctrl+3) for moving focus to
the Projects explorer tab as it works now and introduce a new action -
SelectInProjectsTabAction (Ctrl+Alt+3) which moves focus to the
Filesystems explorer tab and selects the currently edited file in it. 

To improve discoverability of these actions create a menu item titled
"Select Document Node >", collect all these SelectIn...TabActions in
its pull-right, and add this item into various menus as proposed by Dafe.
Comment 6 jrojcek 2003-11-24 16:37:40 UTC
I made the changes you proposed to the spec.

http://ui.netbeans.org/docs/ui/select_node_in_explorer/select_node_in_explorer.html

When you implement the shortcuts, please file an issues and assign to
me, as there will be some conflicts with debugger windows shortcuts. I
would recommend a new shortcuts for debugger windows. Thanks.
Comment 7 Jan Pokorsky 2003-11-26 15:22:35 UTC
Please be aware of other issues (#6559, #35652) dealing with the same
problem.
Comment 8 Dusan Balek 2003-11-27 10:20:32 UTC
*** Issue 35652 has been marked as a duplicate of this issue. ***
Comment 9 Dusan Balek 2003-11-27 10:45:40 UTC
*** Issue 6559 has been marked as a duplicate of this issue. ***
Comment 10 Dusan Balek 2003-11-27 10:47:00 UTC
Implemented as described in the new UI Spec.
Comment 11 Jaroslav Tulach 2003-11-27 11:38:50 UTC
Excelent and useful work. God bless you Dusan.
Comment 12 Jaroslav Tulach 2003-12-03 10:24:09 UTC
*** Issue 7551 has been marked as a duplicate of this issue. ***
Comment 13 Jaroslav Tulach 2003-12-03 10:26:08 UTC
*** Issue 20643 has been marked as a duplicate of this issue. ***
Comment 14 Jaroslav Tulach 2003-12-03 10:26:33 UTC
*** Issue 26525 has been marked as a duplicate of this issue. ***