void (final int time) { new CodeCompletionHandlerBase(myType).invokeCompletion(getProject(), getEditor(), time); LookupImpl lookup = (LookupImpl)LookupManager.getActiveLookup(getEditor()); myItems = lookup == null ? null : lookup.getItems().toArray(LookupElement.EMPTY_ARRAY); myPrefix = lookup == null ? null : lookup.itemPattern(lookup.getItems().get(0)); }