AI 143350: am: CL 143199 am: CL 142978 ADT #1738393: fix typo in launch controller.
Also fixed some javadoc warnings. Original author: raphael Merged from: //branches/cupcake/... Original author: android-build Merged from: //branches/donutburger/... Automated import of CL 143350
This commit is contained in:
committed by
The Android Open Source Project
parent
84426e4d3f
commit
f4d5d5c082
@@ -32,8 +32,14 @@ public class AndroidLaunchConfiguration {
|
|||||||
*/
|
*/
|
||||||
public int mLaunchAction = LaunchConfigDelegate.DEFAULT_LAUNCH_ACTION;
|
public int mLaunchAction = LaunchConfigDelegate.DEFAULT_LAUNCH_ACTION;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Target selection mode for the configuration: either {@link #AUTO} or {@link #MANUAL}.
|
||||||
|
*/
|
||||||
public enum TargetMode {
|
public enum TargetMode {
|
||||||
AUTO(true), MANUAL(false);
|
/** Automatic target selection mode. */
|
||||||
|
AUTO(true),
|
||||||
|
/** Manual target selection mode. */
|
||||||
|
MANUAL(false);
|
||||||
|
|
||||||
private boolean mValue;
|
private boolean mValue;
|
||||||
|
|
||||||
@@ -58,10 +64,7 @@ public class AndroidLaunchConfiguration {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Target selection mode.
|
* Target selection mode.
|
||||||
* <ul>
|
* @see TargetMode
|
||||||
* <li><code>true</code>: automatic mode, see {@link #AUTO_TARGET_MODE}</li>
|
|
||||||
* <li><code>false</code>: manual mode</li>
|
|
||||||
* </ul>
|
|
||||||
*/
|
*/
|
||||||
public TargetMode mTargetMode = LaunchConfigDelegate.DEFAULT_TARGET_MODE;
|
public TargetMode mTargetMode = LaunchConfigDelegate.DEFAULT_TARGET_MODE;
|
||||||
|
|
||||||
|
|||||||
@@ -17,9 +17,6 @@
|
|||||||
package com.android.ide.eclipse.adt.launch;
|
package com.android.ide.eclipse.adt.launch;
|
||||||
|
|
||||||
import com.android.ddmlib.AndroidDebugBridge;
|
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.Client;
|
||||||
import com.android.ddmlib.ClientData;
|
import com.android.ddmlib.ClientData;
|
||||||
import com.android.ddmlib.Device;
|
import com.android.ddmlib.Device;
|
||||||
@@ -27,6 +24,9 @@ import com.android.ddmlib.IDevice;
|
|||||||
import com.android.ddmlib.Log;
|
import com.android.ddmlib.Log;
|
||||||
import com.android.ddmlib.MultiLineReceiver;
|
import com.android.ddmlib.MultiLineReceiver;
|
||||||
import com.android.ddmlib.SyncService;
|
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.ddmlib.SyncService.SyncResult;
|
||||||
import com.android.ide.eclipse.adt.AdtPlugin;
|
import com.android.ide.eclipse.adt.AdtPlugin;
|
||||||
import com.android.ide.eclipse.adt.launch.AndroidLaunchConfiguration.TargetMode;
|
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.launch.DeviceChooserDialog.DeviceChooserResponse;
|
||||||
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
import com.android.ide.eclipse.adt.project.ProjectHelper;
|
||||||
import com.android.ide.eclipse.adt.sdk.Sdk;
|
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.ide.eclipse.common.project.AndroidManifestParser;
|
||||||
import com.android.prefs.AndroidLocation.AndroidLocationException;
|
|
||||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||||
|
import com.android.prefs.AndroidLocation.AndroidLocationException;
|
||||||
import com.android.sdklib.IAndroidTarget;
|
import com.android.sdklib.IAndroidTarget;
|
||||||
import com.android.sdklib.SdkManager;
|
import com.android.sdklib.SdkManager;
|
||||||
import com.android.sdklib.avd.AvdManager;
|
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.ILaunchManager;
|
||||||
import org.eclipse.debug.core.model.IDebugTarget;
|
import org.eclipse.debug.core.model.IDebugTarget;
|
||||||
import org.eclipse.debug.ui.DebugUITools;
|
import org.eclipse.debug.ui.DebugUITools;
|
||||||
import org.eclipse.jdt.core.IJavaModel;
|
|
||||||
import org.eclipse.jdt.core.IJavaProject;
|
import org.eclipse.jdt.core.IJavaProject;
|
||||||
import org.eclipse.jdt.core.JavaModelException;
|
import org.eclipse.jdt.core.JavaModelException;
|
||||||
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
|
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.
|
* List of {@link DelayedLaunchInfo} waiting for an emulator to connect.
|
||||||
* <p>Once an emulator has connected, {@link DelayedLaunchInfo#mDevice} is set and the
|
* <p>Once an emulator has connected, {@link DelayedLaunchInfo#getDevice()} is set and the
|
||||||
* DelayedLaunchInfo object is moved to {@link AndroidLaunchController#mWaitingForReadyEmulatorList}.
|
* DelayedLaunchInfo object is moved to
|
||||||
|
* {@link AndroidLaunchController#mWaitingForReadyEmulatorList}.
|
||||||
* <b>ALL ACCESS MUST BE INSIDE A <code>synchronized (sListLock)</code> block!</b>
|
* <b>ALL ACCESS MUST BE INSIDE A <code>synchronized (sListLock)</code> block!</b>
|
||||||
*/
|
*/
|
||||||
private final ArrayList<DelayedLaunchInfo> mWaitingForEmulatorLaunches =
|
private final ArrayList<DelayedLaunchInfo> mWaitingForEmulatorLaunches =
|
||||||
@@ -487,7 +486,7 @@ public final class AndroidLaunchController implements IDebugBridgeChangeListener
|
|||||||
// FIXME: ask the user if he wants to create a AVD.
|
// FIXME: ask the user if he wants to create a AVD.
|
||||||
// we found no compatible AVD.
|
// we found no compatible AVD.
|
||||||
AdtPlugin.printErrorToConsole(project, String.format(
|
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()));
|
projectTarget.getName()));
|
||||||
stopLaunch(launchInfo);
|
stopLaunch(launchInfo);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
* Launch a instrumentation test run on given Android device.
|
* Launch a instrumentation test run on given Android device.
|
||||||
* Reuses JDT JUnit launch delegate so results can be communicated back to JDT JUnit UI.
|
* 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) {
|
public boolean doLaunchAction(DelayedLaunchInfo info, IDevice device) {
|
||||||
String msg = String.format("Launching instrumentation %s on device %s", mRunner,
|
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);
|
super.launch(configuration, mode, launch, monitor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @throws CoreException
|
||||||
* @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
|
* @see org.eclipse.jdt.junit.launcher.JUnitLaunchConfigurationDelegate#verifyMainTypeName(org.eclipse.debug.core.ILaunchConfiguration)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -119,6 +121,7 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
/**
|
/**
|
||||||
* Overrides parent to return a VM Runner implementation which launches a thread, rather
|
* Overrides parent to return a VM Runner implementation which launches a thread, rather
|
||||||
* than a separate VM process
|
* than a separate VM process
|
||||||
|
* @throws CoreException
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode)
|
public IVMRunner getVMRunner(ILaunchConfiguration configuration, String mode)
|
||||||
@@ -127,7 +130,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
mTestPackage, mRunner, mLaunchInfo.isDebugMode(), mDevice));
|
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)
|
* @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
@@ -148,6 +153,10 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
mJUnitInfo = info;
|
mJUnitInfo = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @throws CoreException
|
||||||
|
*/
|
||||||
public void run(final VMRunnerConfiguration config, ILaunch launch,
|
public void run(final VMRunnerConfiguration config, ILaunch launch,
|
||||||
IProgressMonitor monitor) throws CoreException {
|
IProgressMonitor monitor) throws CoreException {
|
||||||
|
|
||||||
@@ -183,7 +192,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @throws DebugException
|
||||||
* @see org.eclipse.debug.core.model.IProcess#getExitValue()
|
* @see org.eclipse.debug.core.model.IProcess#getExitValue()
|
||||||
*/
|
*/
|
||||||
public int getExitValue() throws DebugException {
|
public int getExitValue() throws DebugException {
|
||||||
@@ -241,7 +252,9 @@ class AndroidJUnitLaunchAction implements IAndroidLaunchAction {
|
|||||||
return mIsTerminated;
|
return mIsTerminated;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/**
|
||||||
|
* {@inheritDoc}
|
||||||
|
* @throws DebugException
|
||||||
* @see org.eclipse.debug.core.model.ITerminate#terminate()
|
* @see org.eclipse.debug.core.model.ITerminate#terminate()
|
||||||
*/
|
*/
|
||||||
public void terminate() throws DebugException {
|
public void terminate() throws DebugException {
|
||||||
|
|||||||
Reference in New Issue
Block a user