use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ExportWizardTest method testExportNotDir.
@Test
public void testExportNotDir() throws CoreException, URISyntaxException, IOException {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
ILaunch launch = doLaunch(config, "testExport");
IProcess p = launch.getProcesses()[0];
assertEquals(0, p.getExitValue());
createWizard();
// set the output path, should trigger modify listener
IPath pathToFiles = proj.getProject().getLocation();
// $NON-NLS-1$
pathToFiles = pathToFiles.append("alloctest.c");
assertTrue(pathToFiles.toFile().exists());
page.getDestText().setText(pathToFiles.toOSString());
assertNotNull(page.getErrorMessage());
assertFalse(page.isPageComplete());
assertFalse(wizard.canFinish());
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ExportWizardTest method testExportBoth.
@Test
public void testExportBoth() throws CoreException, URISyntaxException, IOException {
ILaunchConfiguration config = createConfiguration(proj.getProject());
// $NON-NLS-1$
ILaunch launch = doLaunch(config, "testExport");
IProcess p = launch.getProcesses()[0];
assertEquals(0, p.getExitValue());
createWizard();
// set the output path, should trigger modify listener
File[] selectedFiles = page.getSelectedFiles();
IPath pathToFiles = proj.getProject().getLocation();
page.getDestText().setText(pathToFiles.toOSString());
assertTrue(page.isPageComplete());
assertTrue(wizard.canFinish());
assertTrue(wizard.performFinish());
// check files were copied
for (File log : selectedFiles) {
File copy = new File(pathToFiles.toFile(), log.getName());
assertTrue(copy.exists());
}
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class ShortcutTest method compareWithDefaults.
private void compareWithDefaults(ILaunchConfiguration config) throws CoreException {
// tests launch in foreground, this is not typical
ILaunchConfiguration defaults = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = defaults.getWorkingCopy();
wc.removeAttribute(IDebugUIConstants.ATTR_LAUNCH_IN_BACKGROUND);
wc.setAttribute(LaunchConfigurationConstants.ATTR_FULLPATH_AFTER, true);
wc.doSave();
// Compare launch config with defaults
assertEquals(config.getAttributes(), defaults.getAttributes());
}
use of org.eclipse.debug.core.ILaunchConfiguration in project linuxtools by eclipse.
the class SortTest method prep.
@Before
public void prep() throws Exception {
// $NON-NLS-1$
proj = createProjectAndBuild("alloctest");
ILaunchConfiguration config = createConfiguration(proj.getProject());
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
wc.setAttribute(MassifLaunchConstants.ATTR_MASSIF_STACKS, true);
wc.doSave();
// $NON-NLS-1$
doLaunch(config, "testStacks");
}
use of org.eclipse.debug.core.ILaunchConfiguration 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);
}
Aggregations