boolean (@NotNull final DataContext dataContext) { PsiElement[] elements = PlatformCoreDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext); if (elements == null || elements.length == 0) return false; return DeleteHandler.shouldEnableDeleteAction(elements); }