GraphModel currentGraphModel=Lookup.getDefault().lookup(GraphController.class).getModel();
if(graphModel!=currentGraphModel){//If graph model has changed since last execution, change default mode for edges to create in UI, else keep this parameter across calls
directed=currentGraphModel.isDirected()||currentGraphModel.isMixed();//Get graph directed state. Set to true if graph is directed or mixed
graphModel=currentGraphModel;
}
return new AddEdgeToGraphUI();
}