I am looking for a good plugin showing Windows Explorer context menu directly from editor window in Eclipse. Does anybody know such plugin?
I'm a little late to the game with this answer, however since I found this article when trying to find a solution to this i'll post it here. There's an answer over at http://www.eclipsezone.com/eclipse/forums/t77655.html that solves this simply.
under Window -> External Tools -> External Tools Configuration
(1) Create a new Program (select Program in the tree)
(2) name it shell (or whatever you want) (3) set the location to ${env_var:SystemRoot}\explorer.exe
(4) set the arguments to /select,${resource_loc}
(5) run it
for me it appears up in the tool bar at the top in it the little external tool run (run with a toolbox)
simple, effective and doesn't require any installation especially when all i really needed was to have a file focused, and rapidly get to the windows folder that contains it.
Run -> External Tools -> External Tools Configurations...
rather than under Window
. –
Deviationism For people who don't want to install Aptana (It's kinda huge), here are a few plugins for a windows context menu in eclipse(and more):
- contextmenu
- Basic
- Eclipse Navigator Extension
- Basic + copy path
- StartExplorer
- Only opens explorer, but also does it on selected text (if it's a path) and has custom commands.
Some more info on Eclipse explorer menu's after trying them:
- Failed to install (Some error with osgi)
- Has 2 Eclipse context menu's:
- Copy path (full, file, parent)
- Show Context Menu (it's the basic version though, some of the context menu items that I can see in real Explorer don't show up here)
- Has 1 Eclipse context menu (StartExplorer) with submenu's:
- Show in File manager
- Start Shell here
- Open file with default application
- Copy resource path to clipboard
- Custom commands, which you can set in preferences and default ones:
- Edit in notepad
- echo to temp file
So, although (3) StartExplorer doesn't really have a context menu and everything sits in a submenu, the custom commands dominates in my opinion. It should allow a contextmenu through it (command to be found) or achieve what you want by cloning the behavior you want from your context menu. It also seems like the code has been updated more recently than the others (and it supports multiple platforms)
For my custom paste I am not using the Paste from eclipse , I have created a new context menu Paste Objects by adding a new command . I have added the handler : PasteObjectsHandler for the command which extends AbstractHandler .
Command
<command
categoryId="org.eclipse.ui.category.edit"
description="%pasteobjectscommand.description_xmsg"
id="com.test.pasteobjectscommand"
name="%pasteobjectscommand.name_xtit">
</command>
Handler
<handler
class="com.test.PasteObjectsHandler"
commandId=" com.test.pasteobjectscommand ">
</handler>
public class PasteObjectsHandler extends AbstractHandler {
@Override
public Object execute(ExecutionEvent event) {
Clipboard clipBoard = new Clipboard(Display.getDefault());
LocalTransfer instance = LocalTransfer.getInstance();
IResource clipboardData = (IResource) clipBoard.getContents(instance);
}
}
And in the handler I try to access the clipboard in the execute method . And I get null here .
I have written a plug-in that can open the Windows Explorer context menu: ContextMenuPlugin
I wrote it a long time ago, but I still maintain it.
I will add EasyShell plugin for Eclipse, it has that functionality and more.
Have a look at that:
© 2022 - 2024 — McMap. All rights reserved.