Hooking build module when a custom configuration is run
I'm working on a custom language plugin and I have created a CustomRunner as a base class of DefaultProgramRunner. I have overriden doExecute() to run my custom process using RunContentBuilder. But since the process depends on the artifacts that I make during build process, I have to initiate the build process before launching the process.
I tried using
CompilerManager.getInstance(project).make(callback);
but seems like this is an asyn call and the run process runs before the make is finished. Is there a way to hook the build process before running my custom run process. Or is there a way to force make() a sync call.
Thanks
Please sign in to leave a comment.
It's too late to call a compiler from a runner.
You better define your own RunConfiguration which implements RunProfileWithCompileBeforeLaunchOption interface - then "Make" will be automatically registered as a "before launch" step for all new run configurations of this type.
Ah Thanks, got it working