}
} else if (type == Constant.AlgorithmUIItem) {
AlgorithmItemGUI aiGUI = (AlgorithmItemGUI) itm;
AlgorithmWorkflowItem wfItem = (AlgorithmWorkflowItem) aiGUI
.getWfItem();
Workflow wf = wfItem.getWorkflow();
WorkflowTreeItem parent = itm.getParent();// GUI
itm.removeAllChildren();
parent.removeChild(itm);
WorkflowView.this.viewer.refresh();
wf.remove(wfItem);// model
if (parent.getChildren().length == 0
|| WorkflowView.this.currentParentItem == aiGUI) {
WorkflowView.this.currentParentItem = parent;
}
}