I'd like to run an external command on an open file in IDE. I know I can use the Command Line Tool Support plugin to run external commands from within IDEA, and by itself that works fine. However, when defining a Command Line Tool Command I could not find a way to parameterise the command. Specifically I would like to define a command such that it run on a file I have currently open and in-focus in an editor. So I would need access to some variabele or predefined method that would return the full path to that file. So kind of like the variables and methods available in 'Live Templates'.
Anyone an idea if this is possible at all? (I could not find any hints on this in the IDEA help I'm affraid).
To give an actual example of what I'd like to do:
- I have a Groovy script open in an editor tab.
- I have a Command Line Tool defined that will call the 'groovyclient'-executable. (Off-topic: checkout GroovyServ project on why I would want this.)
- As a parameter the 'groovyclient'-executable would take the full path to the file in the editor-tab
Does IDEA provide some variable or method I could use in my Tool definition that would resolve into this path?