在Eclipse中右键单击文件夹时,是否有提供“打开终端”选项的插件?我找到了这个,但似乎只适用于Windows,我正在使用Ubuntu。
Easy shell 绝对是你要找的。
您可以通过Eclipse市场安装它。如果您没有Eclipse Marketplace Client(例如,您正在使用Eclipse Classic),您可以安装它:["Install New Software..."] --> 搜索 "Marketplace Client"
是的,这里有: http://code.google.com/p/openextern/
这是一个Eclipse插件,您可以使用它从Eclipse的资源导航器或包资源管理器中打开一个shell(命令提示符-CMD或Linux shell)或文件夹(Windows资源管理器,Nautilus,Konqueror)。
有一个孵化项目名为本地终端(Local Terminal),您可以从Eclipse更新站点下的通用工具->本地终端安装它。
比http://elt.googlecode.com更好。
抱歉,除了这个插件,我不知道有哪个插件可以集成它。你可能需要修改tarlog。
我看过tarlog的代码。你可以看看OpenCommandPrompt类(可以在tarlog包中找到:tarlog.eclipse.plugins_1.4.2\src\tarlog\eclipse\plugins\openwe)。
@Override
protected void doAction(String path) {
try {
File file = new File(path);
if (file.isFile()) {
File parentFile = file.getParentFile();
if (parentFile != null) {
path = parentFile.getAbsolutePath();
}
}
if (command.indexOf("{0}") >= 0) {
Runtime.getRuntime().exec(MessageFormat.format(command, path));
} else {
Runtime.getRuntime().exec(command, null, new File(path));
}
}
catch (IOException e) {
e.printStackTrace();
}
}
从代码的外观来看,只要在首选项中指定正确的可执行文件,它应该可以完美地工作...
/usr/bin/nohup gnome-terminal --working-directory={0} &
,并将以下命令用作“打开Explorer命令”:/usr/bin/nohup nautilus {0}
。这对我来说很有效。 - knb