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


Java ExecutorRegistry类代码示例

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


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

示例1: getRunConfigurationByName

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
@Nullable
private ChooseRunConfigurationPopup.ItemWrapper getRunConfigurationByName(String name) {
  final ChooseRunConfigurationPopup.ItemWrapper[] wrappers =
    ChooseRunConfigurationPopup.createSettingsList(project, new ExecutorProvider() {
      @Override
      public Executor getExecutor() {
        return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
      }
    }, false);

  for (ChooseRunConfigurationPopup.ItemWrapper wrapper : wrappers) {
    if (wrapper.getText().equals(name)) {
      return wrapper;
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:SearchEverywhereAction.java

示例2: getRunConfigurationByName

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
@Nullable
private ChooseRunConfigurationPopup.ItemWrapper getRunConfigurationByName(String name) {
  final ChooseRunConfigurationPopup.ItemWrapper[] wrappers = ChooseRunConfigurationPopup.createSettingsList(project, new ExecutorProvider() {
    @Override
    public Executor getExecutor() {
      return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
    }
  }, false);

  for (ChooseRunConfigurationPopup.ItemWrapper wrapper : wrappers) {
    if (wrapper.getText().equals(name)) {
      return wrapper;
    }
  }
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:SearchEverywhereAction.java

示例3: getConfigurations

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
private SearchResult getConfigurations(String pattern, int max) {
  SearchResult configurations = new SearchResult();
  if (!Registry.is("search.everywhere.configurations")) {
    return configurations;
  }
  MinusculeMatcher matcher = new MinusculeMatcher(pattern, NameUtil.MatchingCaseSensitivity.NONE);
  final ChooseRunConfigurationPopup.ItemWrapper[] wrappers = ChooseRunConfigurationPopup.createSettingsList(project, new ExecutorProvider() {
    @Override
    public Executor getExecutor() {
      return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
    }
  }, false);
  check();
  for (ChooseRunConfigurationPopup.ItemWrapper wrapper : wrappers) {
    if (matcher.matches(wrapper.getText()) && !myListModel.contains(wrapper)) {
      if (configurations.size() == max) {
        configurations.needMore = true;
        break;
      }
      configurations.add(wrapper);
    }
    check();
  }

  return configurations;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:SearchEverywhereAction.java

示例4: getActions

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static AnAction[] getActions(final int order) {
  return ContainerUtil.map2Array(ExecutorRegistry.getInstance().getRegisteredExecutors(), AnAction.class, new Function<Executor, AnAction>() {
    @Override
    public AnAction fun(Executor executor) {
      return new ExecutorAction(ActionManager.getInstance().getAction(executor.getContextActionId()), executor, order);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:ExecutorAction.java

示例5: isEnabled

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
protected boolean isEnabled(AnActionEvent event) {
  RunContentDescriptor descriptor = getDescriptor(event);
  ProcessHandler processHandler = descriptor == null ? null : descriptor.getProcessHandler();
  ExecutionEnvironment environment = getEnvironment(event);
  return environment != null &&
         !ExecutorRegistry.getInstance().isStarting(environment) &&
         !(processHandler != null && processHandler.isProcessTerminating());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:FakeRerunAction.java

示例6: getConfigurations

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
private SearchResult getConfigurations(String pattern, int max) {
  SearchResult configurations = new SearchResult();
  if (!Registry.is("search.everywhere.configurations")) {
    return configurations;
  }
  MinusculeMatcher matcher = new MinusculeMatcher(pattern, NameUtil.MatchingCaseSensitivity.NONE);
  final ChooseRunConfigurationPopup.ItemWrapper[] wrappers =
    ChooseRunConfigurationPopup.createSettingsList(project, new ExecutorProvider() {
      @Override
      public Executor getExecutor() {
        return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
      }
    }, false);
  check();
  for (ChooseRunConfigurationPopup.ItemWrapper wrapper : wrappers) {
    if (matcher.matches(wrapper.getText()) && !myListModel.contains(wrapper)) {
      if (configurations.size() == max) {
        configurations.needMore = true;
        break;
      }
      configurations.add(wrapper);
    }
    check();
  }

  return configurations;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:28,代码来源:SearchEverywhereAction.java

示例7: connectInDebugMode

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public void connectInDebugMode(RunManagerEx runManager) {
    ServerConfiguration serverConfiguration = selectionHandler.getCurrentConfiguration();
    // Create Remote Connection to Server using the IntelliJ Run / Debug Connection
    //AS TODO: It is working but the configuration is listed and made persistent. That is not too bad because
    //AS TODO: after changes a reconnect will update the configuration.
    RemoteConfigurationType remoteConfigurationType = new RemoteConfigurationType();
    RunConfiguration runConfiguration = remoteConfigurationType.getFactory().createTemplateConfiguration(myProject);
    RemoteConfiguration remoteConfiguration = (RemoteConfiguration) runConfiguration;
    // Server means if you are listening. If not you are attaching.
    remoteConfiguration.SERVER_MODE = false;
    remoteConfiguration.USE_SOCKET_TRANSPORT = true;
    remoteConfiguration.HOST = serverConfiguration.getHost();
    remoteConfiguration.PORT = serverConfiguration.getConnectionDebugPort() + "";
    // Set a Name of the Configuration so that it is properly listed.
    remoteConfiguration.setName(serverConfiguration.getName());
    RunnerAndConfigurationSettings configuration = new RunnerAndConfigurationSettingsImpl(
        (RunManagerImpl) runManager,
        runConfiguration,
        false
    );
    runManager.setTemporaryConfiguration(configuration);
    //AS TODO: Make sure that this is the proper way to obtain the DEBUG Executor
    Executor executor = ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
    ExecutionUtil.runConfiguration(configuration, executor);
    // Update the Modules with the Remote Sling Server
    OsgiClient osgiClient = obtainOSGiClient();
    if(osgiClient != null) {
        BundleStatus status = checkAndUpdateSupportBundle(false);
        if(status != BundleStatus.failed) {
            checkModules(osgiClient);
        }
    }
}
 
开发者ID:headwirecom,项目名称:aem-ide-tooling-4-intellij,代码行数:34,代码来源:ServerConnectionManager.java

示例8: getActions

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
@NotNull
public static AnAction[] getActions() {
    List<AnAction> actions = new ArrayList<>();
    for (Executor executor : ExecutorRegistry.getInstance().getRegisteredExecutors()) {
        actions.add(new PTestRunLineMarkerAction(executor));
    }
    return actions.toArray(new AnAction[actions.size()]);
}
 
开发者ID:KarlGong,项目名称:ptest-pycharm-plugin,代码行数:9,代码来源:PTestRunLineMarkerAction.java

示例9: getRunExecutorInstance

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getRunExecutorInstance() {
	return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
 
开发者ID:kookob,项目名称:mybatis-log-plugin,代码行数:4,代码来源:TailRunExecutor.java

示例10: getDebugExecutorInstance

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getDebugExecutorInstance() {
  return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DefaultDebugExecutor.java

示例11: getRunExecutorInstance

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getRunExecutorInstance() {
  return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DefaultRunExecutor.java

示例12: getAlternativeExecutor

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
protected Executor getAlternativeExecutor() {
  return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:ChooseRunConfigurationPopupAction.java

示例13: getExecutor

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public Executor getExecutor() {
  return ourShiftIsPressed.get() ? DefaultRunExecutor.getRunExecutorInstance()
                                 : ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:SearchEverywhereAction.java

示例14: getInstance

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getInstance() {
  return ExecutorRegistry.getInstance().getExecutorById(ID);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:PyEduDebugExecutor.java

示例15: getListCellRendererComponent

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
@Override
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
  Component renderer = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
  if (value instanceof ExternalSystemRecentTaskListModel.MyEmptyDescriptor) {
    return EMPTY_RENDERER;
  }
  else if (value instanceof ExternalTaskExecutionInfo) {
    ExternalTaskExecutionInfo taskInfo = (ExternalTaskExecutionInfo)value;
    String text = null;
    if (myConfigurationType != null) {
      RunConfiguration[] configurations = RunManager.getInstance(myProject).getConfigurations(myConfigurationType);
      for (RunConfiguration configuration : configurations) {
        if (!(configuration instanceof ExternalSystemRunConfiguration)) {
          continue;
        }
        ExternalSystemRunConfiguration c = (ExternalSystemRunConfiguration)configuration;
        if (c.getSettings().equals(taskInfo.getSettings())) {
          text = c.getName();
        }
      }
    }
    if (StringUtil.isEmpty(text)) {
      text = AbstractExternalSystemTaskConfigurationType.generateName(myProject, taskInfo.getSettings());
    }
    
    setText(text);
    Icon icon = null;
    String executorId = taskInfo.getExecutorId();
    if (!StringUtil.isEmpty(executorId)) {
      Executor executor = ExecutorRegistry.getInstance().getExecutorById(executorId);
      if (executor != null) {
        icon = executor.getIcon();
      }
    }

    if (icon == null) {
      icon = myGenericTaskIcon;
    }
    setIcon(icon);
  }

  return renderer;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:44,代码来源:ExternalSystemRecentTasksList.java


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