com.intellij.compiler.options.CompileStepBeforeRun Java Examples

The following examples show how to use com.intellij.compiler.options.CompileStepBeforeRun. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RoboVmCompileTask.java    From robovm-idea with GNU General Public License v2.0 6 votes vote down vote up
@Override
public boolean execute(CompileContext context) {
    if(context.getMessageCount(CompilerMessageCategory.ERROR) > 0) {
        RoboVmPlugin.logError(context.getProject(), "Can't compile application due to previous compilation errors");
        return false;
    }

    RunConfiguration c = context.getCompileScope().getUserData(CompileStepBeforeRun.RUN_CONFIGURATION);
    if(c == null || !(c instanceof RoboVmRunConfiguration)) {
        CreateIpaAction.IpaConfig ipaConfig = context.getCompileScope().getUserData(CreateIpaAction.IPA_CONFIG_KEY);
        if(ipaConfig != null) {
            return compileForIpa(context, ipaConfig);
        } else {
            return true;
        }
    } else {
        return compileForRunConfiguration(context, (RoboVmRunConfiguration)c);
    }
}
 
Example #2
Source File: HaxeCompiler.java    From intellij-haxe with Apache License 2.0 5 votes vote down vote up
@Override
public ProcessingItem[] process(CompileContext context, ProcessingItem[] items) {
  final RunConfiguration runConfiguration = CompileStepBeforeRun.getRunConfiguration(context.getCompileScope());
  if (runConfiguration instanceof ModuleBasedConfiguration) {
    return run(context, items, (ModuleBasedConfiguration)runConfiguration);
  }
  return make(context, items);
}