KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > pde > internal > ui > launcher > JUnitTabGroup


1 package org.eclipse.pde.internal.ui.launcher;
2
3 /*
4  * (c) Copyright IBM Corp. 2000, 2001.
5  * All Rights Reserved.
6  */

7  
8
9 import org.eclipse.core.runtime.CoreException;
10 import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
11 import org.eclipse.debug.ui.CommonTab;
12 import org.eclipse.debug.ui.EnvironmentTab;
13 import org.eclipse.debug.ui.ILaunchConfigurationDialog;
14 import org.eclipse.debug.ui.ILaunchConfigurationTab;
15 import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
16 import org.eclipse.jdt.internal.junit.launcher.AssertionVMArg;
17 import org.eclipse.jdt.internal.junit.launcher.JUnitMainTab;
18 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
19 import org.eclipse.pde.ui.launcher.ConfigurationTab;
20 import org.eclipse.pde.ui.launcher.PluginJUnitMainTab;
21 import org.eclipse.pde.ui.launcher.PluginsTab;
22 import org.eclipse.pde.ui.launcher.TracingTab;
23
24 public class JUnitTabGroup extends AbstractPDELaunchConfigurationTabGroup {
25     
26     /**
27      * @see ILaunchConfigurationTabGroup#createTabs(ILaunchConfigurationDialog, String)
28      */

29     public void createTabs(ILaunchConfigurationDialog dialog, String JavaDoc mode) {
30         ILaunchConfigurationTab[] tabs = null;
31         tabs = new ILaunchConfigurationTab[]{
32                 new JUnitMainTab(),
33                 new PluginJUnitMainTab(),
34                 new JavaArgumentsTab(),
35                 new PluginsTab(false),
36                 new ConfigurationTab(true),
37                 new TracingTab(),
38                 new EnvironmentTab(),
39                 new CommonTab()};
40         setTabs(tabs);
41     }
42     
43     /**
44      * @see org.eclipse.debug.ui.ILaunchConfigurationTabGroup#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
45      */

46     public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
47         super.setDefaults(configuration);
48         
49         String JavaDoc vmArgs;
50         try {
51             vmArgs= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); //$NON-NLS-1$
52
} catch (CoreException e) {
53             vmArgs= ""; //$NON-NLS-1$
54
}
55         vmArgs = AssertionVMArg.enableAssertInArgString(vmArgs);
56         if (vmArgs.length() > 0)
57             configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs);
58     }
59
60 }
61
Popular Tags