mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show implementations in background: inherit found elements from first modal search
This commit is contained in:
+6
-2
@@ -81,10 +81,14 @@ public class GotoImplementationHandler extends GotoTargetHandler {
|
||||
@Override
|
||||
public void run(@NotNull ProgressIndicator indicator) {
|
||||
super.run(indicator);
|
||||
for (PsiElement element : myGotoData.targets) {
|
||||
updateComponent(element, createComparator(renderers, myGotoData));
|
||||
}
|
||||
new ImplementationSearcher.BackgroundableImplementationSearcher() {
|
||||
protected void processElement(PsiElement element) {
|
||||
myGotoData.addTarget(element);
|
||||
updateComponent(element, createComparator(renderers, myGotoData));
|
||||
if (myGotoData.addTarget(element)) {
|
||||
updateComponent(element, createComparator(renderers, myGotoData));
|
||||
}
|
||||
}
|
||||
}.searchImplementations(myEditor, myGotoData.source, myOffset);
|
||||
}
|
||||
|
||||
@@ -278,7 +278,8 @@ public abstract class GotoTargetHandler implements CodeInsightActionHandler {
|
||||
return hasDifferentNames;
|
||||
}
|
||||
|
||||
public void addTarget(final PsiElement element) {
|
||||
public boolean addTarget(final PsiElement element) {
|
||||
if (ArrayUtil.find(targets, element) > -1) return false;
|
||||
targets = ArrayUtil.append(targets, element);
|
||||
renderers.put(element, createRenderer(this, element));
|
||||
if (!hasDifferentNames && element instanceof PsiNamedElement) {
|
||||
@@ -291,6 +292,7 @@ public abstract class GotoTargetHandler implements CodeInsightActionHandler {
|
||||
myNames.add(name);
|
||||
hasDifferentNames = myNames.size() > 1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public PsiElementListCellRenderer getRenderer(Object value) {
|
||||
|
||||
Reference in New Issue
Block a user