当前位置: 首页>>代码示例>>Java>>正文


Java CompileStepBeforeRun类代码示例

本文整理汇总了Java中com.intellij.compiler.options.CompileStepBeforeRun的典型用法代码示例。如果您正苦于以下问题:Java CompileStepBeforeRun类的具体用法?Java CompileStepBeforeRun怎么用?Java CompileStepBeforeRun使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


CompileStepBeforeRun类属于com.intellij.compiler.options包,在下文中一共展示了CompileStepBeforeRun类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ensureRunConfigurationExists

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
protected static void ensureRunConfigurationExists(Module module, ConfigurationType configurationType, String name) {
  final RunManager runManager = RunManager.getInstance(module.getProject());
  for (final RunConfiguration runConfiguration : runManager.getConfigurationsList(configurationType)) {
    if (runConfiguration instanceof MvcRunConfiguration && ((MvcRunConfiguration)runConfiguration).getModule() == module) {
      return;
    }
  }

  final ConfigurationFactory factory = configurationType.getConfigurationFactories()[0];
  final RunnerAndConfigurationSettings runSettings = runManager.createRunConfiguration(name,
                                                                                                                               factory);
  final MvcRunConfiguration configuration = (MvcRunConfiguration)runSettings.getConfiguration();
  configuration.setModule(module);
  runManager.addConfiguration(runSettings, false);
  runManager.setSelectedConfiguration(runSettings);

  RunManagerEx.disableTasks(module.getProject(), configuration, CompileStepBeforeRun.ID, CompileStepBeforeRunNoErrorCheck.ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:MvcFramework.java

示例2: execute

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@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);
    }
}
 
开发者ID:robovm,项目名称:robovm-idea,代码行数:20,代码来源:RoboVmCompileTask.java

