本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
});
}
示例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());
}
示例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;
}
示例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);
}
}
}
示例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()]);
}
示例9: getRunExecutorInstance
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getRunExecutorInstance() {
return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
示例10: getDebugExecutorInstance
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getDebugExecutorInstance() {
return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
示例11: getRunExecutorInstance
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getRunExecutorInstance() {
return ExecutorRegistry.getInstance().getExecutorById(EXECUTOR_ID);
}
示例12: getAlternativeExecutor
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
protected Executor getAlternativeExecutor() {
return ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
}
示例13: getExecutor
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public Executor getExecutor() {
return ourShiftIsPressed.get() ? DefaultRunExecutor.getRunExecutorInstance()
: ExecutorRegistry.getInstance().getExecutorById(ToolWindowId.DEBUG);
}
示例14: getInstance
import com.intellij.execution.ExecutorRegistry; //导入依赖的package包/类
public static Executor getInstance() {
return ExecutorRegistry.getInstance().getExecutorById(ID);
}
示例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;
}