mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
can't find Kotlin top-level function in SE
This commit is contained in:
@@ -1682,7 +1682,7 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
myProgressIndicator, new Processor<Object>() {
|
||||
@Override
|
||||
public boolean process(Object o) {
|
||||
if (o instanceof PsiElement && !(((PsiElement)o).getParent() instanceof PsiFile)) {
|
||||
if (isSymbol(o)) {
|
||||
final PsiElement element = (PsiElement)o;
|
||||
final PsiFile file = element.getContainingFile();
|
||||
if (!myListModel.contains(o) && !symbols.contains(o) &&
|
||||
@@ -1698,6 +1698,16 @@ public class SearchEverywhereAction extends AnAction implements CustomComponentA
|
||||
return symbols;
|
||||
}
|
||||
|
||||
protected boolean isSymbol(Object o) {
|
||||
if (o instanceof PsiElement) {
|
||||
final PsiElement e = (PsiElement)o;
|
||||
//todo[kb] need a better way to avoid mixing java classes with symbols. Same to other languages where
|
||||
//todo[kb] symbol provider returns classes. We need kind of suppressor API & EP here.
|
||||
return !e.getLanguage().is(Language.findLanguageByID("JAVA")) || !(e.getParent() instanceof PsiFile);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private SearchResult getClasses(String pattern, boolean includeLibs, final int max, ChooseByNamePopup chooseByNamePopup) {
|
||||
final SearchResult classes = new SearchResult();
|
||||
if (chooseByNamePopup == null) {
|
||||
|
||||
Reference in New Issue
Block a user