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


Java RunManagerImpl.getInstanceImpl方法代码示例

本文整理汇总了Java中com.intellij.execution.impl.RunManagerImpl.getInstanceImpl方法的典型用法代码示例。如果您正苦于以下问题:Java RunManagerImpl.getInstanceImpl方法的具体用法?Java RunManagerImpl.getInstanceImpl怎么用?Java RunManagerImpl.getInstanceImpl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.intellij.execution.impl.RunManagerImpl的用法示例。


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

示例1: getTarget

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
public ExecutionTarget getTarget() {
  if (myTargetId != null) {
    if (DefaultExecutionTarget.INSTANCE.getId().equals(myTargetId)) {
      return DefaultExecutionTarget.INSTANCE;
    }
    final RunnerAndConfigurationSettingsImpl settings = 
      new RunnerAndConfigurationSettingsImpl(RunManagerImpl.getInstanceImpl(myProject), myConfiguration, false);
    for (ExecutionTargetProvider provider : Extensions.getExtensions(ExecutionTargetProvider.EXTENSION_NAME)) {
      for (ExecutionTarget target : provider.getTargets(myProject, settings)) {
        if (myTargetId.equals(target.getId())) {
          return target;
        }
      }
    }
    return null;
  }
  return DefaultExecutionTarget.INSTANCE;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:AbstractImportTestsAction.java

示例2: setupRootModel

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Override
public void setupRootModel(ModifiableRootModel rootModel) throws ConfigurationException {
    setJavaRootModel(rootModel);

    Project project = rootModel.getProject();
    RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(project);

    //Create "Run dub" configuration
    RunnerAndConfigurationSettings runDubSettings = runManager.findConfigurationByName(RUN_DUB_CONFIG_NAME);
    if(runDubSettings == null) {
        final DLangRunDubConfigurationType configurationType
                = Extensions.findExtension(ConfigurationType.CONFIGURATION_TYPE_EP, DLangRunDubConfigurationType.class);
        final ConfigurationFactory factory = configurationType.getConfigurationFactories()[0];
        runDubSettings = runManager.createRunConfiguration(RUN_DUB_CONFIG_NAME, factory);
        ((ModuleBasedConfiguration) runDubSettings.getConfiguration()).setModule(rootModel.getModule());

        runManager.addConfiguration(runDubSettings, false);
    }
}
 
开发者ID:shekn-itrtch,项目名称:DLangPlugin,代码行数:20,代码来源:DLangDubModuleBuilder.java

示例3: update

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Override
public void update(AnActionEvent event) {
  Editor editor = EDITOR.getData(event.getDataContext());
  if (editor == null) {
    return;
  }
  RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(editor.getProject());
  for (RunConfiguration runConfiguration : runManager.getAllConfigurations()) {
    if (runConfiguration instanceof CloudDebugRunConfiguration) {
      event.getPresentation().setVisible(true);
      return;
    }
  }

  event.getPresentation().setVisible(false);
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:17,代码来源:ToggleSnapshotLocationAction.java

示例4: createNewConfiguration

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
private void createNewConfiguration(Project project) {
  final RunManagerImpl manager = RunManagerImpl.getInstanceImpl(project);

  final ConfigurationFactory factory =
      configType != null ? configType.getConfigurationFactories()[0] : null;

  EditConfigurationsDialog dialog = new EditConfigurationsDialog(project, factory);

  if (dialog.showAndGet()) {
    RunnerAndConfigurationSettings settings = manager.getSelectedConfiguration();

    if (settings != null) {
      manager.addConfiguration(settings, false /*isShared*/);
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:17,代码来源:CloudToolsRunConfigurationAction.java

示例5: getTarget

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
public ExecutionTarget getTarget() {
  if (myTargetId != null) {
    if (DefaultExecutionTarget.INSTANCE.getId().equals(myTargetId)) {
      return DefaultExecutionTarget.INSTANCE;
    }
    final RunnerAndConfigurationSettingsImpl settings =
            new RunnerAndConfigurationSettingsImpl(RunManagerImpl.getInstanceImpl(myProject), myConfiguration, false);
    for (ExecutionTargetProvider provider : Extensions.getExtensions(ExecutionTargetProvider.EXTENSION_NAME)) {
      for (ExecutionTarget target : provider.getTargets(myProject, settings)) {
        if (myTargetId.equals(target.getId())) {
          return target;
        }
      }
    }
    return null;
  }
  return DefaultExecutionTarget.INSTANCE;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:AbstractImportTestsAction.java

示例6: loadConfigurations

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
public static List<RunConfiguration> loadConfigurations(State state, Project project) {
  List<RunConfiguration> configurations = ContainerUtil.newArrayList();
  RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(project);
  List<RunConfigurationDescriptor> descriptors = ContainerUtil.notNullize(state.myEnabledRunConfigurations);
  for (RunConfigurationDescriptor descriptor : descriptors) {
    if (descriptor.myType != null && descriptor.myName != null) {
      RunnerAndConfigurationSettings settings = runManager.findConfigurationByTypeAndName(descriptor.myType,
                                                                                          descriptor.myName);
      RunConfiguration configuration = settings != null ? settings.getConfiguration() : null;
      if (configuration != null) {
        configurations.add(configuration);
      }
    }
  }
  return configurations;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:AbstractAutoTestManager.java

示例7: removeMake

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
private void removeMake(final Project project) {
    final RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(project);
    if (runManager == null) {
        return;
    }
    final AntRunConfigurationType antRunConfigurationType = ConfigurationTypeUtil.findConfigurationType(
        AntRunConfigurationType.class);
    final ConfigurationFactory configurationFactory = antRunConfigurationType.getConfigurationFactories()[0];
    final RunnerAndConfigurationSettings template = runManager.getConfigurationTemplate(configurationFactory);
    final AntRunConfiguration runConfiguration = (AntRunConfiguration) template.getConfiguration();
    runManager.setBeforeRunTasks(runConfiguration, Collections.<BeforeRunTask>emptyList(), false);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:13,代码来源:DefaultAntConfigurator.java

示例8: configure

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Override
public void configure(
    @NotNull final HybrisProjectDescriptor hybrisProjectDescriptor,
    @NotNull final Project project
) {

    final RunManagerImpl runManager = RunManagerImpl.getInstanceImpl(project);
    if (runManager == null) {
        return;
    }

    createRemoteDebug(runManager, hybrisProjectDescriptor);
}
 
开发者ID:AlexanderBartash,项目名称:hybris-integration-intellij-idea-plugin,代码行数:14,代码来源:DebugRunConfigurationConfigurator.java

示例9: CompoundRunConfigurationSettingsEditor

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
public CompoundRunConfigurationSettingsEditor(@NotNull Project project) {
  myRunManager = RunManagerImpl.getInstanceImpl(project);
  myModel = new SortedListModel<RunConfiguration>(CompoundRunConfiguration.COMPARATOR);
  myList = new JBList(myModel);
  myList.setCellRenderer(new ColoredListCellRenderer() {
    @Override
    protected void customizeCellRenderer(JList list, Object value, int index, boolean selected, boolean hasFocus) {
      RunConfiguration configuration = myModel.get(index);
      setIcon(configuration.getType().getIcon());
      append(configuration.getType().getDisplayName() + " '" + configuration.getName() + "'");
    }
  });
  myList.setVisibleRowCount(15);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:CompoundRunConfigurationSettingsEditor.java

示例10: initIfNeed

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
private void initIfNeed() {
  if (myInitialized) return;
  mySetToRun.clear();
  RunManagerImpl manager = RunManagerImpl.getInstanceImpl(getProject());
  for (Pair<String, String> pair : myPairs) {
    RunnerAndConfigurationSettings settings = manager.findConfigurationByTypeAndName(pair.first, pair.second);
    if (settings != null && settings.getConfiguration() != this) {
      mySetToRun.add(settings.getConfiguration());
    }
  }
  myInitialized = true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:CompoundRunConfiguration.java

示例11: createConfiguration

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Nullable
private static ConfigurationFromContext createConfiguration(RunConfigurationProducer<?> producer,
                                                            ConfigurationContext context) {
  RunConfiguration configuration = producer.createLightConfiguration(context);
  if (configuration == null) return null;
  RunnerAndConfigurationSettingsImpl
    settings = new RunnerAndConfigurationSettingsImpl(RunManagerImpl.getInstanceImpl(context.getProject()), configuration, false);
  return new ConfigurationFromContextImpl(producer, settings, context.getPsiLocation());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:10,代码来源:ExecutorAction.java

示例12: findExisting

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
/**
 * Deserializes the configuration represented by the given XML element, then searches for an
 * existing run configuration in the project with the same name and type.
 */
@Nullable
@VisibleForTesting
static RunnerAndConfigurationSettings findExisting(Project project, Element element)
    throws InvalidDataException {
  RunManagerImpl manager = RunManagerImpl.getInstanceImpl(project);
  RunnerAndConfigurationSettingsImpl settings = new RunnerAndConfigurationSettingsImpl(manager);
  RunnerAndConfigurationSettingsCompatUtils.readConfiguration(settings, element);
  RunConfiguration config = settings.getConfiguration();
  if (config == null) {
    return null;
  }
  return manager.findConfigurationByTypeAndName(config.getType().getId(), config.getName());
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:18,代码来源:RunConfigurationSerializer.java

示例13: doSetup

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Before
public final void doSetup() {
  runManager = RunManagerImpl.getInstanceImpl(getProject());
  // Without BlazeProjectData, the configuration editor is always disabled.
  BlazeProjectDataManager mockProjectDataManager =
      new MockBlazeProjectDataManager(MockBlazeProjectDataBuilder.builder(workspaceRoot).build());
  registerProjectService(BlazeProjectDataManager.class, mockProjectDataManager);
  type = BlazeCommandRunConfigurationType.getInstance();

  RunnerAndConfigurationSettings runnerAndConfigurationSettings =
      runManager.createConfiguration("Blaze Configuration", type.getFactory());
  runManager.addConfiguration(runnerAndConfigurationSettings, false);
  configuration =
      (BlazeCommandRunConfiguration) runnerAndConfigurationSettings.getConfiguration();
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:16,代码来源:BlazeCommandRunConfigurationRunManagerImplTest.java

示例14: CompoundRunConfigurationSettingsEditor

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
public CompoundRunConfigurationSettingsEditor(@Nonnull Project project) {
  myRunManager = RunManagerImpl.getInstanceImpl(project);
  myModel = new SortedListModel<>(CompoundRunConfiguration.COMPARATOR);
  myList = new JBList(myModel);
  myList.setCellRenderer(new ColoredListCellRenderer() {
    @Override
    protected void customizeCellRenderer(@Nonnull JList list, Object value, int index, boolean selected, boolean hasFocus) {
      RunConfiguration configuration = myModel.get(index);
      setIcon(configuration.getType().getIcon());
      append(configuration.getType().getDisplayName() + " '" + configuration.getName() + "'");
    }
  });
  myList.setVisibleRowCount(15);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:15,代码来源:CompoundRunConfigurationSettingsEditor.java

示例15: createConfiguration

import com.intellij.execution.impl.RunManagerImpl; //导入方法依赖的package包/类
@Nullable
private static ConfigurationFromContext createConfiguration(RunConfigurationProducer<?> producer,
                                                            ConfigurationContext context) {
  RunConfiguration configuration = producer.createLightConfiguration(context);
  if (configuration == null) return null;
  RunnerAndConfigurationSettingsImpl
          settings = new RunnerAndConfigurationSettingsImpl(RunManagerImpl.getInstanceImpl(context.getProject()), configuration, false);
  return new ConfigurationFromContextImpl(producer, settings, context.getPsiLocation());
}
 
开发者ID:consulo,项目名称:consulo,代码行数:10,代码来源:ExecutorAction.java


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