GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getModel();
Graph result = processor.process((AbstractQueryImpl) query, graphModel);
// System.out.println("#Nodes: " + result.getNodeCount());
// System.out.println("#Edges: " + result.getEdgeCount());
if (running) {
VisualizationController visController = Lookup.getDefault().lookup(VisualizationController.class);
if (visController != null) {
visController.selectNodes(result.getNodes().toArray());
visController.selectEdges(result.getEdges().toArray());
}
GraphView view = result.getView();
model.setCurrentResult(view);
} else {
//destroy view