Opening a new terminal tab via a Gateway plugin


I am using IntelliJ 2024.1 to develop a Plugin that should run on a hosted IDE via Gateway.
The Plugin should create a new Terminal tab and then execute a command in it.

I have the following code:

try {
    var commandLine = new GeneralCommandLine($command);
    ShellTerminalWidget shellTerminalWidget = TerminalToolWindowManager.getInstance(project).createLocalShellWidget(".", "NewTab");
} catch (Exception e) {
    // Handling error here;

When I debug this from inside the IntelliJ, it is working, but when I create a plugin from it and add that plugin to PhpStorm remotely via Gateway and try to use it, nothing is happening... I don't get the new terminal and I don't know what is going on.

I saw this Stack Overflow post: which mentions using the following:


However, I am not sure how to get it to work as I cannot find reference to the BackendTerminalManager class.

Any ideas?


Please sign in to leave a comment.