boolean (@NotNull DataContext dataContext) { if (ServiceViewActionProvider.getSelectedItems(dataContext).isEmpty()) { return false; } JComponent detailsComponent = myServiceView.getUi().getDetailsComponent(); return detailsComponent == null || !UIUtil.isAncestor(detailsComponent, dataContext.getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)); }