D
D
Dmitry Vapelnik2015-06-11 12:27:48
linux
Dmitry Vapelnik, 2015-06-11 12:27:48

How to make a button on the toolbar to run a script in PhpStorm?

JetBrains PhpStorm has the ability to start/stop the Vagrant environment for a project. I need to do something similar to start/stop my virtual environment for development
. But the essence is reduced to one action: add a button to the toolbar when clicking on which some script (console command) was executed. In general, it would be great to have the ability to change the icon of this button depending on the status of the virtual environment: if it is not running, then one icon, if it works, another. From the environment side, I can return the status (`my.virtual.environment --status`).
I did not find such functionality in the standard IDE capabilities or did not figure out how to make it using standard tools. I haven't seen a plugin for this either.
Perhaps someone has come across a similar problem and can suggest a solution.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
matperez, 2015-06-11
@dvapelnik

First settings -> tools -> external tools - add your application to launch
Then settings -> appearance & behavior -> menus and toolbars -> main toolbar - add your button to the panel.
You can't change the icon. You can make two buttons, to start and stop. In the called scripts themselves, already resolve whether something is working now and whether it needs to be stopped or started.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question