Hi, I'm working on a plugin for a custom language that produces Java source files for execution. Our translator/compiler is a jar-based one, and thus far I've managed to get application run configs working for our custom (.resolve) filetypes. That is, by right clicking on our files, I can simply run our compiler's jar on the source and output to the terminal any errors etc. To get this working, I've extended 'JavaCommandLineState' and implemented the 'createJavaParameters()' method and all seems well there. However, now I'm at the step where I would like to be able to write print statements within my language's files and see the output in the same terminal view -- that is, execute my compiler's generated files.
Here is what I would like to know:
1. my run configs work on .resolve files that have a 'main' function defined. I've added an output directory field to my run configuration's UI which serves as the -o <directory> command passed to my compiler. What I'm wondering is, since I'm automatically generating these filled-in run configurations, is there a 'best' place output my generated java sources? Preferably in an 'out-of-sight-out-of-the-way-location'.. ?
2. Once these generated sources are written to whereever, how do I go about executing them, and where should that execution logic be performed? I've read snippets of posts around here saying your can do things post process execution (i.e. somehow 'after' JavaCommandLineState is done). Do I need to override something else in my class extending JavaCommandLineState? How would I get the results of execution similarly displaying in the terminal (for instance, if someone wrote a print statement in their code).
Thanks for reading, let me know if you need additional information/details