mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
a registry key for IDEA-83547 "Show implementations" does not show derived interfaces
This commit is contained in:
+6
-1
@@ -17,6 +17,7 @@ package com.intellij.codeInsight.navigation;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.util.Computable;
|
||||
import com.intellij.openapi.util.registry.Registry;
|
||||
import com.intellij.psi.PsiClass;
|
||||
import com.intellij.psi.PsiElement;
|
||||
import com.intellij.psi.search.PsiElementProcessor;
|
||||
@@ -33,6 +34,7 @@ public class ClassImplementationsSearch implements QueryExecutor<PsiElement, Psi
|
||||
}
|
||||
|
||||
public static boolean processImplementations(final PsiClass psiClass, final Processor<? super PsiClass> processor) {
|
||||
final boolean showInterfaces = Registry.is("ide.goto.implementation.show.interfaces");
|
||||
return ClassInheritorsSearch.search(psiClass, ApplicationManager.getApplication().runReadAction(new Computable<SearchScope>() {
|
||||
@Override
|
||||
public SearchScope compute() {
|
||||
@@ -40,7 +42,10 @@ public class ClassImplementationsSearch implements QueryExecutor<PsiElement, Psi
|
||||
}
|
||||
}), true).forEach(new PsiElementProcessorAdapter<PsiClass>(new PsiElementProcessor<PsiClass>() {
|
||||
public boolean execute(@NotNull PsiClass element) {
|
||||
return element.isInterface() || processor.process(element);
|
||||
if (!showInterfaces && element.isInterface()) {
|
||||
return true;
|
||||
}
|
||||
return processor.process(element);
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -206,3 +206,6 @@ python.exported.names.local.cache=false
|
||||
|
||||
ide.use.nautilus3=true
|
||||
ide.use.nautilus3.description=Use Nautilus if available
|
||||
|
||||
ide.goto.implementation.show.interfaces=false
|
||||
ide.goto.implementation.show.interfaces.description=Whether to show sub-interfaces when invoking Goto Implementation (Ctrl+Alt+B) on an interface
|
||||
Reference in New Issue
Block a user