com.intellij.ui.SystemNotifications Java Examples
The following examples show how to use
com.intellij.ui.SystemNotifications.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NotificationScope.java From intellij with Apache License 2.0 | 6 votes |
@Override public void onScopeEnd(BlazeContext context) { if (project.isDisposed()) { return; } if (context.isCancelled()) { context.output(new StatusOutput(notificationName + " cancelled")); return; } long duration = System.currentTimeMillis() - startTime; if (duration < NOTIFICATION_THRESHOLD_MS) { return; } String notificationText = !context.hasErrors() ? this.notificationText : this.notificationErrorText; SystemNotifications.getInstance().notify(notificationName, notificationTitle, notificationText); if (context.hasErrors()) { context.output(PrintOutput.error(notificationName + " failed")); } }
Example #2
Source File: TestsUIUtil.java From consulo with Apache License 2.0 | 6 votes |
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); }
Example #3
Source File: BuckPluginNotifications.java From buck with Apache License 2.0 | 5 votes |
public static void notifySystemCommandFinished(String commandName, boolean processExitStatus) { SystemNotifications.getInstance() .notify( GROUP_DISPLAY_ID, StringUtil.capitalize(commandName) + " Finished", processExitStatus ? "Successful" : "Failed"); }
Example #4
Source File: ProgressManagerImpl.java From consulo with Apache License 2.0 | 4 votes |
private static void systemNotify(@Nonnull Task.NotificationInfo info) { SystemNotifications.getInstance().notify(info.getNotificationName(), info.getNotificationTitle(), info.getNotificationText()); }