Using currently focused file in Run configuration

Hi,

I've got a script that I've written that works on a source file in my project. The way I've got it set up now works, but is a little clunky. I do this:

I go to "Edit Configurations" and put the name of the file I'd like to process in the "arguments" area.
Then I click the Run icon to do the processing.
Then when I want to work on another file, I go back to the "Edit Configurations" dialog and change the file name.
Repeat....

What I'd like to do is put something in that Edit Configurations "arguments" input that means "insert currently focused filename here".

Or, alternatively, is there a way from a ruby file to figure out which file is focused in the Rubymine editor? Even if I have to create a hack that parses some file in .idea, that would be ok.

Then my work flow would be:

I work with a particular source file in the editor.
I click "Run" to process that file.
I work with a different source file.
I click "Run" to process that file.


Thanks!

Please sign in to leave a comment.