mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
do not spam EDT with miserable progress fraction change update
This commit is contained in:
@@ -287,8 +287,12 @@ public class DumbServiceImpl extends DumbService {
|
||||
public void run(@NotNull final ProgressIndicator indicator) {
|
||||
if (indicator instanceof ProgressIndicatorEx) {
|
||||
((ProgressIndicatorEx)indicator).addStateDelegate(new ProgressIndicatorBase() {
|
||||
double lastFraction;
|
||||
|
||||
@Override
|
||||
public void setFraction(final double fraction) {
|
||||
if (fraction - lastFraction < 0.01d) return;
|
||||
lastFraction = fraction;
|
||||
UIUtil.invokeLaterIfNeeded(new Runnable() {
|
||||
public void run() {
|
||||
AppIcon.getInstance().setProgress("indexUpdate", AppIconScheme.Progress.INDEXING, fraction, true);
|
||||
|
||||
Reference in New Issue
Block a user