menuItem.setMnemonic(KeyEvent.VK_H);
menuItem.addActionListener(new AbstractAction() {
public void actionPerformed(ActionEvent e) {
QName dataType = null;//new QName(WSConstants.XSD_NS_URI, "string");
XBayaEngine engineRef = WorkflowMenu.this.engine;
String ns = JOptionPane.showInputDialog( null, "Namespace", "http://www.extreme.indiana.edu/lead/xsd");//"Namespace for the type", JOptionPane.QUESTION_MESSAGE);
String type = JOptionPane.showInputDialog(null , "Local name", "LEADFileIDArrayType");//"Type name", JOptionPane.QUESTION_MESSAGE);
if(ns == null || "".equals(ns)){
dataType = new QName(WSConstants.XSD_NS_URI, type);
}else{
dataType = new QName(ns, type);
}
Workflow[] newWorkflows = new WorkflowHarvester().harvest(engineRef.getWorkflow(), dataType);
for (Workflow workflow : newWorkflows) {
GraphCanvas canvas = engineRef.getGUI().newGraphCanvas(true);
canvas.setWorkflow(workflow);
}
}
});
return menuItem;