deleteDirected=NbPreferences.forModule(ClearEdges.class).getBoolean(DELETE_DIRECTED_SAVED_PREFERENCES, true);
deleteUndirected=NbPreferences.forModule(ClearEdges.class).getBoolean(DELETE_UNDIRECTED_SAVED_PREFERENCES, true);
}
public void execute() {
GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
MixedGraph graph=Lookup.getDefault().lookup(GraphController.class).getModel().getMixedGraph();
if(deleteDirected){
gec.deleteEdges(graph.getDirectedEdges().toArray());
}
if(deleteUndirected){
gec.deleteEdges(graph.getUndirectedEdges().toArray());
}
}