mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
don't display progress icon when the completion takes little time
This commit is contained in:
@@ -230,7 +230,18 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable
|
||||
|
||||
public void setCalculating(final boolean calculating) {
|
||||
myCalculating = calculating;
|
||||
myIconPanel.setVisible(calculating);
|
||||
Runnable setVisible = new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
myIconPanel.setVisible(myCalculating);
|
||||
}
|
||||
};
|
||||
if (myCalculating) {
|
||||
new Alarm().addRequest(setVisible, 100);
|
||||
} else {
|
||||
setVisible.run();
|
||||
}
|
||||
|
||||
if (calculating) {
|
||||
myProcessIcon.resume();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user