Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(374)

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileLaunchShortcut.java

Issue 321583008: Merge to trunk cl - fixes/features for mobile support in the editor (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileLaunchShortcut.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileLaunchShortcut.java (revision 37106)
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileLaunchShortcut.java (working copy)
@@ -13,10 +13,12 @@
*/
package com.google.dart.tools.debug.ui.internal.mobile;
+import com.google.dart.tools.core.mobile.AndroidDebugBridge;
import com.google.dart.tools.core.model.DartSdkManager;
import com.google.dart.tools.debug.core.DartDebugCorePlugin;
import com.google.dart.tools.debug.core.DartLaunchConfigWrapper;
import com.google.dart.tools.debug.ui.internal.DartUtil;
+import com.google.dart.tools.debug.ui.internal.dialogs.ManageLaunchesDialog;
import com.google.dart.tools.debug.ui.internal.util.AbstractLaunchShortcut;
import com.google.dart.tools.debug.ui.internal.util.ILaunchShortcutExt;
import com.google.dart.tools.debug.ui.internal.util.LaunchUtils;
@@ -30,6 +32,7 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.ui.PlatformUI;
/**
* A launch shortcut to allow users to launch Dart applications on Mobile.
@@ -96,6 +99,7 @@
launchWrapper.setApplicationName(resource.getFullPath().toString());
launchWrapper.setProjectName(resource.getProject().getName());
+ launchWrapper.setUsePubServe(false);
launchConfig.setMappedResources(new IResource[] {resource});
try {
@@ -106,6 +110,12 @@
}
}
+ // If device is not connected or not authorized then open launch dialog
+ if (!AndroidDebugBridge.getAndroidDebugBridge().isDeviceConnectedAndAuthorized()) {
+ ManageLaunchesDialog.openAsync(PlatformUI.getWorkbench().getActiveWorkbenchWindow(), config);
+ return;
+ }
+
DartLaunchConfigWrapper launchWrapper = new DartLaunchConfigWrapper(config);
launchWrapper.markAsLaunched();
LaunchUtils.clearDartiumConsoles();

Powered by Google App Engine
This is Rietveld 408576698