GroupNodeRealizer gnr = (GroupNodeRealizer) nr;
GraphEditPopupMenuAction action = null;
if (gnr.isGroupClosed()) {
action = new GraphEditPopupMenuAction("Expand", fGraphPanel);
action.setDescription("Expand selected folder node");
action.setCommand(new FolderNodeHandleCommand(getGraphLoader(), getHierarchicEdgeGrouper(), node, true));
} else {
action = new GraphEditPopupMenuAction("Collapse", fGraphPanel);
action.setDescription("Collapse selected folder node");
action.setCommand(new FolderNodeHandleCommand(getGraphLoader(), getHierarchicEdgeGrouper(), node, false));
}
folderMenu.add(action);
}
return folderMenu;