void (@NotNull LookupElement item, final char completionChar) { final LookupImpl lookup = getLookup(); lookup.setCurrentItem(item); if (LookupEvent.isSpecialCompletionChar(completionChar)) { lookup.finishLookup(completionChar); } else { type(completionChar); } NonBlockingReadActionImpl.waitForAsyncTaskCompletion(); }