use of org.eclipse.linuxtools.internal.callgraph.graphlisteners.StapGraphMouseListener in project linuxtools by eclipse.
the class MouseListenerTest method test.
@Test
public void test() {
StapGraphParser parse = new StapGraphParser();
parse.setSourcePath(Activator.getPluginLocation() + "eag.graph");
parse.testRun(new NullProgressMonitor(), true);
CallgraphView cView = (CallgraphView) ViewFactory.createView("org.eclipse.linuxtools.callgraph.callgraphview");
StapUIJob j = new StapUIJob("Test Graph UI Job", parse, CallGraphConstants.VIEW_ID);
j.runInUIThread(new NullProgressMonitor());
StapGraphMouseListener mListener = cView.getGraph().getMouseListener();
StapGraph g = cView.getGraph();
g.setProject(parse.project);
GraphItem[] nodes = { g.getNode(g.getFirstUsefulNode()) };
g.setSelection(nodes);
mListener.mouseDownEvent(0, 0);
g.draw(StapGraph.CONSTANT_DRAWMODE_TREE, StapGraph.CONSTANT_ANIMATION_FASTEST, g.getFirstUsefulNode());
mListener.mouseUp(null);
}
Aggregations