In editors (Java editor, XML editor, text editor, ...) you also can execute StartExplorer actions, either on an empty text selection (that is, just right click anywhere in the editor window without selecting text first) or for a selected text region. StartExplorer offers the following options here:
These are the same options as for resource views like Navigator, Package Explorer or Project Explorer, just named a bit different.
The difference to the commands for resource is that these commands work based either on the file that is currently opened in the editor or based on the selected text region in the editor.
Actually, StartExplorer is a bit smarter when handling selected text regions
than the last paragraph may give the impression. If you try to open a file manager
for your selection it doesn't matter whether you selected a path denoting
a folder or a file. If the selected text region points to a file, the parent directory
of that file is shown in the file manager and the file is selected, just as you
would expect. Furthermore, if the path ends with an incomplete path segment, the last
segment is discarded.
Example: In your text file (or XML file or whatever) you have the path
C:\path\to\some\directory\file.xyz
. Now you select just
C:\path\to\some\dire
and start a file manager for that path.
The plug-in recognizes that C:\path\to\some\dire
is not a valid path
and tries the parent directory C:\path\to\some
. If this is a valid,
existing directory, a file manager window pops up showing C:\path\to\some
.
If you select "Start shell in this path" for
C:\path\to\some\directory\file.xyz
then the directory
C:\path\to\some\directory
will be shown.
The option "Copy resource path to clipboard" is always executed on the file currently opened in the editor, no matter if text is selected or not. That is, it always copies the path of the file you are working on to the clipboard.
The custom commands are completely configurable through the preference page, just as for the resource-based commands.