use of org.eclipse.debug.core.ILaunchConfiguration 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.debug.core.ILaunchConfiguration 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);
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class BasicMemcheckTest method testNumErrors.
@Test
public void testNumErrors() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testNumErrors");
IValgrindMessage[] messages = ValgrindUIPlugin.getDefault().getView().getMessages();
assertEquals(3, messages.length);
// $NON-NLS-1$
checkTestMessages(messages, "testNumErrors");
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class DoubleClickTest method testDoubleClickLaunchRemoved.
@Test
public void testDoubleClickLaunchRemoved() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
ILaunch launch = doLaunch(config, "testDoubleClickLine");
// Remove launch - tests #284919
DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch);
doDoubleClick();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertTrue("editor should be ITextEditor", editor instanceof ITextEditor);
ITextEditor textEditor = (ITextEditor) editor;
ISelection selection = textEditor.getSelectionProvider().getSelection();
assertTrue("selection must be TextSelection", selection instanceof TextSelection);
TextSelection textSelection = (TextSelection) selection;
// zero-indexed
int line = textSelection.getStartLine() + 1;
assertEquals(frame.getLine(), line);
}
use of org.eclipse.debug.core.ILaunchConfiguration 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");
doDoubleClick();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
IEditorInput input = editor.getEditorInput();
assertTrue("Input should be IFileEditorInput", input instanceof IFileEditorInput);
IFileEditorInput fileInput = (IFileEditorInput) input;
File expectedFile = new File(proj.getProject().getLocation().toOSString(), frame.getFile());
File actualFile = fileInput.getFile().getLocation().toFile();
assertEquals(expectedFile.getCanonicalPath(), actualFile.getCanonicalPath());
}
Aggregations