}
public boolean canExecute() {
GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
for (Node n : nodes) {
if (gec.canUngroupNode(n)) {
return true;//If any of the nodes can be ungrouped, then allow to execute this action.
}
}
return false;
}