boolean (final Collection<? extends PackagingNodeSource> nodeSources) { if (nodeSources.isEmpty()) { return true; } if (nodeSources.size() > 1) { Messages.showErrorDialog(myArtifactsEditor.getMainComponent(), JavaUiBundle.message( "error.message.the.selected.node.consist.of.several.elements.so.it.cannot.be.edited")); } else { final PackagingNodeSource source = ContainerUtil.getFirstItem(nodeSources, null); if (source != null) { Messages.showErrorDialog(myArtifactsEditor.getMainComponent(), JavaUiBundle.message( "error.message.the.selected.node.belongs.to.0.element.so.it.cannot.be.edited", source.getPresentableName())); } } return false; }