如何打开Eclipse中选定资源的windows资源管理器?

时间:2022-12-14 00:29:07

I was looking for a small plugin for Eclipse that would allow to open windows explorer on currently selected resource from Package Explorer tree.

我正在为Eclipse寻找一个小插件,它可以在Package explorer树中当前选定的资源上打开windows资源管理器。

I know that Aptana Studio provides this functionality via context menu on the resource, but it has tons of other stuff that I am not interested to.

我知道Aptana Studio通过资源的上下文菜单提供了这个功能,但是它有很多我不感兴趣的东西。

Are there other solutions?

有其他的解决方案吗?

9 个解决方案

#1


85  

I use this plugin, it seems ok

我使用这个插件,看起来没问题

New Eclipse Update Link https://fabioz.github.com/startexplorer/update/

新的Eclipse更新链接https://fabioz.github.com/startexplorer/update/

Old link for reference

旧链接供参考

#2


34  

In Eclipse Luna and later select a resource, then:

在Eclipse Luna中,然后选择一个资源,然后:

Alt + shift + W > System Explorer

Alt + shift + W >系统浏览器

or

Right click > Show In > System Explorer

右键单击>显示在>系统浏览器中

The exact command that should be executed to open the System Explorer can be configured here:

应该执行的打开系统资源管理器的确切命令可以在这里配置:

Window > Preferences > General > Workspace > Command for launching system explorer

窗口>首选项>用于启动系统资源管理器的一般>工作区>命令

#3


22  

Actually you can do that through the built in External tool manager. Here are the instructions : http://www.eclipsezone.com/eclipse/forums/t77655.html I'm trying to get it work with Nautilus. However it works under Windows as I tried it.

实际上你可以通过内置的外部工具管理器来实现。这里有一些说明:http://www.eclipsezone.com/eclipse/forums/t77655.html我正在尝试与Nautilus合作。但是在我尝试的时候,它在Windows下工作。

#4


19  

StartExplorer doesn't work under my Ubuntu, but ExploreFS works. You can find it here:

StartExplorer不是在我的Ubuntu下工作,而是在探索工作。你可以在这里找到:

http://junginger.biz/eclipse/

http://junginger.biz/eclipse/

It supports Windows, Mac OS X, and Linux.

它支持Windows、Mac OS X和Linux。

#5


4  

Download OpenExplorer jar file. I am using OpenExplorer_1.5.0.v201108051513.jar downloaded from https://github.com/samsonw/OpenExplorer/archives/master.

下载OpenExplorer jar文件。我用OpenExplorer_1.5.0.v201108051513。jar从https://github.com/samsonw/OpenExplorer/archives/master下载。

Copy this into your eclipse/plugins folder and restart Eclipse. This comes in handy. I would recommend eclipse users having this.

将它复制到eclipse/plugins文件夹中并重新启动eclipse。这个方便。我建议eclipse用户使用它。

#6


2  

Eclipse Explorer is an eclipse plugin helping you to open the folder or select resource in explorer quickly. It supports key assist, can open common resource and all java element location, even .jar in library.

Eclipse Explorer是一个帮助您快速打开文件夹或在资源管理器中选择资源的Eclipse插件。它支持关键的帮助,可以打开公共资源和所有java元素的位置,甚至是.jar在库中。

Advance feature:

