Eclipse Plugin to show Windows Explorer context menu
Asked Answered
M

6

8

I am looking for a good plugin showing Windows Explorer context menu directly from editor window in Eclipse. Does anybody know such plugin?

Muffin answered 20/7, 2011 at 9:47 Comment(1)
Try Aptana, they have lots of windows/OS integration in their File Explorer view that will give you lots of native operations.Grillroom
B
8

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.

Blairblaire answered 13/1, 2012 at 21:26 Comment(2)
In my Eclipse installation, the External Tools Configurations menu option is found under Run -> External Tools -> External Tools Configurations... rather than under Window.Deviationism
For me the argument didn't work. Though it works when I put the following in arguments: ${selected_resource_loc}Dollop
D
7

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):

  1. contextmenu
    • Basic
  2. Eclipse Navigator Extension
    • Basic + copy path
  3. 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:

  1. Failed to install (Some error with osgi)
  2. 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)
  3. 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)

Dollop answered 17/11, 2011 at 13:23 Comment(1)
contextMenu is what I was looking for - had used it a few years ago but had forgotten where I got it from. I just installed it in STS and it seems to work well, showing the complete context menu including other programs installed in windows (KDiff3, Agent Ransack, 7-Zip, etc.)Tunesmith
C
0

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 .

Catherine answered 23/9, 2014 at 11:26 Comment(0)
A
0

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.

Abscission answered 6/6, 2016 at 10:15 Comment(0)
S
0

I will add EasyShell plugin for Eclipse, it has that functionality and more.

Have a look at that:

https://anb0s.github.io/EasyShell/

Spirometer answered 21/8, 2019 at 8:25 Comment(0)
M
-1

Aptana, it will give you context menu.

Munmro answered 1/8, 2011 at 2:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.