當前位置: 首頁>>代碼示例>>Java>>正文


Java ExecutionEnvironment.getRunnerAndConfigurationSettings方法代碼示例

本文整理匯總了Java中com.intellij.execution.runners.ExecutionEnvironment.getRunnerAndConfigurationSettings方法的典型用法代碼示例。如果您正苦於以下問題:Java ExecutionEnvironment.getRunnerAndConfigurationSettings方法的具體用法?Java ExecutionEnvironment.getRunnerAndConfigurationSettings怎麽用?Java ExecutionEnvironment.getRunnerAndConfigurationSettings使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.execution.runners.ExecutionEnvironment的用法示例。


在下文中一共展示了ExecutionEnvironment.getRunnerAndConfigurationSettings方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: doDeploy

import com.intellij.execution.runners.ExecutionEnvironment; //導入方法依賴的package包/類
public void doDeploy(Executor executor) {
  DeploymentTask<?> deploymentTask = getDeployment().getDeploymentTask();
  if (deploymentTask != null) {
    ExecutionEnvironment environment = ((DeploymentTaskImpl)deploymentTask).getExecutionEnvironment();
    RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings();
    if (settings != null) {
      ProgramRunnerUtil.executeConfiguration(doGetProject(), settings, executor);
    }
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:11,代碼來源:ServersTreeStructure.java

示例2: createRunner

import com.intellij.execution.runners.ExecutionEnvironment; //導入方法依賴的package包/類
@Override
public BlazeCommandRunConfigurationRunner createRunner(
    Executor executor, ExecutionEnvironment environment) {
  RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings();
  RunConfiguration config = settings != null ? settings.getConfiguration() : null;
  if (config instanceof BlazeCommandRunConfiguration
      && RunConfigurationUtils.canUseClionRunner((BlazeCommandRunConfiguration) config)) {
    return new BlazeCidrRunConfigurationRunner((BlazeCommandRunConfiguration) config);
  }
  return new BlazeCommandGenericRunConfigurationRunner();
}
 
開發者ID:bazelbuild,項目名稱:intellij,代碼行數:12,代碼來源:BlazeCidrRunConfigurationHandler.java

示例3: canRunConfiguration

import com.intellij.execution.runners.ExecutionEnvironment; //導入方法依賴的package包/類
public static boolean canRunConfiguration(@NotNull ExecutionEnvironment environment) {
  RunnerAndConfigurationSettings runnerAndConfigurationSettings = environment.getRunnerAndConfigurationSettings();
  return runnerAndConfigurationSettings != null && canRunConfiguration(runnerAndConfigurationSettings, environment.getExecutor());
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:RunManagerImpl.java

示例4: start

import com.intellij.execution.runners.ExecutionEnvironment; //導入方法依賴的package包/類
private static void start(@NotNull ExecutionEnvironment environment) {
  RunnerAndConfigurationSettings settings = environment.getRunnerAndConfigurationSettings();
  ProgramRunnerUtil.executeConfiguration(environment, settings != null && settings.isEditBeforeRun(), true);
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:5,代碼來源:ExecutionManagerImpl.java

示例5: executeConfiguration

import com.intellij.execution.runners.ExecutionEnvironment; //導入方法依賴的package包/類
public static void executeConfiguration(@NotNull ExecutionEnvironment environment, boolean showSettings, boolean assignNewId) {
  if (ExecutorRegistry.getInstance().isStarting(environment)) {
    return;
  }

  RunnerAndConfigurationSettings runnerAndConfigurationSettings = environment.getRunnerAndConfigurationSettings();
  if (runnerAndConfigurationSettings != null) {
    if (!ExecutionTargetManager.canRun(environment)) {
      ExecutionUtil.handleExecutionError(environment, new ExecutionException(
        StringUtil.escapeXml("Cannot run '" + environment.getRunProfile().getName() + "' on '" + environment.getExecutionTarget().getDisplayName() + "'")));
      return;
    }

    if (!RunManagerImpl.canRunConfiguration(environment) || (showSettings && runnerAndConfigurationSettings.isEditBeforeRun())) {
      if (!RunDialog.editConfiguration(environment, "Edit configuration")) {
        return;
      }

      while (!RunManagerImpl.canRunConfiguration(environment)) {
        if (Messages.YES == Messages
          .showYesNoDialog(environment.getProject(), "Configuration is still incorrect. Do you want to edit it again?", "Change Configuration Settings",
                           "Edit", "Continue Anyway", Messages.getErrorIcon())) {
          if (!RunDialog.editConfiguration(environment, "Edit configuration")) {
            return;
          }
        }
        else {
          break;
        }
      }
    }

    ConfigurationType configurationType = runnerAndConfigurationSettings.getType();
    if (configurationType != null) {
      UsageTrigger.trigger("execute." + ConvertUsagesUtil.ensureProperKey(configurationType.getId()) + "." + environment.getExecutor().getId());
    }
  }

  try {
    if (assignNewId) {
      environment.assignNewExecutionId();
    }
    environment.getRunner().execute(environment);
  }
  catch (ExecutionException e) {
    String name = runnerAndConfigurationSettings != null ? runnerAndConfigurationSettings.getName() : null;
    if (name == null) {
      name = environment.getRunProfile().getName();
    }
    if (name == null && environment.getContentToReuse() != null) {
      name = environment.getContentToReuse().getDisplayName();
    }
    if (name == null) {
      name = "<Unknown>";
    }
    ExecutionUtil.handleExecutionError(environment.getProject(), environment.getExecutor().getToolWindowId(), name, e);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:59,代碼來源:ProgramRunnerUtil.java


注:本文中的com.intellij.execution.runners.ExecutionEnvironment.getRunnerAndConfigurationSettings方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。