use of org.eclipse.linuxtools.internal.valgrind.massif.MassifTreeViewer in project linuxtools by eclipse.
the class DoubleClickTest method doDoubleClick.
private void doDoubleClick() {
MassifViewPart view = (MassifViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
MassifTreeViewer treeViewer = view.getTreeViewer();
MassifSnapshot[] snapshots = view.getSnapshots();
// first detailed
node = snapshots[1].getRoot();
TreePath path = new TreePath(new Object[] { node });
while (node.getChildren().length > 0 && !node.hasSourceFile()) {
node = node.getChildren()[0];
path = path.createChildPath(node);
}
assertTrue(node.hasSourceFile());
treeViewer.getViewer().expandToLevel(node, AbstractTreeViewer.ALL_LEVELS);
TreeSelection selection = new TreeSelection(path);
// do double click
IDoubleClickListener listener = treeViewer.getDoubleClickListener();
listener.doubleClick(new DoubleClickEvent(treeViewer.getViewer(), selection));
}
Aggregations