JList () { final JList variableChooser = super.createTargetVariableChooser(); new DoubleClickListener() { @Override protected boolean onDoubleClick(@NotNull MouseEvent e) { Point point = e.getPoint(); int index = variableChooser.locationToIndex(point); if (index == -1) return false; if (!variableChooser.getCellBounds(index, index).contains(point)) return false; doRefactorAction(); return true; } }.installOn(variableChooser); return variableChooser; }