Updating a Command Line Tool
You can update the command definitions of a command line tool right in the PhpStorm editor
and have the .xml
definition file validated.
As you type, the file is checked for well-formedness on the fly.
Full validation is performed every time you invoke a command. If any inconsistencies are detected, the tool is marked
with the Invalid description icon
in the Command Line Tool Support page.
You can also add new tasks to the command definition file and enable PhpStorm to use them without re-configuring the command line tool, that is, without removing it from the list of available ones and adding it anew. All you need, is reload the commands from the executable file.
In this section:
- Editing the command definitions
- Reloading command definitions
- Validating the definition file for structure consistence
To edit the command definitions
- Open the PhpStorm settings, and click the Command Line Tool Support.
-
In the Command Line Tool Support page, select the desired tool and click the Open definition in editor button.
The corresponding
.xml
definition file opens in the editor. Update the file as necessary.
To reload command definitions
- Open the PhpStorm settings, and click the Command Line Tool Support.
-
In the Command Line Tool Support page, select the desired tool
and click the Reload command list from executable button
.
To validate the definition file for structure consistence
- Start executing a command: choose on the main menu or press Ctrl+Shift+X. Then type the call of the command in the Input tab of the Command Line Tools Console tool window.
-
View the results in the Tool definition file errors tab. As soon as PhpStorm detects any structure inconsistency, it displays an error message
that contains a brief description of the problem and indicates the line number where the problem is detected.
By default, the tab is not displayed and opens only upon validation failure. In this case, PhpStorm displays a Command Line Tool pop-up window with a notification on validation failure. Upon clicking the More link, the Tool definition file errors tab opens showing messages on detected inconsistencies. Each message contains information on the file and the line number where the problem was found, as well as a brief description of the error.
You can close the tab by clicking the cross on its header. To re-open the tab, again click More in the Command Line Tool notification pop-up window, which remains on the screen until you close it manually.