推进特性:

  • Support all Java element explorer
  • 支持所有Java元素资源管理器
  • Support key assitant (default Ctrl + ` )
  • 支持辅助键(默认的Ctrl + ')
  • Support Windows and Linux platform
  • 支持Windows和Linux平台
  • Support auto selecting file(Windows only)
  • 支持自动选择文件(仅支持Windows)

#7


1  

Create a new Plug-In project using Eclipse PDE. Hook your bundle's Activator class into the Common Navigator API to receive selections for IResource. For each IResource selected, use the FileLocator to get a file URI, with which you can construct a java.io.File object. This can then be opened in the operating system's native file explorer using Java 6 Desktop integration:

使用Eclipse PDE创建一个新的插件项目。将bundle的Activator类连接到公共导航器API以接收IResource的选择。对于所选的每个IResource,使用FileLocator获取一个文件URI,您可以使用它构造java.io。文件对象。然后,可以使用Java 6桌面集成在操作系统的本机文件资源管理器中打开:

    if (Desktop.isDesktopSupported()) {
        Desktop desktop = Desktop.getDesktop();
        desktop.open(new File("C:/"));
    }

#8


1  

open explorer in eclipse
    - in eclipse -> external tools configurations
    - in program tree -> new
        name: OpenExplore
        localtion: C:\Windows\explorer.exe
        Arguments: /select,${selected_resource_loc}\

#9


0  

The command configured by default on a Linux platform (dbus-send ...) fails on CentOS 6 and CentOS 7. Changing it to nautilus "${selected_resource_parent_loc}" makes it work. I got this info from this documentation page, which I got from this bug report.

在CentOS 6和CentOS 7上默认配置的命令(dbus-send…)失败。将它更改为“${selected_resource_parent_loc}”使它能够工作。我从这个文档页面中得到了这个信息,这是我从这个bug报告中得到的。

I'm creating an RCP app, and I don't want my users to have to manually change this setting. Using plug-in spy I found the relevant preference store and key. So this non-API call will set the preference programmatically:

我正在创建一个RCP应用程序,我不希望我的用户不得不手动更改这个设置。使用插件spy我找到了相关的首选项存储和密钥。所以这个非api调用将以编程方式设置首选项:

    IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(IDEInternalPreferences.WORKBENCH_SYSTEM_EXPLORER,
"nautilus \"${selected_resource_parent_loc}\"");

With newer versions of nautilus you can specify ${selected_resource_loc} instead, in which case it opens the parent folder with the specified resource selected. I observed this with nautilus v 3.14, but version 2.28 throws an error is the resource is not a folder.

使用更新版本的nautilus,您可以指定${selected_resource_loc},在这种情况下,它会打开父文件夹,并选择指定的资源。我在nautilus v3.14中观察到这一点,但是2.28版本抛出的错误是资源不是文件夹。

#1


85  

I use this plugin, it seems ok

我使用这个插件,看起来没问题

New Eclipse Update Link https://fabioz.github.com/startexplorer/update/

新的Eclipse更新链接https://fabioz.github.com/startexplorer/update/

Old link for reference

旧链接供参考

#2


34  

In Eclipse Luna and later select a resource, then:

在Eclipse Luna中,然后选择一个资源,然后:

Alt + shift + W > System Explorer

Alt + shift + W >系统浏览器

or

Right click > Show In > System Explorer

右键单击>显示在>系统浏览器中

The exact command that should be executed to open the System Explorer can be configured here:

应该执行的打开系统资源管理器的确切命令可以在这里配置:

Window > Preferences > General > Workspace > Command for launching system explorer

窗口>首选项>用于启动系统资源管理器的一般>工作区>命令

#3


22  

Actually you can do that through the built in External tool manager. Here are the instructions : http://www.eclipsezone.com/eclipse/forums/t77655.html I'm trying to get it work with Nautilus. However it works under Windows as I tried it.

实际上你可以通过内置的外部工具管理器来实现。这里有一些说明:http://www.eclipsezone.com/eclipse/forums/t77655.html我正在尝试与Nautilus合作。但是在我尝试的时候,它在Windows下工作。

#4


19  

StartExplorer doesn't work under my Ubuntu, but ExploreFS works. You can find it here:

StartExplorer不是在我的Ubuntu下工作,而是在探索工作。你可以在这里找到:

http://junginger.biz/eclipse/

http://junginger.biz/eclipse/

It supports Windows, Mac OS X, and Linux.

它支持Windows、Mac OS X和Linux。

#5


4  

Download OpenExplorer jar file. I am using OpenExplorer_1.5.0.v201108051513.jar downloaded from https://github.com/samsonw/OpenExplorer/archives/master.

下载OpenExplorer jar文件。我用OpenExplorer_1.5.0.v201108051513。jar从https://github.com/samsonw/OpenExplorer/archives/master下载。

Copy this into your eclipse/plugins folder and restart Eclipse. This comes in handy. I would recommend eclipse users having this.

将它复制到eclipse/plugins文件夹中并重新启动eclipse。这个方便。我建议eclipse用户使用它。

#6


2  

Eclipse Explorer is an eclipse plugin helping you to open the folder or select resource in explorer quickly. It supports key assist, can open common resource and all java element location, even .jar in library.

Eclipse Explorer是一个帮助您快速打开文件夹或在资源管理器中选择资源的Eclipse插件。它支持关键的帮助,可以打开公共资源和所有java元素的位置,甚至是.jar在库中。

Advance feature:

推进特性:

  • Support all Java element explorer
  • 支持所有Java元素资源管理器
  • Support key assitant (default Ctrl + ` )
  • 支持辅助键(默认的Ctrl + ')
  • Support Windows and Linux platform
  • 支持Windows和Linux平台
  • Support auto selecting file(Windows only)
  • 支持自动选择文件(仅支持Windows)

#7


1  

Create a new Plug-In project using Eclipse PDE. Hook your bundle's Activator class into the Common Navigator API to receive selections for IResource. For each IResource selected, use the FileLocator to get a file URI, with which you can construct a java.io.File object. This can then be opened in the operating system's native file explorer using Java 6 Desktop integration:

使用Eclipse PDE创建一个新的插件项目。将bundle的Activator类连接到公共导航器API以接收IResource的选择。对于所选的每个IResource,使用FileLocator获取一个文件URI,您可以使用它构造java.io。文件对象。然后,可以使用Java 6桌面集成在操作系统的本机文件资源管理器中打开:

    if (Desktop.isDesktopSupported()) {
        Desktop desktop = Desktop.getDesktop();
        desktop.open(new File("C:/"));
    }

#8


1  

open explorer in eclipse
    - in eclipse -> external tools configurations
    - in program tree -> new
        name: OpenExplore
        localtion: C:\Windows\explorer.exe
        Arguments: /select,${selected_resource_loc}\

#9


0  

The command configured by default on a Linux platform (dbus-send ...) fails on CentOS 6 and CentOS 7. Changing it to nautilus "${selected_resource_parent_loc}" makes it work. I got this info from this documentation page, which I got from this bug report.

在CentOS 6和CentOS 7上默认配置的命令(dbus-send…)失败。将它更改为“${selected_resource_parent_loc}”使它能够工作。我从这个文档页面中得到了这个信息,这是我从这个bug报告中得到的。

I'm creating an RCP app, and I don't want my users to have to manually change this setting. Using plug-in spy I found the relevant preference store and key. So this non-API call will set the preference programmatically:

我正在创建一个RCP应用程序,我不希望我的用户不得不手动更改这个设置。使用插件spy我找到了相关的首选项存储和密钥。所以这个非api调用将以编程方式设置首选项:

    IDEWorkbenchPlugin.getDefault().getPreferenceStore().setValue(IDEInternalPreferences.WORKBENCH_SYSTEM_EXPLORER,
"nautilus \"${selected_resource_parent_loc}\"");

With newer versions of nautilus you can specify ${selected_resource_loc} instead, in which case it opens the parent folder with the specified resource selected. I observed this with nautilus v 3.14, but version 2.28 throws an error is the resource is not a folder.

使用更新版本的nautilus,您可以指定${selected_resource_loc},在这种情况下,它会打开父文件夹,并选择指定的资源。我在nautilus v3.14中观察到这一点,但是2.28版本抛出的错误是资源不是文件夹。