void () { var currentCompletion = getCompletionService().getCurrentCompletion(); if (currentCompletion != null && currentCompletion.isAutopopupCompletion() && !lookup.isSelectionTouched() && !hasTwoCharsAfterAmp(lookup)) { // Deselect topmost item lookup.getList().setSelectedValue(null, false); ListSelectionModel selectionModel = lookup.getList().getSelectionModel(); selectionModel.setAnchorSelectionIndex(-1); selectionModel.setLeadSelectionIndex(-1); } }