Search in sources :

Example 6 with ValgrindOptionsTab

use of org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab in project linuxtools by eclipse.

the class LaunchConfigTabTest method prep.

@Before
public void prep() throws Exception {
    // $NON-NLS-1$
    proj = createProjectAndBuild("cpptest");
    config = createConfiguration(proj.getProject());
    testShell = new Shell(Display.getDefault());
    testShell.setLayout(new GridLayout());
    tab = new ValgrindOptionsTab();
}
Also used : ValgrindOptionsTab(org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab) Shell(org.eclipse.swt.widgets.Shell) GridLayout(org.eclipse.swt.layout.GridLayout) Before(org.junit.Before)

Example 7 with ValgrindOptionsTab

use of org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab in project linuxtools by eclipse.

the class HelgrindLaunchShortcut method setDefaultProfileAttributes.

@Override
protected void setDefaultProfileAttributes(ILaunchConfigurationWorkingCopy wc) throws CoreException {
    ValgrindOptionsTab tab = new ValgrindOptionsTab();
    tab.setDefaults(wc);
    ILaunchConfigurationTab defaultTab = ValgrindLaunchPlugin.getDefault().getToolPage(HelgrindPlugin.TOOL_ID);
    defaultTab.setDefaults(wc);
}
Also used : ValgrindOptionsTab(org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab) ILaunchConfigurationTab(org.eclipse.debug.ui.ILaunchConfigurationTab)

Example 8 with ValgrindOptionsTab

use of org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab in project linuxtools by eclipse.

the class MinVersionTest method testTabsBadVersion.

@Test
public void testTabsBadVersion() throws Exception {
    Shell testShell = new Shell(Display.getDefault());
    testShell.setLayout(new GridLayout());
    ValgrindOptionsTab tab = new ValgrindOptionsTab();
    ILaunchConfiguration config = getLaunchConfigType().newInstance(null, getLaunchManager().generateLaunchConfigurationName(proj.getProject().getName()));
    ILaunchConfigurationWorkingCopy wc = config.getWorkingCopy();
    tab.setDefaults(wc);
    tab.createControl(testShell);
    tab.initializeFrom(config);
    tab.performApply(wc);
    assertFalse(tab.isValid(config));
    assertNotNull(tab.getErrorMessage());
    testShell.dispose();
}
Also used : ValgrindOptionsTab(org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab) Shell(org.eclipse.swt.widgets.Shell) GridLayout(org.eclipse.swt.layout.GridLayout) ILaunchConfiguration(org.eclipse.debug.core.ILaunchConfiguration) ILaunchConfigurationWorkingCopy(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy) Test(org.junit.Test)

Example 9 with ValgrindOptionsTab

use of org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab in project linuxtools by eclipse.

the class AbstractValgrindTest method setProfileAttributes.

@Override
protected void setProfileAttributes(ILaunchConfigurationWorkingCopy wc) throws CoreException {
    ILaunchConfigurationTab tab = new ValgrindOptionsTab();
    tab.setDefaults(wc);
    tab = ValgrindLaunchPlugin.getDefault().getToolPage(getToolID());
    tab.setDefaults(wc);
    wc.setAttribute(LaunchConfigurationConstants.ATTR_TOOL, getToolID());
    wc.setAttribute(LaunchConfigurationConstants.ATTR_FULLPATH_AFTER, false);
}
Also used : ValgrindOptionsTab(org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab) ILaunchConfigurationTab(org.eclipse.debug.ui.ILaunchConfigurationTab)

Aggregations

ValgrindOptionsTab (org.eclipse.linuxtools.internal.valgrind.launch.ValgrindOptionsTab)9 GridLayout (org.eclipse.swt.layout.GridLayout)5 Shell (org.eclipse.swt.widgets.Shell)5 ILaunchConfigurationTab (org.eclipse.debug.ui.ILaunchConfigurationTab)4 Before (org.junit.Before)4 ILaunchConfiguration (org.eclipse.debug.core.ILaunchConfiguration)1 ILaunchConfigurationWorkingCopy (org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)1 Test (org.junit.Test)1