mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show the notification with a delay to avoid blinking when "too much output" ceases quickly
This commit is contained in:
@@ -723,7 +723,14 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
myTooMuchOfOutput = true;
|
||||
final EditorNotificationPanel comp =
|
||||
new EditorNotificationPanel().text("Too much output to process").icon(AllIcons.General.ExclMark);
|
||||
add(comp, BorderLayout.NORTH);
|
||||
final Alarm tooMuchOutputAlarm = new Alarm();
|
||||
//show the notification with a delay to avoid blinking when "too much output" ceases quickly
|
||||
tooMuchOutputAlarm.addRequest(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
add(comp, BorderLayout.NORTH);
|
||||
}
|
||||
}, 300);
|
||||
performWhenNoDeferredOutput(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -734,6 +741,7 @@ public class ConsoleViewImpl extends JPanel implements ConsoleView, ObservableCo
|
||||
finally {
|
||||
myTooMuchOfOutput = false;
|
||||
remove(comp);
|
||||
tooMuchOutputAlarm.cancelAllRequests();
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user