代码之家  ›  专栏  ›  技术社区  ›  Cerin

从Eclipse打开终端[关闭]

  •  21
  • Cerin  · 技术社区  · 14 年前

    当右键单击Eclipse中的文件夹时,是否有插件提供“在此处打开终端”选项?我找到了 this ,但它似乎只在Windows上工作,我正在使用Ubuntu。

    6 回复  |  直到 12 年前
        1
  •  32
  •   unkulunkulu    12 年前

    Easy shell 当然是你要找的那个。

    enter image description here

    您可以通过Eclipse Marketplace安装它。如果没有Eclipse Marketplace客户端(例如,您使用的是Eclipse Classic),则可以安装它:【安装新软件…”]——&g t;搜索“Marketplace客户端”

        2
  •  7
  •   Alberto Zaccagni    14 年前

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

    这是一个Eclipse插件,您可以使用它从Eclipse的资源导航器或包资源管理器中打开shell(命令提示符-cmd或Linux shell)或文件夹(Windows资源管理器、Nautilus、Konquerror)。

        3
  •  6
  •   thSoft    12 年前

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

        4
  •  2
  •   Jules    14 年前

    对不起,除了这个插件,我不知道还有什么插件集成了这个插件。您可能被迫修改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();
            }
        }
    

    从代码的外观来看,只要在首选项中指定正确的可执行文件,它就可以完美地工作。

        5
  •  2
  •   laplasz    12 年前

    有一个叫本地终端的孵化器项目。您可以从下面的Eclipse更新站点安装它 通用工具-本地终端
    那就好多了 http://elt.googlecode.com

        6
  •  1
  •   Honghe.Wu    12 年前

    Aptana3(基于Eclipse)有内置终端。
    这很方便。