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 141266 - Command-Mouse should perform Reveal in Finder operation
Summary: Command-Mouse should perform Reveal in Finder operation
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: Macintosh All
: P3 blocker with 2 votes (vote)
Assignee: issues@platform
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-07-23 06:52 UTC by jrose
Modified: 2009-12-29 12:58 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jrose 2008-07-23 06:52:02 UTC
Most Mac applications have a "Reveal in Finder" or "Show in Finder" command, which asks the Finder to display the location of an application document 
by selecting it as a file in a Finder window.

This command is sometimes bound to Command-R, as in iTunes, or in Finder (where it works on symbolic links and aliases, under the name "Show 
Original".)  In many applications this function is available by selecting the document name (in the document window title) with the Command key held 
down.

Refs to Reveal/Show in Finder commands:
for any Cocoa app: http://www.macosxtips.co.uk/index_files/reveal-in-finder.html (These apps include XCode, TextEdit, and Safari.)
for file dialogs: http://www.macosxhints.com/article.php?story=20080417121431298
for SpotLight: http://www.macworld.com/article/53538/2006/10/www.idgconnect.com
for Dock: http://osxdaily.com/2007/04/24/immediately-show-a-dock-item-in-the-finder/
for IntelliJ: http://plugins.intellij.net/wishlist/item/?wid=19

When I hover the mouse over the title of an editor window, NetBeans will show me a tool tip with the full pathname of the underlying.  This is sometimes 
the only way to get this information, but it is frustrating, because there seems to be no way to copy the text or to open the file in an external tool (the 
Finder is usually the tool I want).

For files that are part of my project, this usually isn't an issue, but for files which are displayed as part of the system sources (e.g., HashMap.java), it is a 
real pain to go find them.  (At this point I sometimes go into Spotlight and then into XCode.)

Specific requests:
1. Add a Show in Finder command on the File menus.
2. Make Command-Mouse on the title of a file-based document pop up the list of containing folders, as in Cocoa applications.  Or (more simply) just 
make it display the full pathname, and offer to open it in the Finder.
Comment 1 Stanislav Aubrecht 2008-10-16 11:12:54 UTC
i have no idea how to implement this (short of some JNI), patches are welcome
Comment 2 cemerick 2009-12-29 12:58:16 UTC
It looks like an API for this is now available (in the most recent Java updates):

http://developer.apple.com/mac/library/releasenotes/CrossPlatform/JavaSnowLeopardUpdate1LeopardUpdate6RN/NewandNoteworthy/NewandNoteworthy.html

See the note about com.apple.eio.FileManager.revealinfinder(File).

Perhaps a corollary operation is possible under Windows as well?