1 package org.eclipse.pde.internal.ui.launcher; 2 3 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 29 public void createTabs(ILaunchConfigurationDialog dialog, String 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 46 public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { 47 super.setDefaults(configuration); 48 49 String vmArgs; 50 try { 51 vmArgs= configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, ""); } catch (CoreException e) { 53 vmArgs= ""; } 55 vmArgs = AssertionVMArg.enableAssertInArgString(vmArgs); 56 if (vmArgs.length() > 0) 57 configuration.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArgs); 58 } 59 60 } 61 | Popular Tags |