How to send commands to the Terminal View

What I want to do is, to trigger an action of some sort / or press some button, that (optionally generates the selected model and) executes an existing (generated) artifact in the Terminal View. Since I generate a configuration file for a binary that also requires user interaction, I need to run it in the terminal view and not just execute it in the background.

Basically, I want to programmatically execute "export PATH=$PATH:bla/b; ~/path/of/some/sort/BINARY -c ARTIFACT.txt" in the Terminal View. Any idea how I can achieve that?

I hope that was understandable :D

Thanks in advance!

4
3 comments
Avatar
Permanently deleted user

Hi! You can extend the class LocalTerminalDirectRunner and implement the method createProcess

Then if you execute run method a terminal panel should be created with the corresponding process. 

1
Avatar
Permanently deleted user

Hi, thanks for your suggestion! However, It seems that LocalTerminalDirectRunner does not exist for me... Is there a particular package or stubs that I need to import. Using CTRL+R I am not able to find that class though.

0
Avatar
Permanently deleted user

You can find it in the module terminal of the intellij-community source base.

0

Please sign in to leave a comment.