Object (@NotNull @NonNls String dataId) { if (PlatformCoreDataKeys.SELECTED_ITEM.is(dataId)){ return myList.getSelectedValue(); } if (PlatformCoreDataKeys.SELECTED_ITEMS.is(dataId)){ return myList.getSelectedValues(); } return null; }