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


Java ToolWindowId.RUN属性代码示例

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


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

示例1: notifyByBalloon

public static void notifyByBalloon(@NotNull final Project project,
                                   final AbstractTestProxy root,
                                   final TestConsoleProperties properties,
                                   TestResultPresentation testResultPresentation) {
  if (project.isDisposed()) return;
  if (properties == null) return;

  TestStatusListener.notifySuiteFinished(root, properties.getProject());

  final String testRunDebugId = properties.isDebug() ? ToolWindowId.DEBUG : ToolWindowId.RUN;
  final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);

  final String title = testResultPresentation.getTitle();
  final String text = testResultPresentation.getText();
  final String balloonText = testResultPresentation.getBalloonText();
  final MessageType type = testResultPresentation.getType();

  if (!Comparing.strEqual(toolWindowManager.getActiveToolWindowId(), testRunDebugId)) {
    toolWindowManager.notifyByBalloon(testRunDebugId, type, balloonText, null, null);
  }

  NOTIFICATION_GROUP.createNotification(balloonText, type).notify(project);
  SystemNotifications.getInstance().notify("TestRunner", title, text);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:TestsUIUtil.java

示例2: notifyByBalloon

public static void notifyByBalloon(@Nonnull final Project project, final AbstractTestProxy root, final TestConsoleProperties properties, TestResultPresentation testResultPresentation) {
  if (project.isDisposed()) return;
  if (properties == null) return;

  TestStatusListener.notifySuiteFinished(root, properties.getProject());

  final String testRunDebugId = properties.isDebug() ? ToolWindowId.DEBUG : ToolWindowId.RUN;
  final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);

  final String title = testResultPresentation.getTitle();
  final String text = testResultPresentation.getText();
  final String balloonText = testResultPresentation.getBalloonText();
  final MessageType type = testResultPresentation.getType();

  if (!Comparing.strEqual(toolWindowManager.getActiveToolWindowId(), testRunDebugId)) {
    toolWindowManager.notifyByBalloon(testRunDebugId, type, balloonText, null, null);
  }

  NOTIFICATION_GROUP.createNotification(balloonText, type).notify(project);
  SystemNotifications.getInstance().notify("TestRunner", title, text);
}
 
开发者ID:consulo,项目名称:consulo,代码行数:21,代码来源:TestsUIUtil.java

示例3: notifyByBalloon

public static void notifyByBalloon(@NotNull final Project project,
                                   boolean started,
                                   final AbstractTestProxy root,
                                   final TestConsoleProperties properties, 
                                   @Nullable final String comment) {
  if (project.isDisposed()) return;
  if (properties == null) return;

  final String testRunDebugId = properties.isDebug() ? ToolWindowId.DEBUG : ToolWindowId.RUN;
  final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);

  String title;
  String text;
  String balloonText;
  MessageType type;
  TestResultPresentation testResultPresentation = new TestResultPresentation(root, started, comment).getPresentation();
  type = testResultPresentation.getType();
  balloonText = testResultPresentation.getBalloonText();
  title = testResultPresentation.getTitle();
  text = testResultPresentation.getText();

  if (!Comparing.strEqual(toolWindowManager.getActiveToolWindowId(), testRunDebugId)) {
    toolWindowManager.notifyByBalloon(testRunDebugId, type, balloonText, null, null);
  }

  NOTIFICATION_GROUP.createNotification(balloonText, type).notify(project);
  SystemNotifications.getInstance().notify("TestRunner", title, text);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:28,代码来源:TestsUIUtil.java

示例4: getToolWindowId

@Override
public String getToolWindowId() {
  return ToolWindowId.RUN;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:4,代码来源:DefaultRunExecutor.java

示例5: getToolWindowId

public String getToolWindowId() {
  return ToolWindowId.RUN;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:3,代码来源:CoverageExecutor.java

示例6: getToolWindowId

@Override
public String getToolWindowId() {
    return ToolWindowId.RUN;
}
 
开发者ID:artspb,项目名称:idea-pitest,代码行数:4,代码来源:PitestExecutor.java

示例7: getToolWindowId

@Override
public String getToolWindowId() {
    return ToolWindowId.RUN; //put in run menu
}
 
开发者ID:Dynatrace,项目名称:Dynatrace-AppMon-IntelliJ-IDEA-Integration-Plugin,代码行数:4,代码来源:DynatraceExecutor.java

示例8: tryWithAnotherModule

public static <T extends ModuleBasedConfiguration<JavaRunConfigurationModule> & CommonJavaRunConfigurationParameters> boolean tryWithAnotherModule(T configuration, boolean isDebug)
{
	final String packageName = configuration.getPackage();
	if(packageName == null)
	{
		return false;
	}
	final Project project = configuration.getProject();
	final PsiJavaPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(packageName);
	if(aPackage == null)
	{
		return false;
	}
	final Module module = configuration.getConfigurationModule().getModule();
	if(module == null)
	{
		return false;
	}
	final Set<Module> modulesWithPackage = new HashSet<>();
	final PsiDirectory[] directories = aPackage.getDirectories();
	for(PsiDirectory directory : directories)
	{
		final Module currentModule = ModuleUtilCore.findModuleForFile(directory.getVirtualFile(), project);
		if(module != currentModule && currentModule != null)
		{
			modulesWithPackage.add(currentModule);
		}
	}
	if(!modulesWithPackage.isEmpty())
	{
		final String testRunDebugId = isDebug ? ToolWindowId.DEBUG : ToolWindowId.RUN;
		final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project);
		final Function<Module, String> moduleNameRef = module1 ->
		{
			final String moduleName = module1.getName();
			return "<a href=\"" + moduleName + "\">" + moduleName + "</a>";
		};
		String message = "Tests were not found in module \"" + module.getName() + "\".\n" + "Use ";
		if(modulesWithPackage.size() == 1)
		{
			message += "module \"" + moduleNameRef.fun(modulesWithPackage.iterator().next()) + "\" ";
		}
		else
		{
			message += "one of\n" + StringUtil.join(modulesWithPackage, moduleNameRef, "\n") + "\n";
		}
		message += "instead";
		toolWindowManager.notifyByBalloon(testRunDebugId, MessageType.WARNING, message, null, new ResetConfigurationModuleAdapter(configuration, project, isDebug, toolWindowManager,
				testRunDebugId));
		return true;
	}
	return false;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:53,代码来源:ResetConfigurationModuleAdapter.java


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