mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
SSR: can't put elements not present in source in search results
This commit is contained in:
+6
-1
@@ -148,7 +148,12 @@ public class SearchCommand {
|
||||
info = new UsageInfo(parent, startOffset, end - parentStart);
|
||||
}
|
||||
else {
|
||||
info = new UsageInfo(StructuralSearchUtil.getPresentableElement(result.getMatch()));
|
||||
final PsiElement match = StructuralSearchUtil.getPresentableElement(result.getMatch());
|
||||
if (!match.isPhysical()) {
|
||||
// e.g. lambda parameter anonymous type element
|
||||
return;
|
||||
}
|
||||
info = new UsageInfo(match);
|
||||
}
|
||||
|
||||
Usage usage = new UsageInfo2UsageAdapter(info);
|
||||
|
||||
Reference in New Issue
Block a user