return;
CapabilityLanguageFlow clf = null;
FixedFlow ff = null;
String[] nodes = new FlowNodes(modelFlow).getFlow();
if (flowTypeGUI.equals(CAPABILITY_LANGUAGE_FLOW)) {
setFlowControllerDeclaration(null);
getAnalysisEngineMetaData().setFlowConstraints(clf = new CapabilityLanguageFlow_impl());
clf.setCapabilityLanguageFlow(nodes);
} else if (flowTypeGUI.equals(FIXED_FLOW)) {
setFlowControllerDeclaration(null);
getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
ff.setFixedFlow(nodes);
} else if (flowTypeGUI.equals(USER_DEFINED_FLOW)) {
// use case: user set user-defined-flow from some other state.
// user will have to fill in the import (CDE only supports that format)
// flow nodes kept, put under "Fixed Flow" arbitrarily
FlowControllerDeclaration newFcd = new FlowControllerDeclaration_impl();
setFlowControllerDeclaration(newFcd);
refreshFcd(newFcd);
getAnalysisEngineMetaData().setFlowConstraints(ff = new FixedFlow_impl());
ff.setFixedFlow(nodes);
}
enable();
setFileDirty();
}
else if (event.widget == upButton) {
String[] nodes = new FlowNodes(getModelFlow()).getFlow();
// update both model and gui: swap nodes
int selection = flowList.getSelectionIndex();
if (selection == 0)
return; // can't move up 0
String temp = nodes[selection - 1];
nodes[selection - 1] = nodes[selection];
nodes[selection] = temp;
finishFlowAction();
flowList.setSelection(selection - 1);
enable(); // after setting selection
} else if (event.widget == downButton) {
String[] nodes = new FlowNodes(getModelFlow()).getFlow();
// update both model and gui: swap nodes
int selection = flowList.getSelectionIndex();
if (selection == flowList.getItemCount() - 1)
return; // can't move down at end of list
String temp = nodes[selection + 1];