mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
tolerate invalid lookup elements (EA-36054)
This commit is contained in:
@@ -160,10 +160,9 @@ public class TargetElementUtilBase {
|
||||
if (activeLookup != null && (flags & LOOKUP_ITEM_ACCEPTED) != 0) {
|
||||
LookupElement item = activeLookup.getCurrentItem();
|
||||
final PsiElement psi = item == null ? null : CompletionUtil.getTargetElement(item);
|
||||
if (psi != null && !psi.isValid()) {
|
||||
throw new AssertionError("Invalid element in lookup: item=" + item);
|
||||
if (psi != null && psi.isValid()) {
|
||||
return psi;
|
||||
}
|
||||
return psi;
|
||||
}
|
||||
|
||||
Document document = editor.getDocument();
|
||||
|
||||
Reference in New Issue
Block a user