boolean (@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; }