void (char completionChar) { Runnable command = () -> { LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(myEditor); assertNotNull(lookup); lookup.finishLookup(completionChar); }; CommandProcessor.getInstance().executeCommand(myProject, command, null, null, myEditor.getDocument()); }