Linux 从 Eclipse 打开终端

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4204403/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-05 00:00:53  来源:igfitidea点击:

Open Terminal From Eclipse

linuxeclipseubuntueclipse-plugin

提问by Cerin

Is there a plugin to provide an "open terminal here" option when right-clicking on a folder in Eclipse? I found this, but it only seems to work on Windows, and I'm using Ubuntu.

在 Eclipse 中右键单击文件夹时,是否有提供“在此处打开终端”选项的插件?我找到了这个,但它似乎只适用于 Windows,而且我使用的是 Ubuntu。

采纳答案by Kane

Easy shelldefinitely is the one you're looking for.

Easy shell绝对是您要找的那个。

enter image description here

在此处输入图片说明

You can install it via Eclipse marketplace. If you don't have Eclipse Marketplace Client (e.g., you are using Eclipse Classic), you can install it: ["Install New Software..."] --> search for "Marketplace Client"

您可以通过 Eclipse 市场安装它。如果您没有 Eclipse Marketplace Client(例如,您使用的是 Eclipse Classic),您可以安装它:["Install New Software..."] --> 搜索“Marketplace Client”

回答by Jules

Sorry, I don't know any plugin which integrates that, except for this one. You might be forced to modify tarlog.

抱歉,除了这个插件,我不知道有任何插件可以集成它。您可能被迫修改 tarlog。

I've had a look at the code of tarlog. You could have a look at the OpenCommandPrompt class (can be found in the tarlog package: tarlog.eclipse.plugins_1.4.2\src\tarlog\eclipse\plugins\openwe)

我看过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();
        }
    }

From what the code looks like it should work perfectly fine, as long as you specify the right executable in the preferences...

从代码看起来它应该可以正常工作,只要您在首选项中指定正确的可执行文件...

回答by Alberto Zaccagni

Yes, here it is: http://code.google.com/p/openextern/

是的,这里是:http: //code.google.com/p/openextern/

This is an eclipse plugin, which you can use to open a shell (either a command prompt - CMD or a linux shell), or a folder (windows explorer, nautilus, konqueror) from eclipse's resource navigator or package explorer.

这是一个 eclipse 插件,您可以使用它从 eclipse 的资源导航器或包浏览器中打开 shell(命令提示符 - CMD 或 linux shell)或文件夹(windows explorer、nautilus、konqueror)。

回答by thSoft

To get an integrated terminal, try http://elt.googlecode.com

要获得集成终端,请尝试http://elt.googlecode.com

回答by Honghe.Wu

Aptana 3 (base on Eclipse) has built-in terminal.
It is convenient.

Aptana 3(基于 Eclipse)具有内置终端。
这很方便。

回答by HiB

There is an Incubator project called Local Terminal. You can install it from the Eclipse update site under General Purpose Tools->Local Terminal
Much better then http://elt.googlecode.com

有一个名为 Local Terminal 的孵化器项目。您可以从通用工具->本地终端下的 Eclipse 更新站点安装它
http://elt.googlecode.com好得多