void (char completion, int index) { if(myActiveLookup == null) throw new RuntimeException("There are no items in this lookup"); final LookupElement lookupItem = myActiveLookup.getItems().get(index); myActiveLookup.setCurrentItem(lookupItem); myActiveLookup.finishLookup(completion); }