本文整理汇总了Java中com.intellij.openapi.wm.ToolWindowId.DEBUG属性的典型用法代码示例。如果您正苦于以下问题:Java ToolWindowId.DEBUG属性的具体用法?Java ToolWindowId.DEBUG怎么用?Java ToolWindowId.DEBUG使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.intellij.openapi.wm.ToolWindowId
的用法示例。
在下文中一共展示了ToolWindowId.DEBUG属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
示例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);
}
示例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);
}
示例4: getToolWindowId
public String getToolWindowId() {
return ToolWindowId.DEBUG;
}
示例5: getToolWindowId
@Override
public String getToolWindowId() {
return ToolWindowId.DEBUG;
}
示例6: 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;
}