Object (@NotNull Collection<? extends AbstractTreeNode<?>> selected, @NotNull String dataId) { if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { for (AbstractTreeNode<?> selectedElement : selected) { Object element = selectedElement.getValue(); if (element instanceof ResourceBundle) { return new ResourceBundleDeleteProvider(); } } } else if (ResourceBundle.ARRAY_DATA_KEY.is(dataId)) { List<ResourceBundle> selectedElements = new ArrayList<>(); for (AbstractTreeNode<?> node : selected) { final Object value = node.getValue(); if (value instanceof ResourceBundle) { selectedElements.add((ResourceBundle)value); } } return selectedElements.isEmpty() ? null : selectedElements.toArray(new ResourceBundle[0]); } return null; }