use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testNoSim.
@Test
public void testNoSim() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
dynamicTab.getCacheButton().setSelection(false);
tab.performApply(wc);
wc.doSave();
assertFalse(tab.isValid(config));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method testI1Cache.
@Test
public void testI1Cache() throws Exception {
ILaunchConfigurationWorkingCopy wc = initConfig();
assertFalse(dynamicTab.getI1SizeSpinner().isEnabled());
dynamicTab.getI1Button().setSelection(true);
dynamicTab.getI1Button().notifyListeners(SWT.Selection, null);
assertTrue(dynamicTab.getI1SizeSpinner().isEnabled());
dynamicTab.getI1SizeSpinner().setSelection(16384);
dynamicTab.getI1AssocSpinner().setSelection(1);
dynamicTab.getI1LineSizeSpinner().setSelection(16);
tab.performApply(wc);
wc.doSave();
// $NON-NLS-1$
ILaunch launch = saveAndLaunch(wc, "testI1Cache");
IProcess[] p = launch.getProcesses();
assertTrue("process array should not be empty", p.length > 0);
String cmd = p[0].getAttribute(IProcess.ATTR_CMDLINE);
// $NON-NLS-1$
assertTrue(cmd.contains("--I1=16384,1,16"));
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class LaunchConfigTabTest method initConfig.
private ILaunchConfigurationWorkingCopy initConfig() throws CoreException {
ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
tab.setDefaults(wc);
tab.createControl(testShell);
tab.initializeFrom(config);
int ix = Arrays.asList(tab.getTools()).indexOf(CachegrindPlugin.TOOL_ID);
tab.getToolsCombo().select(ix);
ILaunchConfigurationTab dynamicTab = tab.getDynamicTab();
this.dynamicTab = (CachegrindToolPage) dynamicTab;
return wc;
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy in project linuxtools by eclipse.
the class MultiProcessTest method testNumPids.
@Test
public void testNumPids() throws Exception {
ILaunchConfigurationWorkingCopy config = createConfiguration(proj.getProject()).getWorkingCopy();
config.setAttribute(LaunchConfigurationConstants.ATTR_GENERAL_TRACECHILD, true);
config.doSave();
// $NON-NLS-1$
doLaunch(config, "testExec");
CachegrindViewPart view = (CachegrindViewPart) ValgrindUIPlugin.getDefault().getView().getDynamicView();
assertEquals(2, view.getOutputs().length);
}
use of org.eclipse.debug.core.ILaunchConfigurationWorkingCopy 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());
}
Aggregations