protected boolean calculateEnabled() {
if (getSelectedObjects().isEmpty()
|| !(getSelectedObjects().get(0) instanceof MusicEditPart)
|| ((MusicEditPart) getSelectedObjects().get(0)).getModel() == null)
return false;
MusicEditPart selectedEditPart = (MusicEditPart) getSelectedObjects()
.get(0);
BasicElement selectedModel = (BasicElement) selectedEditPart.getModel();
if(selectedModel instanceof UnknownMeiNodeForm || selectedModel instanceof ErrorMsgDiagram)
return false;
for (Class candidate : MusicPlugin.allowedChildrenMap
.get(selectedModel.getClass())) {
if(isCandidate(candidate))