Object (@NotNull Collection<? extends AbstractTreeNode<?>> selected, @NotNull String dataId) { if (Form.DATA_KEY.is(dataId)) { List<Form> result = new ArrayList<>(); for (AbstractTreeNode<?> node : selected) { if (node instanceof FormNode) { result.add(((FormNode)node).getValue()); } } if (!result.isEmpty()) { return result.toArray(new Form[0]); } } else if (PlatformDataKeys.DELETE_ELEMENT_PROVIDER.is(dataId)) { for (AbstractTreeNode<?> node : selected) { if (node instanceof FormNode) { return new MyDeleteProvider(selected); } } } return null; }