mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
navigation: don't show notification that nothing was found after cancel of the modal progress (IDEA-157671)
This commit is contained in:
@@ -571,6 +571,9 @@ public class CtrlMouseHandler extends AbstractProjectComponent {
|
||||
return PsiUtilCore.toPsiElementArray(found);
|
||||
}
|
||||
}.searchImplementations(editor, element, offset);
|
||||
if (targetElements == null) {
|
||||
return null;
|
||||
}
|
||||
if (targetElements.length > 1) {
|
||||
PsiElement elementAtPointer = file.findElementAt(offset);
|
||||
if (elementAtPointer != null) {
|
||||
|
||||
+1
@@ -61,6 +61,7 @@ public class GotoImplementationHandler extends GotoTargetHandler {
|
||||
return false;
|
||||
}
|
||||
}.searchImplementations(editor, source, offset);
|
||||
if (targets == null) return null;
|
||||
GotoData gotoData = new GotoData(source, targets, Collections.emptyList());
|
||||
gotoData.listUpdaterTask = new ImplementationsUpdaterTask(gotoData, editor, offset, reference);
|
||||
return gotoData;
|
||||
|
||||
+3
-3
@@ -40,7 +40,7 @@ public class ImplementationSearcher {
|
||||
|
||||
public static final String SEARCHING_FOR_IMPLEMENTATIONS = CodeInsightBundle.message("searching.for.implementations");
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
PsiElement[] searchImplementations(final Editor editor, final PsiElement element, final int offset) {
|
||||
final TargetElementUtil targetElementUtil = TargetElementUtil.getInstance();
|
||||
boolean onRef = ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
|
||||
@@ -57,14 +57,14 @@ public class ImplementationSearcher {
|
||||
}), onRef);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Nullable
|
||||
public PsiElement[] searchImplementations(final PsiElement element,
|
||||
final Editor editor, final int offset,
|
||||
final boolean includeSelfAlways,
|
||||
final boolean includeSelfIfNoOthers) {
|
||||
if (element == null) return PsiElement.EMPTY_ARRAY;
|
||||
final PsiElement[] elements = searchDefinitions(element, editor);
|
||||
if (elements == null) return PsiElement.EMPTY_ARRAY; //the search has been cancelled
|
||||
if (elements == null) return null; //the search has been cancelled
|
||||
if (elements.length > 0) {
|
||||
if (!includeSelfAlways) return filterElements(element, elements, offset);
|
||||
final PsiElement[] all;
|
||||
|
||||
Reference in New Issue
Block a user