use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class CModelLabelsTest method checkLabelProvider.
private static void checkLabelProvider(CachegrindFunction func, CachegrindFile file) {
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
TreeViewer viewer = view.getViewer();
TreePath path = new TreePath(new Object[] { view.getOutputs()[0], file, func });
checkLabelProvider(viewer, path, func);
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class CModelLabelsTest method testNestedMethodLabel.
@Test
public void testNestedMethodLabel() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testNestedMethodLabel");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
CachegrindOutput output = view.getOutputs()[0];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
// $NON-NLS-1$
CachegrindFunction func = getFunctionByName(file, "A::B::e()");
assertTrue(func.getModel() instanceof IMethod);
checkLabelProvider(func, file);
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickFile.
@Test
public void testDoubleClickFile() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testDoubleClickFile");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
CachegrindOutput output = view.getOutputs()[0];
// $NON-NLS-1$
CachegrindFile file = getFileByName(output, "cpptest.cpp");
TreePath path = new TreePath(new Object[] { output, file });
doDoubleClick(path);
checkFile(file);
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class DoubleClickTest method doDoubleClick.
private static void doDoubleClick(TreePath path) {
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
TreeViewer treeViewer = view.getViewer();
ICachegrindElement element = (ICachegrindElement) path.getLastSegment();
treeViewer.expandToLevel(element, AbstractTreeViewer.ALL_LEVELS);
TreeSelection selection = new TreeSelection(path);
IDoubleClickListener listener = view.getDoubleClickListener();
listener.doubleClick(new DoubleClickEvent(treeViewer, selection));
}
use of org.eclipse.linuxtools.internal.valgrind.cachegrind.CachegrindViewPart in project linuxtools by eclipse.
the class MultiProcessTest method testNoExec.
@Test
public void testNoExec() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testNoExec");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
assertEquals(1, view.getOutputs().length);
}
Aggregations