From e71a4a39a457e5fc8feb504279c0ea78a7f0122b Mon Sep 17 00:00:00 2001 From: Raphael Moll <> Date: Thu, 26 Mar 2009 13:53:00 -0700 Subject: [PATCH] Automated import from //branches/cupcake/...@142978,142978 --- .../adt/launch/AndroidLaunchConfiguration.java | 13 +++++++----- .../adt/launch/AndroidLaunchController.java | 17 ++++++++-------- .../adt/launch/junit/AndroidJUnitLaunchAction.java | 23 +++++++++++++++++----- 3 files changed, 34 insertions(+), 19 deletions(-) diff --git a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchConfiguration.java b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchConfiguration.java index 3e610db0..b5ea7275 100644 --- a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchConfiguration.java +++ b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchConfiguration.java @@ -32,8 +32,14 @@ public class AndroidLaunchConfiguration { */ public int mLaunchAction = LaunchConfigDelegate.DEFAULT_LAUNCH_ACTION; + /** + * Target selection mode for the configuration: either {@link #AUTO} or {@link #MANUAL}. + */ public enum TargetMode { - AUTO(true), MANUAL(false); + /** Automatic target selection mode. */ + AUTO(true), + /** Manual target selection mode. */ + MANUAL(false); private boolean mValue; @@ -58,10 +64,7 @@ public class AndroidLaunchConfiguration { /** * Target selection mode. - * + * @see TargetMode */ public TargetMode mTargetMode = LaunchConfigDelegate.DEFAULT_TARGET_MODE; diff --git a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchController.java b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchController.java index 3aa0b91f..fafc4020 100644 --- a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchController.java +++ b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/AndroidLaunchController.java @@ -17,9 +17,6 @@ package com.android.ide.eclipse.adt.launch; import com.android.ddmlib.AndroidDebugBridge; -import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener; -import com.android.ddmlib.AndroidDebugBridge.IDebugBridgeChangeListener; -import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener; import com.android.ddmlib.Client; import com.android.ddmlib.ClientData; import com.android.ddmlib.Device; @@ -27,6 +24,9 @@ import com.android.ddmlib.IDevice; import com.android.ddmlib.Log; import com.android.ddmlib.MultiLineReceiver; import com.android.ddmlib.SyncService; +import com.android.ddmlib.AndroidDebugBridge.IClientChangeListener; +import com.android.ddmlib.AndroidDebugBridge.IDebugBridgeChangeListener; +import com.android.ddmlib.AndroidDebugBridge.IDeviceChangeListener; import com.android.ddmlib.SyncService.SyncResult; import com.android.ide.eclipse.adt.AdtPlugin; import com.android.ide.eclipse.adt.launch.AndroidLaunchConfiguration.TargetMode; @@ -34,10 +34,9 @@ import com.android.ide.eclipse.adt.launch.DelayedLaunchInfo.InstallRetryMode; import com.android.ide.eclipse.adt.launch.DeviceChooserDialog.DeviceChooserResponse; import com.android.ide.eclipse.adt.project.ProjectHelper; import com.android.ide.eclipse.adt.sdk.Sdk; -import com.android.ide.eclipse.common.AndroidConstants; import com.android.ide.eclipse.common.project.AndroidManifestParser; -import com.android.prefs.AndroidLocation.AndroidLocationException; import com.android.ide.eclipse.common.project.BaseProjectHelper; +import com.android.prefs.AndroidLocation.AndroidLocationException; import com.android.sdklib.IAndroidTarget; import com.android.sdklib.SdkManager; import com.android.sdklib.avd.AvdManager; @@ -56,7 +55,6 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.model.IDebugTarget; import org.eclipse.debug.ui.DebugUITools; -import org.eclipse.jdt.core.IJavaModel; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants; @@ -102,8 +100,9 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener /** * List of {@link DelayedLaunchInfo} waiting for an emulator to connect. - *

Once an emulator has connected, {@link DelayedLaunchInfo#mDevice} is set and the - * DelayedLaunchInfo object is moved to {@link AndroidLaunchController#mWaitingForReadyEmulatorList}. + *

Once an emulator has connected, {@link DelayedLaunchInfo#getDevice()} is set and the + * DelayedLaunchInfo object is moved to + * {@link AndroidLaunchController#mWaitingForReadyEmulatorList}. * ALL ACCESS MUST BE INSIDE A synchronized (sListLock) block! */ private final ArrayList mWaitingForEmulatorLaunches = @@ -487,7 +486,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener // FIXME: ask the user if he wants to create a AVD. // we found no compatible AVD. AdtPlugin.printErrorToConsole(project, String.format( - "Failed to find a AVD compatible with target '%1$s'. Launch aborted.", + "Failed to find an AVD compatible with target '%1$s'. Launch aborted.", projectTarget.getName())); stopLaunch(launchInfo); return; diff --git a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/junit/AndroidJUnitLaunchAction.java b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/junit/AndroidJUnitLaunchAction.java index b8802632..747fcfe5 100644 --- a/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/junit/AndroidJUnitLaunchAction.java +++ b/tools/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/launch/junit/AndroidJUnitLaunchAction.java @@ -57,7 +57,7 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { * Launch a instrumentation test run on given Android device. * Reuses JDT JUnit launch delegate so results can be communicated back to JDT JUnit UI. * - * @see com.android.ide.eclipse.adt.launch.IAndroidLaunchAction#doLaunchAction(com.android.ide.eclipse.adt.launch.AndroidLaunchController.DelayedLaunchInfo, com.android.ddmlib.Device) + * @see IAndroidLaunchAction#doLaunchAction(DelayedLaunchInfo, IDevice) */ public boolean doLaunchAction(DelayedLaunchInfo info, IDevice device) { String msg = String.format("Launching instrumentation %s on device %s", mRunner, @@ -108,7 +108,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { super.launch(configuration, mode, launch, monitor); } - /* (non-Javadoc) + /** + * {@inheritDoc} + * @throws CoreException * @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration) */ @Override @@ -119,6 +121,7 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { /** * Overrides parent to return a VM Runner implementation which launches a thread, rather * than a separate VM process + * @throws CoreException */ @Override public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode) @@ -127,7 +130,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { mTestPackage, mRunner, mLaunchInfo.isDebugMode(), mDevice)); } - /* (non-Javadoc) + /** + * {@inheritDoc} + * @throws CoreException * @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String) */ @Override @@ -148,6 +153,10 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { mJUnitInfo = info; } + /** + * {@inheritDoc} + * @throws CoreException + */ public void run(final VMRunnerConfiguration config, ILaunch launch, IProgressMonitor monitor) throws CoreException { @@ -183,7 +192,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { return null; } - /* (non-Javadoc) + /** + * {@inheritDoc} + * @throws DebugException * @see org.eclipse.debug.core.model.IProcess#getExitValue() */ public int getExitValue() throws DebugException { @@ -241,7 +252,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction { return mIsTerminated; } - /* (non-Javadoc) + /** + * {@inheritDoc} + * @throws DebugException * @see org.eclipse.debug.core.model.ITerminate#terminate() */ public void terminate() throws DebugException { -- 2.11.0