eclipse 在eclipse中,显示文件系统中的当前文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1161240/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
In eclipse, reveal current file in filesystem
提问by pbreault
In eclipse, is there a way, to reveal the currently selected file in the filesystem. I currently need it to open in explorer, but it could also be in finder or nautilus.
在 eclipse 中,有没有办法在文件系统中显示当前选定的文件。我目前需要在资源管理器中打开它,但它也可以在 finder 或 nautilus 中打开。
Basically, I do not need the "Open with System Editor" option. I would like a right-click menu with the option: "Show file in explorer/finder/nautilus".
基本上,我不需要“使用系统编辑器打开”选项。我想要一个带有选项的右键单击菜单:“在资源管理器/查找器/鹦鹉螺中显示文件”。
Thanks
谢谢
回答by VonC
Note: You can also develop your own external toolto open the file in a Windows explorer
注意:您也可以开发自己的外部工具在 Windows 资源管理器中打开文件
Or you can use an eclipse plugin like StartExplorer.
或者您可以使用 Eclipse 插件,如StartExplorer。
Notes on MacOS:
MacOS注意事项:
On Mac OS X, replace the location with
/usr/bin/open
and the arguments should be just${container_loc}
.
在 Mac OS X 上,将位置替换为
/usr/bin/open
并且参数应该只是${container_loc}
.
Doesn't work - OSX, you need to put quotes around the
${container_loc}
otherwise you'll often get bizarre error messages because it can't cope with spaces in file names.
不起作用 - OSX,您需要在周围加上引号,
${container_loc}
否则您经常会收到奇怪的错误消息,因为它无法处理文件名中的空格。
But user2036022details:
you can use -R "${resource_loc}" on macosx as argument to
/usr/bin/open
to be consistent with other similar tools.
您可以在 macosx 上使用 -R "${resource_loc}" 作为参数以
/usr/bin/open
与其他类似工具保持一致。
回答by Sufian
ExploreFS
is a cross platform plugin and works fine on Ubuntuand Mac OSX.
ExploreFS
是一个跨平台插件,在Ubuntu和Mac OSX上运行良好。
- open "Install New Software" (from help menu in OSX),
- add
http://www.junginger.biz/eclipse/
, - select ExploreFSfrom the checklist,
- choose appropriate options and install the extension.
- 打开“安装新软件”(从 OSX 的帮助菜单中),
- 添加
http://www.junginger.biz/eclipse/
, - 从清单中选择ExploreFS,
- 选择适当的选项并安装扩展。
Now you can click on your project, package or file and select Explore in File Systemand it will open the location in your default file manager.
现在您可以单击您的项目、包或文件并选择在文件系统中浏览,它将在您的默认文件管理器中打开该位置。
回答by Osmar
I've been recently using Eclipse Luna version, and it has that feature natively implemented, very nice!
我最近一直在使用 Eclipse Luna 版本,它具有本机实现的功能,非常好!
In "Project Explorer" view, right click on the file you're interested in --> "Show In" --> "System Explorer"
在“项目资源管理器”视图中,右键单击您感兴趣的文件 -->“显示在” -->“系统资源管理器”
回答by Adam Batkin
Open the Properties of the file (Right Click->Properties) and the dialog will give you the full filesystem path.
打开文件的属性(右键单击-> 属性),该对话框将为您提供完整的文件系统路径。
回答by robsch
Have a look at the PluginBox: http://pluginbox.sourceforge.net/plugins.html. This works with Linux as well. You can configure it precisely or choose a schema for Gnome, KDE, ...
看看 PluginBox:http://pluginbox.sourceforge.net/plugins.html 。这也适用于 Linux。您可以精确配置它或为 Gnome、KDE、...选择一个架构。
回答by L S
Try the EasyShell extension: http://marketplace.eclipse.org/content/easyshell
尝试 EasyShell 扩展:http://marketplace.eclipse.org/content/easyshell
回答by steven
Why don't you right click on your file and select "show in> system explorer" then you will find life is beautiful.
为什么不右键单击您的文件并选择“在>系统资源管理器中显示”然后您会发现生活很美好。
BTW, my eclipse version :Luna Service Release 1 (4.4.1)[for mac]
顺便说一句,我的 Eclipse 版本:Luna Service Release 1 (4.4.1)[for mac]
回答by Premraj
- @VonC has given the solution, but this solutions helps to understand more and put shortcut to the feature:
- @VonC 已经给出了解决方案,但此解决方案有助于了解更多信息并为该功能设置快捷方式:
回答by sigint
Adding Show in Nautilususing External Toolsis pretty easy too, very similar to the process for Windows in VonC's answer. Simply create the following shell script, chmod +x
it and add it to the PATH. Then use it in Eclipse's External Tools Configuration window, as shown in the screenshot below.
使用外部工具在 Nautilus 中添加Show也非常简单,与 VonC 的答案中的 Windows 过程非常相似。只需创建以下 shell 脚本并将其添加到 PATH。然后在 Eclipse 的外部工具配置窗口中使用它,如下面的屏幕截图所示。chmod +x
~/bin$ cat run-nautilus.sh
#!/bin/bash
nautilus `dirname `
回答by TomC
I cannot seem to comment, so I will post as an answer instead On OSX the answer @zvikicois very close, I would change it to:
我似乎无法发表评论,所以我将作为答案发布在 OSX 上,@zvikico的答案非常接近,我会将其更改为:
Location: /usr/bin/open
Arguments: -R ${container_loc}
The -R
argument is a reveal in finder argument, as opposed to actually trying to open the file.
该-R
参数是 finder 参数中的一个揭示,而不是实际尝试打开文件。
Then you just Run As Shellas mentioned in the other external tool answers
然后你只需像其他外部工具答案中提到的那样以Shell 运行