FileDocCategorySizeDatePackage
AndroidJUnitLaunchShortcut.javaAPI DocAndroid 1.5 API2311Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.launch.junit

AndroidJUnitLaunchShortcut

public class AndroidJUnitLaunchShortcut extends org.eclipse.jdt.junit.launcher.JUnitLaunchShortcut
Launch shortcut to launch debug/run Android JUnit configuration directly.

Fields Summary
Constructors Summary
Methods Summary
protected org.eclipse.debug.core.ILaunchConfigurationWorkingCopycreateLaunchConfiguration(org.eclipse.jdt.core.IJavaElement element)
Creates a default Android JUnit launch configuration. Sets the instrumentation runner to the first instrumentation found in the AndroidManifest.

        ILaunchConfigurationWorkingCopy config = super.createLaunchConfiguration(element);
        // just get first valid instrumentation runner
        String instrumentation = new InstrumentationRunnerValidator(element.getJavaProject()).
                getValidInstrumentationTestRunner();
        if (instrumentation != null) {
            config.setAttribute(AndroidJUnitLaunchConfigDelegate.ATTR_INSTR_NAME, 
                    instrumentation);
        }
        // if a valid runner is not found, rely on launch delegate to log error.
        // This method is called without explicit user action to launch Android JUnit, so avoid
        // logging an error here.

        AndroidJUnitLaunchConfigDelegate.setJUnitDefaults(config);
        return config;
    
protected java.lang.StringgetLaunchConfigurationTypeId()

        return "com.android.ide.eclipse.adt.junit.launchConfigurationType"; //$NON-NLS-1$