當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。