• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ExecutorRegistry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: restart

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public void restart() {
  Project project = myEnvironment.getProject();
  if (!ExecutorRegistry.getInstance().isStarting(project, myExecutor.getId(), myRunner.getRunnerId()))
    ExecutionManager.getInstance(project).restartRunProfile(myRunner, myEnvironment, myDescriptor);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:6,代码来源:RestartAction.java


示例17: isEnabled

import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
boolean isEnabled() {
  ProcessHandler processHandler = myDescriptor.getProcessHandler();
  boolean isTerminating = processHandler != null && processHandler.isProcessTerminating();
  boolean isStarting = ExecutorRegistry.getInstance().isStarting(myEnvironment.getProject(), myExecutor.getId(), myRunner.getRunnerId());
  return !isStarting && !isTerminating;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:7,代码来源:RestartAction.java


示例18: 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) {
      List<RunConfiguration> configurations = RunManager.getInstance(myProject).getConfigurationsList(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:consulo,项目名称:consulo,代码行数:44,代码来源:ExternalSystemRecentTasksList.java


示例19: getActions

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


示例20: getExecutor

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java IndicesModule类代码示例发布时间:2022-05-22
下一篇:
Java CaseInsensitiveMap类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap