mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show definitions: cancel update after success
This commit is contained in:
+1
-1
@@ -354,7 +354,7 @@ public class ShowImplementationsAction extends AnAction implements PopupAction {
|
||||
|
||||
@Override
|
||||
public void onSuccess() {
|
||||
if (!isCanceled()) {
|
||||
if (!setCanceled()) {
|
||||
myComponent.update(myElements, myComponent.getIndex());
|
||||
}
|
||||
super.onSuccess();
|
||||
|
||||
+3
-5
@@ -78,12 +78,10 @@ public abstract class BackgroundUpdaterTask<T> extends Task.Backgroundable {
|
||||
protected abstract void replaceModel(List<PsiElement> data);
|
||||
protected abstract void paintBusy(boolean paintBusy);
|
||||
|
||||
public void setCanceled() {
|
||||
public boolean setCanceled() {
|
||||
boolean canceled = myCanceled;
|
||||
myCanceled = true;
|
||||
}
|
||||
|
||||
public boolean isCanceled() {
|
||||
return myCanceled;
|
||||
return canceled;
|
||||
}
|
||||
|
||||
public void updateComponent(PsiElement element, @Nullable final Comparator comparator) {
|
||||
|
||||
Reference in New Issue
Block a user