示例#1
0
 public void performCollapseAll() {
   if (getController().getCurrentModuleView() != null
       && getController().getCurrentModuleView().getRepresentedObject() instanceof FlexoProcess) {
     FlexoProcess flexoProcess =
         (FlexoProcess) getController().getCurrentModuleView().getRepresentedObject();
     for (AbstractActivityNode node : flexoProcess.getAllAbstractActivityNodes()) {
       if (node.hasContainedPetriGraph() && node.getOperationPetriGraph().getIsVisible()) {
         OpenOperationLevel.actionType
             .makeNewAction(node, null, getController().getEditor())
             .doAction();
       }
     }
     for (LOOPOperator node : flexoProcess.getActivityPetriGraph().getAllLoopOperators()) {
       if (node.hasExecutionPetriGraph() && node.getExecutionPetriGraph().getIsVisible()) {
         OpenLoopedPetriGraph.actionType
             .makeNewAction(node, null, getController().getEditor())
             .doAction();
       }
     }
     for (SelfExecutableNode node :
         flexoProcess.getActivityPetriGraph().getAllSelfExecutableNodes()) {
       if (node.hasExecutionPetriGraph() && node.getExecutionPetriGraph().getIsVisible()) {
         OpenExecutionPetriGraph.actionType
             .makeNewAction((PetriGraphNode) node, null, getController().getEditor())
             .doAction();
       }
     }
     for (WKFGroup group : flexoProcess.getActivityPetriGraph().getGroups()) {
       if (group.isExpanded()) {
         OpenGroup.actionType.makeNewAction(group, null, getController().getEditor()).doAction();
       }
     }
     if (flexoProcess.getPortRegistery() != null
         && flexoProcess.getPortRegistery().getIsVisible()) {
       OpenPortRegistery.actionType
           .makeNewAction(flexoProcess, null, getController().getEditor())
           .doAction();
     }
   }
 }