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


Java RunConfiguration.getProject方法代码示例

本文整理汇总了Java中com.intellij.execution.configurations.RunConfiguration.getProject方法的典型用法代码示例。如果您正苦于以下问题:Java RunConfiguration.getProject方法的具体用法?Java RunConfiguration.getProject怎么用?Java RunConfiguration.getProject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.configurations.RunConfiguration的用法示例。


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

示例1: getAvailableConfigurations

import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
@NotNull
private static List<RunnerAndConfigurationSettings> getAvailableConfigurations(@NotNull RunConfiguration runConfiguration) {
  Project project = runConfiguration.getProject();
  if (project == null || !project.isInitialized()) {
    return Collections.emptyList();
  }

  List<RunnerAndConfigurationSettings> configurations = new ArrayList<RunnerAndConfigurationSettings>(RunManagerImpl.getInstanceImpl(project).getSortedConfigurations());
  String executorId = DefaultRunExecutor.getRunExecutorInstance().getId();
  for (Iterator<RunnerAndConfigurationSettings> iterator = configurations.iterator(); iterator.hasNext();) {
    RunnerAndConfigurationSettings settings = iterator.next();
    ProgramRunner runner = ProgramRunnerUtil.getRunner(executorId, settings);
    if (runner == null || settings.getConfiguration() == runConfiguration) {
      iterator.remove();
    }
  }
  return configurations;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:RunConfigurationBeforeRunProvider.java

示例2: configureTask

import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
@Override
public boolean configureTask(RunConfiguration runConfiguration, T task) {
  final ToolSelectDialog dialog = new ToolSelectDialog(runConfiguration.getProject(), task.getToolActionId(), createToolsPanel());
  if (!dialog.showAndGet()) {
    return false;
  }
  boolean isModified = dialog.isModified();
  Tool selectedTool = dialog.getSelectedTool();
  LOG.assertTrue(selectedTool != null);
  String selectedToolId = selectedTool.getActionId();
  String oldToolId = task.getToolActionId();
  if (oldToolId != null && oldToolId.equals(selectedToolId)) {
    return isModified;
  }
  task.setToolActionId(selectedToolId);
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:AbstractToolBeforeRunTaskProvider.java

示例3: SMTRunnerConsoleProperties

import com.intellij.execution.configurations.RunConfiguration; //导入方法依赖的package包/类
/**
 * @param config
 * @param testFrameworkName Prefix for storage which keeps runner settings. E.g. "RubyTestUnit"
 * @param executor
 */
public SMTRunnerConsoleProperties(@NotNull RunConfiguration config, @NotNull String testFrameworkName, @NotNull Executor executor) {
  this(config.getProject(), config, testFrameworkName, executor);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:SMTRunnerConsoleProperties.java


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