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

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

Issue 343533003: Version 1.5.0-dev.4.15 (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/MobileMainTab.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileMainTab.java (revision 37437)
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/mobile/MobileMainTab.java (working copy)
@@ -54,6 +54,9 @@
private static final String DEVICE_NOT_FOUND = "No mobile found or USB development not enabled on mobile";
public static final String MOBILE_DOC_URL = "https://www.dartlang.org/tools/editor/mobile.html";
+ // PORT_FORWARD_DOC_URL should be #set-up-port-forwarding but is #connect-the-devices
+ // until dartbug.com/19457 is fixed.
+ public static final String PORT_FORWARD_DOC_URL = MOBILE_DOC_URL + "#connect-the-devices";
private static final String INFO_TEXT = "Serve the application using 'pub serve'. "
+ "This requires setting up port forwarding.";
@@ -70,12 +73,6 @@
private Label infoLabel;
@Override
- public void activated(ILaunchConfigurationWorkingCopy workingCopy) {
- startMonitorDeviceConnectionInBackground(launchTargetGroup.getDisplay());
- super.activated(workingCopy);
- }
-
- @Override
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayoutFactory.swtDefaults().spacing(1, 3).applyTo(composite);
@@ -116,17 +113,23 @@
infoLabel.setText(INFO_TEXT);
GridDataFactory.swtDefaults().grab(true, false).span(1, 2).applyTo(infoLabel);
- infoLink = new Link(group, SWT.NONE);
+ infoLink = new Link(group, SWT.WRAP);
infoLink.setText("Some configurations may require setting up port forwarding in order for the "
+ "mobile device to see the web server running on your development machine. See <a href=\""
- + MOBILE_DOC_URL + "\"> port forwarding setup </a> for more information.");
+ + PORT_FORWARD_DOC_URL + "\"> port forwarding setup </a> for more information.");
infoLink.addSelectionListener(new SelectionAdapter() {
@Override
+ public void widgetDefaultSelected(SelectionEvent e) {
+ widgetSelected(e);
+ }
+
+ @Override
public void widgetSelected(SelectionEvent e) {
- ExternalBrowserUtil.openInExternalBrowser(MOBILE_DOC_URL);
+ ExternalBrowserUtil.openInExternalBrowser(e.text.trim());
}
});
- GridDataFactory.swtDefaults().span(2, 1).grab(true, false).applyTo(infoLink);
+ GridDataFactory.swtDefaults().span(2, 1).grab(true, false).hint(415, SWT.DEFAULT).applyTo(
+ infoLink);
new Label(group, SWT.NONE);
setControl(composite);
@@ -204,6 +207,8 @@
serversCombo.select(0);
handleComboChanged(false);
}
+
+ startMonitorDeviceConnectionInBackground(launchTargetGroup.getDisplay());
}
/**
@@ -247,6 +252,7 @@
} else {
infoLabel.setText("");
}
+ notifyPanelChanged();
}
private void notifyPanelChanged() {

Powered by Google App Engine
This is Rietveld 408576698