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

Java RunManagerEx类代码示例

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

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



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

示例1: testReusingConfiguration

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public void testReusingConfiguration() {
  RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
  PsiClass psiClass = findClass(getModule1(), CLASS_NAME);
  PsiPackage psiPackage = JUnitUtil.getContainingPackage(psiClass);

  ConfigurationContext context = createContext(psiClass);
  assertEquals(null, context.findExisting());
  RunnerAndConfigurationSettings testClass = context.getConfiguration();
  runManager.addConfiguration(testClass,  false);
  context = createContext(psiClass);
  assertSame(testClass, context.findExisting());

  runManager.setSelectedConfiguration(testClass);
  context = createContext(psiPackage);
  assertEquals(null, context.findExisting());
  RunnerAndConfigurationSettings testPackage = context.getConfiguration();
  runManager.addConfiguration(testPackage,  false);
  context = createContext(psiPackage);
  assertSame(testPackage, context.findExisting());
  assertSame(testClass, runManager.getSelectedConfiguration());
  runManager.setSelectedConfiguration(context.findExisting());
  assertSame(testPackage, runManager.getSelectedConfiguration());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ContextConfigurationTest.java


示例2: BuildArtifactsBeforeRunTaskProvider

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public BuildArtifactsBeforeRunTaskProvider(Project project) {
  myProject = project;
  project.getMessageBus().connect().subscribe(ArtifactManager.TOPIC, new ArtifactAdapter() {
    @Override
    public void artifactRemoved(@NotNull Artifact artifact) {
      final RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
      for (RunConfiguration configuration : runManager.getAllConfigurationsList()) {
        final List<BuildArtifactsBeforeRunTask> tasks = runManager.getBeforeRunTasks(configuration, ID);
        for (BuildArtifactsBeforeRunTask task : tasks) {
          final String artifactName = artifact.getName();
          final List<ArtifactPointer> pointersList = task.getArtifactPointers();
          final ArtifactPointer[] pointers = pointersList.toArray(new ArtifactPointer[pointersList.size()]);
          for (ArtifactPointer pointer : pointers) {
            if (pointer.getArtifactName().equals(artifactName) && ArtifactManager.getInstance(myProject).findArtifact(artifactName) == null) {
              task.removeArtifact(pointer);
            }
          }
        }
      }
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:BuildArtifactsBeforeRunTaskProvider.java


示例3: createAndRunConfiguration

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Override
public void createAndRunConfiguration(@NotNull ServerType<?> serverType, @Nullable RemoteServer<?> remoteServer) {
  DeployToServerConfigurationType configurationType = DeployToServerConfigurationTypesRegistrar.getDeployConfigurationType(serverType);
  RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
  ConfigurationFactoryEx factory = configurationType.getFactory();
  RunnerAndConfigurationSettings settings = runManager.createRunConfiguration(configurationType.getDisplayName(), factory);
  factory.onNewConfigurationCreated(settings.getConfiguration());
  DeployToServerRunConfiguration<?, ?> runConfiguration = (DeployToServerRunConfiguration<?, ?>)settings.getConfiguration();
  if (remoteServer != null) {
    runConfiguration.setServerName(remoteServer.getName());
  }
  if (RunDialog.editConfiguration(myProject, settings, "Create Deployment Configuration",
                                  DefaultRunExecutor.getRunExecutorInstance())) {
    runManager.addConfiguration(settings, runManager.isConfigurationShared(settings), runManager.getBeforeRunTasks(runConfiguration),
                                false);
    runManager.setSelectedConfiguration(settings);
    ProgramRunnerUtil.executeConfiguration(myProject, settings, DefaultRunExecutor.getRunExecutorInstance());
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:DeploymentConfigurationManagerImpl.java


示例4: attach

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public void attach() {
  myMap.clear();

  for (ExternalSystemManager<?, ?, ?, ?, ?> systemManager : ExternalSystemApiUtil.getAllManagers()) {
    final AbstractExternalSystemTaskConfigurationType configurationType =
      ExternalSystemUtil.findConfigurationType(systemManager.getSystemId());
    if (configurationType == null) continue;
    final List<RunnerAndConfigurationSettings> configurationSettingsList =
      RunManager.getInstance(myManager.getProject()).getConfigurationSettingsList(configurationType);
    for (RunnerAndConfigurationSettings configurationSettings : configurationSettingsList) {
      add(myMap, configurationSettings);
    }
  }

  ((RunManagerEx)RunManager.getInstance(myManager.getProject())).addRunManagerListener(this);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ExternalSystemRunManagerListener.java


示例5: createConfigurationByElement

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Nullable
@Override
protected RunnerAndConfigurationSettings createConfigurationByElement(Location location, ConfigurationContext context) {
  if (!(location instanceof ExternalSystemTaskLocation)) {
    return null;
  }
  
  ExternalSystemTaskLocation taskLocation = (ExternalSystemTaskLocation)location;
  mySourceElement = taskLocation.getPsiElement();

  RunManagerEx runManager = RunManagerEx.getInstanceEx(taskLocation.getProject());
  RunnerAndConfigurationSettings settings = runManager.createConfiguration("", getConfigurationFactory());
  ExternalSystemRunConfiguration configuration = (ExternalSystemRunConfiguration)settings.getConfiguration();
  ExternalSystemTaskExecutionSettings taskExecutionSettings = configuration.getSettings();
  ExternalTaskExecutionInfo task = taskLocation.getTaskInfo();
  taskExecutionSettings.setExternalProjectPath(task.getSettings().getExternalProjectPath());
  taskExecutionSettings.setTaskNames(task.getSettings().getTaskNames());
  configuration.setName(AbstractExternalSystemTaskConfigurationType.generateName(location.getProject(), taskExecutionSettings));
  return settings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:AbstractExternalSystemRuntimeConfigurationProducer.java


示例6: perform

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Override
protected void perform(@NotNull Project project,
                       @NotNull ProjectSystemId projectSystemId,
                       @NotNull TaskData taskData,
                       @NotNull AnActionEvent e) {
  final ExternalTaskExecutionInfo taskExecutionInfo = ExternalSystemActionUtil.buildTaskInfo(taskData);
  ExternalSystemUtil.runTask(taskExecutionInfo.getSettings(), taskExecutionInfo.getExecutorId(), project, projectSystemId);

  final DataContext dataContext = e.getDataContext();
  final ConfigurationContext context = ConfigurationContext.getFromContext(dataContext);
  RunnerAndConfigurationSettings configuration = context.findExisting();
  RunManagerEx runManager = (RunManagerEx)context.getRunManager();
  if (configuration == null) {
    configuration = context.getConfiguration();
    if (configuration == null) {
      return;
    }
    runManager.setTemporaryConfiguration(configuration);
  }
  runManager.setSelectedConfiguration(configuration);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:RunExternalSystemTaskAction.java


示例7: PyModuleListener

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public PyModuleListener(MessageBus messageBus) {
  messageBus.connect().subscribe(ProjectTopics.MODULES, new ModuleAdapter() {
    @Override
    public void beforeModuleRemoved(@NotNull Project project, @NotNull Module module) {
      final RunManagerEx runManager = RunManagerEx.getInstanceEx(project);
      final Collection<RunnerAndConfigurationSettings> configurations = new ArrayList<RunnerAndConfigurationSettings>(runManager.getSortedConfigurations());
      for (RunnerAndConfigurationSettings configuration : configurations) {
        if (configuration.getConfiguration() instanceof AbstractPythonRunConfiguration) {
          final Module configModule = ((AbstractPythonRunConfiguration)configuration.getConfiguration()).getModule();
          if (configModule == module) {
            runManager.removeConfiguration(configuration);
          }
        }
      }
    }
  });    
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyModuleListener.java


示例8: isConfigurationByLocation

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public boolean isConfigurationByLocation(RunConfiguration runConfiguration, Location location) {
    TestNGConfiguration config = (TestNGConfiguration) runConfiguration;
    TestData testobject = config.getPersistantData();
    if (testobject == null)
        return false;
    else {
      final PsiElement element = location.getPsiElement();
      final TestNGTestObject testNGTestObject = TestNGTestObject.fromConfig(config);
      if (testNGTestObject != null && testNGTestObject.isConfiguredByElement(element)) {
        final Module configurationModule = config.getConfigurationModule().getModule();
        if (Comparing.equal(location.getModule(), configurationModule)) return true;

        final Module predefinedModule =
          ((TestNGConfiguration)RunManagerEx.getInstanceEx(location.getProject()).getConfigurationTemplate(myFactory)
            .getConfiguration()).getConfigurationModule().getModule();
        return Comparing.equal(predefinedModule, configurationModule);

      }
      else {
        return false;
      }
    }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:TestNGConfigurationType.java


示例9: getDescription

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public String getDescription(MavenProject project, String goal) {
  List<String> result = new ArrayList<String>();
  MavenCompilerTask compilerTask = new MavenCompilerTask(project.getPath(), goal);
  synchronized (this) {
    for (Phase phase : Phase.values()) {
      if (myState.getTasks(phase).contains(compilerTask)) {
        result.add(TasksBundle.message(phase.myMessageKey));
      }
    }
  }
  RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
  for (MavenBeforeRunTask each : runManager.getBeforeRunTasks(MavenBeforeRunTasksProvider.ID)) {
    if (each.isFor(project, goal)) {
      result.add(TasksBundle.message("maven.tasks.goal.before.run"));
      break;
    }
  }

  return StringUtil.join(result, ", ");
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:MavenTasksManager.java


示例10: createConfiguration

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Nullable
private RunnerAndConfigurationSettings createConfiguration(@Nullable final PsiClass aClass) {
  if (aClass == null) return null;

  final Project project = aClass.getProject();
  RunnerAndConfigurationSettings settings = RunManagerEx.getInstanceEx(project).createConfiguration("", getConfigurationFactory());
  final GroovyScriptRunConfiguration configuration = (GroovyScriptRunConfiguration)settings.getConfiguration();
  final PsiFile file = aClass.getContainingFile().getOriginalFile();
  final PsiDirectory dir = file.getContainingDirectory();
  if (dir != null) {
    configuration.setWorkDir(dir.getVirtualFile().getPath());
  }
  final VirtualFile vFile = file.getVirtualFile();
  if (vFile == null) return null;
  String path = ScriptFileUtil.getScriptFilePath(vFile);
  configuration.setScriptPath(path);
  RunConfigurationModule module = configuration.getConfigurationModule();

  String name = GroovyRunnerUtil.getConfigurationName(aClass, module);
  configuration.setName(StringUtil.isEmpty(name) ? vFile.getName() : name);
  configuration.setModule(JavaExecutionUtil.findModule(aClass));
  return settings;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:GroovyScriptRunConfigurationProducer.java


示例11: addConfigurations

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
private void addConfigurations() {
  RunManagerImpl runManager = (RunManagerImpl) RunManagerEx.getInstanceEx(project);
  BlazeCommandRunConfigurationType.BlazeCommandRunConfigurationFactory configurationFactory =
      BlazeCommandRunConfigurationType.getInstance().getFactory();

  BlazeCommandRunConfiguration blazeAndroidBinaryConfiguration =
      configurationFactory.createTemplateConfiguration(project);
  blazeAndroidBinaryConfiguration.setName("AndroidBinaryConfiguration");
  blazeAndroidBinaryConfiguration.setTarget(Label.create("//label:android_binary_rule"));

  BlazeCommandRunConfiguration blazeAndroidTestConfiguration =
      configurationFactory.createTemplateConfiguration(project);
  blazeAndroidTestConfiguration.setName("AndroidTestConfiguration");
  blazeAndroidTestConfiguration.setTarget(Label.create("//label:android_test_rule"));

  runManager.addConfiguration(
      runManager.createConfiguration(blazeAndroidBinaryConfiguration, configurationFactory),
      true);
  runManager.addConfiguration(
      runManager.createConfiguration(blazeAndroidTestConfiguration, configurationFactory), true);
}
 
开发者ID:bazelbuild,项目名称:intellij,代码行数:22,代码来源:BlazeConfigurationsTest.java


示例12: setBuildBeforeRunTask

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
/**
 * Creates a pre-deploy task ({@link BeforeRunTask}) for the given build-system and attaches it to
 * this module deployment source type. Invoked when a new deployment configuration is created.
 *
 * <p>Provides the common functionality for creating the build-system packaging task, delegating
 * build-system specific functions to the concrete sub-types.
 *
 * <p>Only creates a new task if one is not already configured.
 */
@Override
public void setBuildBeforeRunTask(
    @NotNull RunConfiguration configuration, @NotNull ModuleDeploymentSource source) {

  Module module = source.getModule();

  if (module == null) {
    return;
  }

  setConfiguration(configuration);

  RunManagerEx runManager = RunManagerEx.getInstanceEx(configuration.getProject());
  final Collection<? extends BeforeRunTask> buildTasks = getBuildTasks(runManager, configuration);

  if (!hasBuildTaskForModule(buildTasks, module)) {
    BeforeRunTask buildTask = createBuildTask(module);
    if (buildTask != null) {
      List<BeforeRunTask> tasks = runManager.getBeforeRunTasks(configuration);
      ImmutableList<BeforeRunTask> newTaskList =
          ImmutableList.<BeforeRunTask>builder().addAll(tasks).add(buildTask).build();
      runManager.setBeforeRunTasks(configuration, newTaskList, true);
    }
  }
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:35,代码来源:BuildDeploymentSourceType.java


示例13: performAction

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Override
protected void performAction(AnActionEvent e) {
	Project project = e.getProject();
	if (project == null) {
		throw new NotificationException("No project found", "Are you in any project?");
	}

	RunManagerEx runManager = RunManagerEx.getInstanceEx(project);
	RunnerAndConfigurationSettings selectedConfiguration = runManager.getSelectedConfiguration();
	if (selectedConfiguration == null) {
		return;
	}
	RunConfiguration configuration = selectedConfiguration.getConfiguration();
	if (configuration instanceof TaskConfiguration) {
		removeFiles(project, (TaskConfiguration) configuration);
		runManager.removeConfiguration(selectedConfiguration);
		selectSomeTaskConfiguration(runManager);
	}
	else {
		Notificator.showNotification(
				"Not a JHelper configuration",
				"To delete a configuration you should choose it first",
				NotificationType.WARNING
		);
	}
}
 
开发者ID:AlexeyDmitriev,项目名称:JHelper,代码行数:27,代码来源:DeleteTaskAction.java


示例14: BuildArtifactsBeforeRunTaskProvider

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public BuildArtifactsBeforeRunTaskProvider(Project project) {
  myProject = project;
  project.getMessageBus().connect().subscribe(ArtifactManager.TOPIC, new ArtifactAdapter() {
    @Override
    public void artifactRemoved(@NotNull Artifact artifact) {
      final RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
      for (RunConfiguration configuration : runManager.getAllConfigurations()) {
        final List<BuildArtifactsBeforeRunTask> tasks = runManager.getBeforeRunTasks(configuration, ID);
        for (BuildArtifactsBeforeRunTask task : tasks) {
          final String artifactName = artifact.getName();
          final List<ArtifactPointer> pointersList = task.getArtifactPointers();
          final ArtifactPointer[] pointers = pointersList.toArray(new ArtifactPointer[pointersList.size()]);
          for (ArtifactPointer pointer : pointers) {
            if (pointer.getArtifactName().equals(artifactName) && ArtifactManager.getInstance(myProject).findArtifact(artifactName) == null) {
              task.removeArtifact(pointer);
            }
          }
        }
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:BuildArtifactsBeforeRunTaskProvider.java


示例15: findExistingByElement

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Override
protected RunnerAndConfigurationSettings findExistingByElement(Location location,
                                                               @NotNull RunnerAndConfigurationSettings[] existingConfigurations,
                                                               ConfigurationContext context) {
  final TestNGConfiguration testNGConfiguration =
    (TestNGConfiguration)context.getOriginalConfiguration(TestNGConfigurationType.getInstance());
  final String vmParameters = testNGConfiguration != null ? testNGConfiguration.getVMParameters() : null;
  final Module predefinedModule =
            ((TestNGConfiguration)((RunManagerImpl)RunManagerEx.getInstanceEx(location.getProject()))
              .getConfigurationTemplate(getConfigurationFactory())
              .getConfiguration()).getConfigurationModule().getModule();
  for (RunnerAndConfigurationSettings existingConfiguration : existingConfigurations) {
    TestNGConfiguration config = (TestNGConfiguration)existingConfiguration.getConfiguration();
    if (vmParameters != null && !Comparing.strEqual(config.getVMParameters(), vmParameters)) continue;
    TestData testobject = config.getPersistantData();
    if (testobject != null){
      final PsiElement element = location.getPsiElement();
      if (testobject.isConfiguredByElement(element)) {
        final Module configurationModule = config.getConfigurationModule().getModule();
        if (Comparing.equal(location.getModule(), configurationModule)) return existingConfiguration;
        if (Comparing.equal(predefinedModule, configurationModule)) return existingConfiguration;
      }
    }
  }
  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:TestNGConfigurationProducer.java


示例16: isConfigurationByLocation

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public boolean isConfigurationByLocation(RunConfiguration runConfiguration, Location location) {
    TestNGConfiguration config = (TestNGConfiguration) runConfiguration;
    TestData testobject = config.getPersistantData();
    if (testobject == null)
        return false;
    else {
      final PsiElement element = location.getPsiElement();
      if (testobject.isConfiguredByElement(element)) {
        final Module configurationModule = config.getConfigurationModule().getModule();
        if (Comparing.equal(location.getModule(), configurationModule)) return true;

        final Module predefinedModule =
          ((TestNGConfiguration)((RunManagerImpl)RunManagerEx.getInstanceEx(location.getProject())).getConfigurationTemplate(myFactory)
            .getConfiguration()).getConfigurationModule().getModule();
        return Comparing.equal(predefinedModule, configurationModule);

      }
      else {
        return false;
      }
    }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:TestNGConfigurationType.java


示例17: getDescription

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
public String getDescription(MavenProject project, String goal) {
  List<String> result = new ArrayList<String>();
  MavenCompilerTask compilerTask = new MavenCompilerTask(project.getPath(), goal);
  synchronized (this) {
    if (myState.beforeCompileTasks.contains(compilerTask)) {
      result.add(TasksBundle.message("maven.tasks.goal.before.compile"));
    }
    if (myState.afterCompileTasks.contains(compilerTask)) {
      result.add(TasksBundle.message("maven.tasks.goal.after.compile"));
    }
  }
  RunManagerEx runManager = RunManagerEx.getInstanceEx(myProject);
  for (MavenBeforeRunTask each : runManager.getBeforeRunTasks(MavenBeforeRunTasksProvider.ID)) {
    if (each.isFor(project, goal)) {
      result.add(TasksBundle.message("maven.tasks.goal.before.run"));
      break;
    }
  }

  return StringUtil.join(result, ", ");
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:MavenTasksManager.java


示例18: ensureRunConfigurationExists

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
protected static void ensureRunConfigurationExists(Module module, ConfigurationType configurationType, String name) {
  final RunManagerEx runManager = RunManagerEx.getInstanceEx(module.getProject());
  for (final RunConfiguration runConfiguration : runManager.getConfigurations(configurationType)) {
    if (runConfiguration instanceof MvcRunConfiguration && ((MvcRunConfiguration)runConfiguration).getModule() == module) {
      return;
    }
  }

  final ConfigurationFactory factory = configurationType.getConfigurationFactories()[0];
  final RunnerAndConfigurationSettings runSettings = runManager.createRunConfiguration(name,
                                                                                                                               factory);
  final MvcRunConfiguration configuration = (MvcRunConfiguration)runSettings.getConfiguration();
  configuration.setModule(module);
  runManager.addConfiguration(runSettings, false);
  runManager.setActiveConfiguration(runSettings);

  RunManagerEx.disableTasks(module.getProject(), configuration, CompileStepBeforeRun.ID, CompileStepBeforeRunNoErrorCheck.ID);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:19,代码来源:MvcFramework.java


示例19: createConfiguration

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Nullable
private RunnerAndConfigurationSettings createConfiguration(@Nullable final PsiClass aClass) {
  if (aClass == null) return null;

  final Project project = aClass.getProject();
  RunnerAndConfigurationSettings settings = RunManagerEx.getInstanceEx(project).createConfiguration("", getConfigurationFactory());
  final GroovyScriptRunConfiguration configuration = (GroovyScriptRunConfiguration)settings.getConfiguration();
  final PsiFile file = aClass.getContainingFile().getOriginalFile();
  final PsiDirectory dir = file.getContainingDirectory();
  if (dir == null) return null;
  configuration.setWorkDir(dir.getVirtualFile().getPath());
  final VirtualFile vFile = file.getVirtualFile();
  if (vFile == null) return null;
  configuration.setScriptPath(vFile.getPath());
  RunConfigurationModule module = configuration.getConfigurationModule();

  String name = GroovyRunnerUtil.getConfigurationName(aClass, module);
  configuration.setName(name);
  configuration.setModule(JavaExecutionUtil.findModule(aClass));
  return settings;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:GroovyScriptRunConfigurationProducer.java


示例20: update

import com.intellij.execution.RunManagerEx; //导入依赖的package包/类
@Override
protected void update(PresentationData presentation) {
  RunnerAndConfigurationSettings configurationSettings = getConfigurationSettings();
  boolean isStored = RunManager.getInstance(getProject()).hasSettings(configurationSettings);
  presentation.addText(configurationSettings.getName(),
                       isStored ? SimpleTextAttributes.REGULAR_ATTRIBUTES : SimpleTextAttributes.GRAY_ATTRIBUTES);
  RunDashboardContributor contributor = RunDashboardContributor.getContributor(configurationSettings.getType());
  Icon icon = null;
  if (contributor != null) {
    DashboardRunConfigurationStatus status = contributor.getStatus(this);
    if (DashboardRunConfigurationStatus.STARTED.equals(status)) {
      icon = getExecutorIcon();
    }
    else if (DashboardRunConfigurationStatus.FAILED.equals(status)) {
      icon = status.getIcon();
    }
  }
  if (icon == null) {
    icon = RunManagerEx.getInstanceEx(getProject()).getConfigurationIcon(configurationSettings);
  }
  presentation.setIcon(isStored ? icon : IconLoader.getDisabledIcon(icon));

  if (contributor != null) {
    contributor.updatePresentation(presentation, this);
  }
}
 
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:RunConfigurationNode.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java PropertiesUtils类代码示例发布时间:2022-05-22
下一篇:
Java ForeignExceptionMessage类代码示例发布时间: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