Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there an Eclipse plugin to run system shell in the Console? [closed]

Do you know of any Eclipse plugin to run a system shell in the included console? It would be awesome. Dolphin, KDE's file navigator, has this feature, you can press F4 and a console shows located on the directory you are standing.

It would be awesome to have a similar feature on Eclipse, with the shell located on the directory of the project/file you are working on.

Does this plugin exist?

If not, would it be too complicated to code such a plugin? I have no idea about eclipse plugin development (yet).

like image 757
Fernando Briano Avatar asked Oct 13 '09 20:10

Fernando Briano


People also ask

Can we run shell script in Eclipse?

Have you looked at Run > External Tools > External Tools Configuration? You should be able to launch your scripts from there. Exactly as Peter said. For a long time, the Linux version of Eclipse didn't support the File/Print menu, so I ran the Linux enscript utility as an external tool.

How do I open shell in Eclipse?

To open the command prompt (shell or terminal) using the path of a project directory inside Eclipse, you just need to select the folder, and press Ctrl+Alt+T, or right-click and select Show In Local Terminal > Terminal. Then, the terminal will open in a new view inside Eclipse.

How do I run a code in Terminal in Eclipse?

Open a Terminal window. Enter eclipse on the commandline. You can optionally explore the various icons as you wish. The next time you run Eclipse, you will not be shown this welcome workspace, but all of the information it contains can be found elsewhere.


3 Answers

It exists, and it's built into Eclipse! Go to the Remote Systems view, and you'll see an entry for "Local". Right-click "Local Shells" and choose "Launch Shell."

You can't launch it directly from the project navigator. But you can right-click in the navigator and choose "Show in Remote Systems view". From there you can right-click the parent folder and choose "Launch Shell."

Aptana also has a Terminal view, and a command to open the selected file in the terminal.

like image 162
JW. Avatar answered Oct 21 '22 11:10

JW.


You don't need a plugin (including the Remote System View plugin), you can do this with the basic platform. You just create an external tool configuration. I've added an image to demonstrate.

screenshot from Mac of external tools configuration dialog with colored arrows

Orange Arrows: Use the external tool button on the toolbar and select External Tools Configuration.... Click on Program then up above click on the New launch configuration icon.

Green Arrows: Use the Name field and name your new tool something clever like "Launch Shell". In the Location area enter a shell command e.g. /bin/bash. A more generic approach would be to use ${env_var:SHELL} which under the Mac (and I hope Linux) launches the default shell. Then in the Working Directory you can use the variable ${project_loc} to set the default directory to your current project location. This will mean that when you launch the tool, you have to make sure you have your cursor in an active project on the explorer or in an appropriate editor window. Under the Arguments area use -i for interactive mode.

Blue arrows: Switch to the Build tab and uncheck Build before launch. Then switch to the Common tab and click to add your command to the favorites menu. Now click Apply and Close. Make sure the console view is showing (Window->Show View->Console). Click on a project in the Package or Project Explorer or click in an editor window that has code for a project of interest. Then click on the external tool icon and select Launch Shell, you now have an interactive shell window in the console view.

In the lower left of the image you can see the tcsh shell in action.

Windows Note: This also works in Windows but you use ${env_var:ComSpec} in the location field and you can leave the arguments field blank.

like image 68
Tod Avatar answered Oct 21 '22 09:10

Tod


Eclipse TCF team has just release terminal (SSH, Telnet, local)

originally named TCF Terminal, then renamed to TM Terminal

http://marketplace.eclipse.org/content/tcf-terminals

Finally Windows and Linux all supported

Support for Git Bash on Windows is resolved Bug 435014.

This plugin is included into Enide Studio 2014 and Enide 2015.

To access the terminal go to Window -> Show View -> Terminal or Ctrl+Alt+T

like image 57
Paul Verest Avatar answered Oct 21 '22 09:10

Paul Verest