FileDocCategorySizeDatePackage
AndroidLaunchConfiguration.javaAPI DocAndroid 1.5 API5210Wed May 06 22:41:10 BST 2009com.android.ide.eclipse.adt.launch

AndroidLaunchConfiguration

public class AndroidLaunchConfiguration extends Object
Launch configuration data. This stores the result of querying the {@link ILaunchConfiguration} so that it's only done once.

Fields Summary
public int
mLaunchAction
Launch action. See {@link LaunchConfigDelegate#ACTION_DEFAULT}, {@link LaunchConfigDelegate#ACTION_ACTIVITY}, {@link LaunchConfigDelegate#ACTION_DO_NOTHING}
public TargetMode
mTargetMode
Target selection mode.
public boolean
mWipeData
Indicates whether the emulator should be called with -wipe-data
public boolean
mNoBootAnim
Indicates whether the emulator should be called with -no-boot-anim
public String
mAvdName
AVD Name.
public String
mNetworkSpeed
public String
mNetworkDelay
public String
mEmulatorCommandLine
Optional custom command line parameter to launch the emulator
Constructors Summary
Methods Summary
public voidset(org.eclipse.debug.core.ILaunchConfiguration config)
Initialized the structure from an ILaunchConfiguration object.

param
config


                  
        
        try {
            mLaunchAction = config.getAttribute(LaunchConfigDelegate.ATTR_LAUNCH_ACTION,
                    mLaunchAction);
        } catch (CoreException e1) {
            // nothing to be done here, we'll use the default value
        }

        try {
            boolean value = config.getAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
                    mTargetMode.getValue());
            mTargetMode = TargetMode.getMode(value);
        } catch (CoreException e) {
            // nothing to be done here, we'll use the default value
        }

        try {
            mAvdName = config.getAttribute(LaunchConfigDelegate.ATTR_AVD_NAME, mAvdName);
        } catch (CoreException e) {
            // ignore
        }

        int index = LaunchConfigDelegate.DEFAULT_SPEED;
        try {
            index = config.getAttribute(LaunchConfigDelegate.ATTR_SPEED, index);
        } catch (CoreException e) {
            // nothing to be done here, we'll use the default value
        }
        mNetworkSpeed = EmulatorConfigTab.getSpeed(index);

        index = LaunchConfigDelegate.DEFAULT_DELAY;
        try {
            index = config.getAttribute(LaunchConfigDelegate.ATTR_DELAY, index);
        } catch (CoreException e) {
            // nothing to be done here, we'll use the default value
        }
        mNetworkDelay = EmulatorConfigTab.getDelay(index);

        try {
            mEmulatorCommandLine = config.getAttribute(
                    LaunchConfigDelegate.ATTR_COMMANDLINE, ""); //$NON-NLS-1$
        } catch (CoreException e) {
            // lets not do anything here, we'll use the default value
        }

        try {
            mWipeData = config.getAttribute(LaunchConfigDelegate.ATTR_WIPE_DATA, mWipeData);
        } catch (CoreException e) {
            // nothing to be done here, we'll use the default value
        }

        try {
            mNoBootAnim = config.getAttribute(LaunchConfigDelegate.ATTR_NO_BOOT_ANIM,
                                              mNoBootAnim);
        } catch (CoreException e) {
            // nothing to be done here, we'll use the default value
        }