Search in sources :

Example 1 with GotItMessage

use of com.intellij.ui.GotItMessage in project intellij-community by JetBrains.

the class RerunTestsNotification method doShow.

private static void doShow(@NotNull final ExecutionConsole executionConsole) {
    final Alarm alarm = new Alarm();
    alarm.addRequest(() -> {
        String shortcutText = KeymapUtil.getFirstKeyboardShortcutText(ActionManager.getInstance().getAction(RerunTestsAction.ID));
        if (shortcutText.isEmpty()) {
            return;
        }
        GotItMessage message = GotItMessage.createMessage("Rerun tests with " + shortcutText, "");
        message.setDisposable(executionConsole);
        message.setCallback(() -> PropertiesComponent.getInstance().setValue(KEY, true));
        message.setShowCallout(false);
        Dimension consoleSize = executionConsole.getComponent().getSize();
        message.show(new RelativePoint(executionConsole.getComponent(), new Point(consoleSize.width - 185, consoleSize.height - 60)), Balloon.Position.below);
        Disposer.dispose(alarm);
    }, 1000);
}
Also used : GotItMessage(com.intellij.ui.GotItMessage) Alarm(com.intellij.util.Alarm) RelativePoint(com.intellij.ui.awt.RelativePoint) RelativePoint(com.intellij.ui.awt.RelativePoint)

Aggregations

GotItMessage (com.intellij.ui.GotItMessage)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 Alarm (com.intellij.util.Alarm)1