示例3: ensureRunConfigurationExists

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
protected static void ensureRunConfigurationExists(Module module, ConfigurationType configurationType, String name) {
  final RunManagerEx runManager = RunManagerEx.getInstanceEx(module.getProject());
  for (final RunConfiguration runConfiguration : runManager.getConfigurations(configurationType)) {
    if (runConfiguration instanceof MvcRunConfiguration && ((MvcRunConfiguration)runConfiguration).getModule() == module) {
      return;
    }
  }

  final ConfigurationFactory factory = configurationType.getConfigurationFactories()[0];
  final RunnerAndConfigurationSettings runSettings = runManager.createRunConfiguration(name,
                                                                                                                               factory);
  final MvcRunConfiguration configuration = (MvcRunConfiguration)runSettings.getConfiguration();
  configuration.setModule(module);
  runManager.addConfiguration(runSettings, false);
  runManager.setActiveConfiguration(runSettings);

  RunManagerEx.disableTasks(module.getProject(), configuration, CompileStepBeforeRun.ID, CompileStepBeforeRunNoErrorCheck.ID);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:MvcFramework.java

示例4: configureBeforeRunTaskDefaults

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
  // Under Android Studio, disable the default Make compile step for this run configuration type
  if (AndroidStudioSpecificInitializer.isAndroidStudio() && CompileStepBeforeRun.ID.equals(providerID)) {
    task.setEnabled(false);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:AndroidRunConfigurationType.java

示例5: tuneConfiguration

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void tuneConfiguration(@NotNull GroovyFile file, @NotNull GroovyScriptRunConfiguration configuration, Location location) {
  List<String> tasks = getTasksTarget(location);
  if (tasks != null) {
    String s = StringUtil.join(tasks, " ");
    configuration.setScriptParameters(s);
    configuration.setName("gradle:" + s);
  }
  RunManagerEx.disableTasks(file.getProject(), configuration, CompileStepBeforeRun.ID, CompileStepBeforeRunNoErrorCheck.ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:GradleScriptType.java

示例6: GriffonRunConfigurationType

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
public GriffonRunConfigurationType() {
  myConfigurationFactory = new ConfigurationFactory(this) {
    @Override
    public RunConfiguration createTemplateConfiguration(Project project) {
      return new GriffonRunConfiguration(this, project, GRIFFON_APPLICATION, "run-app");
    }

    @Override
    public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
      if (providerID == CompileStepBeforeRun.ID || providerID == CompileStepBeforeRunNoErrorCheck.ID) {
        task.setEnabled(false);
      }
    }
  };
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:GriffonRunConfigurationType.java

示例7: tuneConfiguration

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void tuneConfiguration(@NotNull GroovyFile file, @NotNull GroovyScriptRunConfiguration configuration, Location location) {
  String target = getTargetName(location);
  if (target != null) {
    configuration.setScriptParameters(target);
    configuration.setName(configuration.getName() + "." + target);
  }
  RunManagerEx.disableTasks(file.getProject(), configuration, CompileStepBeforeRun.ID, CompileStepBeforeRunNoErrorCheck.ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:GantScriptType.java

示例8: configureBeforeRunTaskDefaults

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
    super.configureBeforeRunTaskDefaults(providerID, task);
    if (providerID == CompileStepBeforeRun.ID) {
        task.setEnabled(false);
    }
}
 
开发者ID:shvetsgroup,项目名称:squirrel-lang-idea-plugin,代码行数:8,代码来源:SquirrelConfigurationType.java

示例9: createOn

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@NotNull
public static OCamlCompileContext createOn(@NotNull final CompileContext context) {
    final RunConfiguration configuration = CompileStepBeforeRun.getRunConfiguration(context);
    if (configuration == null || !(configuration instanceof OCamlRunConfiguration)) {
        return new OCamlCompileContext(true, null, false);
    }
    final String debugExecutorId = DefaultDebugExecutor.getDebugExecutorInstance().getId();
    final Executor currentExecutor = OCamlRunner.getCurrentExecutor();
    final boolean isDebugMode = currentExecutor != null && debugExecutorId.equals(currentExecutor.getId());
    return new OCamlCompileContext(false, (OCamlRunConfiguration) configuration, isDebugMode);
}
 
开发者ID:traff,项目名称:intellij-ocaml,代码行数:12,代码来源:OCamlCompileContext.java

示例10: configureBeforeRunTaskDefaults

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
    // Disable the default Make compile step for this run configuration type
    if (CompileStepBeforeRun.ID.equals(providerID)) {
        task.setEnabled(false);
    }
}
 
开发者ID:chrimm,项目名称:cordovastudio,代码行数:8,代码来源:CordovaRunConfigurationType.java

示例11: process

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@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);
}
 
开发者ID:HaxeFoundation,项目名称:intellij-haxe,代码行数:9,代码来源:HaxeCompiler.java

示例12: process

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public ProcessingItem[] process(CompileContext context, ProcessingItem[] items)
{
	final RunConfiguration runConfiguration = CompileStepBeforeRun.getRunConfiguration(context.getCompileScope());
	if(runConfiguration instanceof HaxeApplicationConfiguration)
	{
		return run(context, items, (HaxeApplicationConfiguration) runConfiguration);
	}
	return make(context, items);
}
 
开发者ID:consulo,项目名称:consulo-haxe,代码行数:11,代码来源:HaxeCompiler.java

示例13: isFullBuild

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
public static boolean isFullBuild(@NotNull CompileScope scope) {
  final RunConfiguration c = CompileStepBeforeRun.getRunConfiguration(scope);
  return c == null || !AndroidCommonUtils.isTestConfiguration(c.getType().getId());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:AndroidCompileUtil.java

示例14: configureBeforeRunTaskDefaults

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public void configureBeforeRunTaskDefaults(Key<? extends BeforeRunTask> providerID, BeforeRunTask task) {
    if (providerID == CompileStepBeforeRun.ID || providerID == CompileStepBeforeRunNoErrorCheck.ID) {
        task.setEnabled(false);
    }
}
 
开发者ID:shlxue,项目名称:MvnRunner,代码行数:7,代码来源:MvnRunConfigurationType.java

示例15: execute

import com.intellij.compiler.options.CompileStepBeforeRun; //导入依赖的package包/类
@Override
public boolean execute(@NotNull final CompileContext context) {
  if(isErroneous(context)) {
    return false;
  }

  final Project project = context.getProject();

  final RunConfiguration runConfiguration =
      context.getCompileScope().getUserData(CompileStepBeforeRun.RUN_CONFIGURATION);

  if(!isDefracRunConfiguration(runConfiguration)) {
    return true;
  }

  final DefracRunConfiguration defracRunConfiguration =
      (DefracRunConfiguration)runConfiguration;

  final Module[] modules = defracRunConfiguration.getModules();

  if(modules.length != 1) {
    reportError(context, "No module found");
    return false;
  }

  final DefracFacet facet = DefracFacet.getInstance(modules[0]);

  if(facet == null) {
    reportError(context,"Couldn't find defrac facet");
    return false;
  }

  if(!shouldRunForFacet(facet)) {
    return true;
  }

  try {
    context.getProgressIndicator().pushState();
    setProgressIndicatorText(context, facet);

    UIUtil.invokeAndWaitIfNeeded(new Runnable() {
      @Override
      public void run() {
        final ConsoleView console =
            DefracConsoleView.getInstance(project);

        if(console != null) {
          console.clear();
        }
      }
    });

    return doCompile(context, defracRunConfiguration, facet);
  } finally {
    context.getProgressIndicator().popState();
  }
}
 
开发者ID:defrac,项目名称:defrac-plugin-intellij,代码行数:58,代码来源:DefracCompilerTask.java


注:本文中的com.intellij.compiler.options.CompileStepBeforeRun类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。