Automated import from //branches/master/...@140724,140724
This commit is contained in:
committed by
The Android Open Source Project
parent
ea2f618d74
commit
05fcbf1335
@@ -17,6 +17,7 @@
|
|||||||
package com.android.ide.eclipse.adt.launch;
|
package com.android.ide.eclipse.adt.launch;
|
||||||
|
|
||||||
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.sdk.Sdk;
|
import com.android.ide.eclipse.adt.sdk.Sdk;
|
||||||
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
import com.android.ide.eclipse.common.project.BaseProjectHelper;
|
||||||
import com.android.ide.eclipse.ddms.DdmsPlugin;
|
import com.android.ide.eclipse.ddms.DdmsPlugin;
|
||||||
@@ -292,14 +293,15 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
|
|||||||
public void initializeFrom(ILaunchConfiguration configuration) {
|
public void initializeFrom(ILaunchConfiguration configuration) {
|
||||||
AvdManager avdManager = Sdk.getCurrent().getAvdManager();
|
AvdManager avdManager = Sdk.getCurrent().getAvdManager();
|
||||||
|
|
||||||
boolean value = LaunchConfigDelegate.DEFAULT_TARGET_MODE; // true == automatic
|
TargetMode mode = LaunchConfigDelegate.DEFAULT_TARGET_MODE; // true == automatic
|
||||||
try {
|
try {
|
||||||
value = configuration.getAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE, value);
|
mode = TargetMode.getMode(configuration.getAttribute(
|
||||||
|
LaunchConfigDelegate.ATTR_TARGET_MODE, mode.getValue()));
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
// let's not do anything here, we'll use the default value
|
// let's not do anything here, we'll use the default value
|
||||||
}
|
}
|
||||||
mAutoTargetButton.setSelection(value);
|
mAutoTargetButton.setSelection(mode.getValue());
|
||||||
mManualTargetButton.setSelection(!value);
|
mManualTargetButton.setSelection(!mode.getValue());
|
||||||
|
|
||||||
// look for the project name to get its target.
|
// look for the project name to get its target.
|
||||||
String stringValue = "";
|
String stringValue = "";
|
||||||
@@ -354,7 +356,7 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
|
|||||||
mPreferredAvdSelector.setSelection(null);
|
mPreferredAvdSelector.setSelection(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
value = LaunchConfigDelegate.DEFAULT_WIPE_DATA;
|
boolean value = LaunchConfigDelegate.DEFAULT_WIPE_DATA;
|
||||||
try {
|
try {
|
||||||
value = configuration.getAttribute(LaunchConfigDelegate.ATTR_WIPE_DATA, value);
|
value = configuration.getAttribute(LaunchConfigDelegate.ATTR_WIPE_DATA, value);
|
||||||
} catch (CoreException e) {
|
} catch (CoreException e) {
|
||||||
@@ -440,7 +442,7 @@ public class EmulatorConfigTab extends AbstractLaunchConfigurationTab {
|
|||||||
*/
|
*/
|
||||||
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
|
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
|
||||||
configuration.setAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
|
configuration.setAttribute(LaunchConfigDelegate.ATTR_TARGET_MODE,
|
||||||
LaunchConfigDelegate.DEFAULT_TARGET_MODE);
|
LaunchConfigDelegate.DEFAULT_TARGET_MODE.getValue());
|
||||||
configuration.setAttribute(LaunchConfigDelegate.ATTR_SPEED,
|
configuration.setAttribute(LaunchConfigDelegate.ATTR_SPEED,
|
||||||
LaunchConfigDelegate.DEFAULT_SPEED);
|
LaunchConfigDelegate.DEFAULT_SPEED);
|
||||||
configuration.setAttribute(LaunchConfigDelegate.ATTR_DELAY,
|
configuration.setAttribute(LaunchConfigDelegate.ATTR_DELAY,
|
||||||
|
|||||||
Reference in New Issue
Block a user