当前位置: 首页>>代码示例>>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;未经允许,请勿转载。