use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ExpandCollapseTest method testExpand.
@Test
public void testExpand() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testDefaults");
ValgrindViewPart view = ValgrindUIPlugin.getDefault().getView();
viewer = view.getMessagesViewer();
contextMenu = viewer.getTreeViewer().getTree().getMenu();
// Select first error and expand it
IValgrindMessage[] messages = (IValgrindMessage[]) viewer.getTreeViewer().getInput();
IValgrindMessage element = messages[0];
TreeSelection selection = new TreeSelection(new TreePath(new Object[] { element }));
viewer.getTreeViewer().setSelection(selection);
contextMenu.notifyListeners(SWT.Show, null);
contextMenu.getItem(0).notifyListeners(SWT.Selection, null);
checkExpanded(element, true);
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class LinkedResourceDoubleClickTest method testLinkedDoubleClickLine.
@Test
public void testLinkedDoubleClickLine() throws Exception {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
doLaunch(config, "testLinkedDoubleClickLine");
doDoubleClick();
IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
assertTrue("editor must be text editor", editor instanceof ITextEditor);
ITextEditor textEditor = (ITextEditor) editor;
ISelection selection = textEditor.getSelectionProvider().getSelection();
assertTrue("selection must be text one", 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 MinVersionTest method testLaunchBadVersion.
@Test
public void testLaunchBadVersion() throws Exception {
// Put this back so we can make a valid config
restoreVersion();
ILaunchConfiguration config = createConfiguration(proj.getProject());
// For some reason we downgraded
saveVersion();
try {
// $NON-NLS-1$
doLaunch(config, "testDefaults");
} catch (CoreException e) {
assertNotNull(e);
}
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ShortcutTest method testShortcutEditor.
@Test
public void testShortcutEditor() throws Exception {
ValgrindTestLaunchShortcut shortcut = new ValgrindTestLaunchShortcut();
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
// $NON-NLS-1$
IFile file = proj.getProject().getFile("test.c");
IEditorPart editor = IDE.openEditor(page, file);
assertNotNull(editor);
shortcut.launch(editor, ILaunchManager.PROFILE_MODE);
ILaunchConfiguration config = shortcut.getConfig();
compareWithDefaults(config);
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ShortcutTest method testShortcutSelection.
@Test
public void testShortcutSelection() throws Exception {
ValgrindTestLaunchShortcut shortcut = new ValgrindTestLaunchShortcut();
shortcut.launch(new StructuredSelection(proj.getProject()), ILaunchManager.PROFILE_MODE);
ILaunchConfiguration config = shortcut.getConfig();
compareWithDefaults(config);
}
Aggregations