从日食发射终端 [英] Launch terminal from eclipse

查看:115
本文介绍了从日食发射终端的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近切换到了Eclipse(Helios),因为我的编程需求,我非常喜欢。



只是有一些事情让我疯狂,我可以启动(编译和运行)我的代码到本机mac osx终端。



我尝试创建一个外部工具配置,但这只是启动终端而不输出应用程序。



我现在做的是右键单击Project Explorer中的二进制文件,然后单击打开方式,然后选择其他,然后选择终端应用程序从列表中。但是这个解决方案让我很坚强。



请帮助。

解决方案

这是关于正确定义外部工具的所有内容。



例如,如果您选择的文件是Unix可执行文件,以下内容将起作用。


  1. 打开一个新的外部工具配置。

  2. 将位置设置为 / usr / bin / open

  3. 将工作目录设置为 $ {selected_resource_loc}

  4. 将参数设置为 -a /Applications/Utilities/Terminal.app $ {selected_resource_loc当您运行时,确保选择src src =https://i.stack.imgur.com/J3kH6.pngalt =在此输入图像说明>



    这应该工作。你可以进一步改进。你甚至可以编写一个AppleScript,然后使用 osascript 来运行它。


    I recently switched to Eclipse (Helios) for my programming needs, and I like it very much.

    There is just on thing that is driving me crazy, how can I launch (compile and run) my code into the native mac osx terminal.

    I tried creating an "external tools configuration", but that just starts the terminal without outputting the application.

    What I do now is right-click on the binary in the Project Explorer and then "Open With" and then "Other" and then I pick the terminal app from the list. But this solution is driving me nuts.

    Please help.

    解决方案

    It's all about defining the External Tool correctly.

    For example, the following should work if your selected file is a Unix executable.

    1. Open a new External Tool configuration.
    2. Set the location to /usr/bin/open
    3. Set Working directory as ${selected_resource_loc}
    4. Set the arguments to -a /Applications/Utilities/Terminal.app ${selected_resource_loc}

    When you run make sure you select "src"

    This should work. You could improve it further. You could even write an AppleScript that would do that and run it using osascript.

    这篇关于从日食发射终端的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