Object (@NotNull String dataId) { if (PlatformDataKeys.PREDEFINED_TEXT.is(dataId)) { return getSearchPattern(); } if (CommonDataKeys.PROJECT.is(dataId)) { return myProject; } if (SELECTED_ITEM_INFO.is(dataId)) { return ContainerUtil.getOnlyItem(getSelectedInfos()); } if (PlatformCoreDataKeys.SELECTED_ITEM.is(dataId)) { SearchEverywhereFoundElementInfo info = ContainerUtil.getOnlyItem(getSelectedInfos()); return info == null ? null : info.getElement(); } if (PlatformCoreDataKeys.SELECTED_ITEMS.is(dataId)) { List<SearchEverywhereFoundElementInfo> selection = getSelectedInfos(); if (selection.isEmpty()) return null; return ContainerUtil.map2Array(selection, Object.class, SearchEverywhereFoundElementInfo::getElement); } if (PlatformCoreDataKeys.BGT_DATA_PROVIDER.is(dataId)) { List<SearchEverywhereFoundElementInfo> selection = getSelectedInfos(); return (DataProvider)slowId -> getSlowData(slowId, selection); } return null; }