selected file as program argument
is there a way to specify the selected file as a program argument in a Application run configuration? I need a configuration that lets me run/debug a fixed main class with a variable argument (path of the file selected in the project view)
Thanks,
-- Peter
请先登录再写评论。
This feature is not present at the moment. One can submit a request at http://youtrack.jetbrains.com/issues/IDEA or write a plug-in.
thanks - no need to add a request as I just found the ContextRun plugin (https://github.com/m-lau/contextrun) which does exactly what I want. Very useful.
The motivation behind this is to use IntelliJ for debugging a system (Java Pathfinder) that is a VM in itself. It has a fixed main class (gov.nasa.jpf.JPF) and gets a property filename (*.jpf) as argument specifying the program JPF has to run/verify. There are way too many *.jpf files to have a separate IntelliJ run config for each of them.
-- Peter