boolean (@NotNull DataContext dataContext) { List<ServiceViewItem> selectedItems = ServiceViewActionProvider.getSelectedItems(dataContext); if (!ContainerUtil.exists(selectedItems, item -> item.getViewDescriptor().getRemover() != null)) { return false; } JComponent detailsComponent = myServiceView.getUi().getDetailsComponent(); return detailsComponent == null || !UIUtil.isAncestor(detailsComponent, dataContext.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)); }