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

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

Issue 11420080: Several UI improvements to launching and the manage launches dialog. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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: editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/dartium/DartiumMainTab.java
===================================================================
--- editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/dartium/DartiumMainTab.java (revision 15120)
+++ editor/tools/plugins/com.google.dart.tools.debug.ui/src/com/google/dart/tools/debug/ui/internal/dartium/DartiumMainTab.java (working copy)
@@ -21,6 +21,7 @@
import com.google.dart.tools.debug.core.DartLaunchConfigWrapper;
import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin;
import com.google.dart.tools.debug.ui.internal.util.AppSelectionDialog;
+import com.google.dart.tools.ui.internal.util.ExternalBrowserUtil;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
@@ -43,10 +44,12 @@
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Image;
+import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Link;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.FilteredItemsSelectionDialog;
@@ -139,17 +142,28 @@
group.setText("Dartium settings");
GridDataFactory.fillDefaults().grab(true, false).applyTo(group);
GridLayoutFactory.swtDefaults().numColumns(3).applyTo(group);
+ ((GridLayout) group.getLayout()).marginBottom = 5;
checkedModeButton = new Button(group, SWT.CHECK);
checkedModeButton.setText("Run in checked mode");
- GridDataFactory.swtDefaults().span(3, 1).applyTo(checkedModeButton);
checkedModeButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
notifyPanelChanged();
}
});
+ GridDataFactory.swtDefaults().span(2, 1).grab(true, false).applyTo(checkedModeButton);
+ Link infoLink = new Link(group, SWT.NONE);
+ infoLink.setText("<a href=\"" + DartDebugUIPlugin.CHECK_MODE_DESC_URL
+ + "\">what is checked mode?</a>");
+ infoLink.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ ExternalBrowserUtil.openInExternalBrowser(DartDebugUIPlugin.CHECK_MODE_DESC_URL);
+ }
+ });
+
enableDebuggingButton = new Button(group, SWT.CHECK);
enableDebuggingButton.setText("Enable debugging");
GridDataFactory.swtDefaults().span(3, 1).applyTo(enableDebuggingButton);
@@ -162,6 +176,8 @@
useWebComponentsButton = new Button(group, SWT.CHECK);
useWebComponentsButton.setText("Enable experimental Webkit features (Web Components)");
+ useWebComponentsButton.setToolTipText("--enable-experimental-webkit-features"
+ + " and --enable-devtools-experiments");
GridDataFactory.swtDefaults().span(3, 1).applyTo(useWebComponentsButton);
useWebComponentsButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -182,18 +198,12 @@
// additional browser arguments
Label argsLabel = new Label(group, SWT.NONE);
- argsLabel.setText("Arguments:");
- GridDataFactory.swtDefaults().hint(getLabelColumnWidth(), -1).applyTo(argsLabel);
+ argsLabel.setText("Browser arguments:");
argumentText = new Text(group, SWT.BORDER | SWT.SINGLE);
- GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).applyTo(
+ GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).span(2, 1).applyTo(
argumentText);
- Label spacer = new Label(group, SWT.NONE);
- PixelConverter converter = new PixelConverter(spacer);
- int widthHint = converter.convertHorizontalDLUsToPixels(IDialogConstants.BUTTON_WIDTH);
- GridDataFactory.swtDefaults().align(SWT.FILL, SWT.BEGINNING).hint(widthHint, -1).applyTo(spacer);
-
setControl(composite);
}
@@ -237,19 +247,22 @@
public void initializeFrom(ILaunchConfiguration configuration) {
DartLaunchConfigWrapper dartLauncher = new DartLaunchConfigWrapper(configuration);
+ htmlText.setText(dartLauncher.getApplicationName());
+ urlText.setText(dartLauncher.getUrl());
+ IProject project = dartLauncher.getProject();
+ if (project != null) {
+ projectText.setText(project.getName());
+ } else {
+ projectText.setText("");
+ }
+
if (dartLauncher.getShouldLaunchFile()) {
htmlButton.setSelection(true);
- htmlText.setText(dartLauncher.getApplicationName());
- urlText.setText(dartLauncher.getUrl());
- projectText.setText(dartLauncher.getProjectName());
urlButton.setSelection(false);
updateEnablements(true);
} else {
+ htmlButton.setSelection(false);
urlButton.setSelection(true);
- urlText.setText(dartLauncher.getUrl());
- projectText.setText(dartLauncher.getProjectName());
- htmlText.setText(dartLauncher.getApplicationName());
- htmlButton.setSelection(false);
updateEnablements(false);
}
@@ -428,10 +441,15 @@
dialog.open();
Object[] results = dialog.getResult();
+
if ((results != null) && (results.length > 0) && (results[0] instanceof IFile)) {
- String pathStr = ((IFile) results[0]).getFullPath().toPortableString();
+ IFile file = (IFile) results[0];
+ String pathStr = file.getFullPath().toPortableString();
htmlText.setText(pathStr);
+ projectText.setText(file.getProject().getName());
+
+ notifyPanelChanged();
}
}
@@ -455,6 +473,7 @@
dialog.open();
Object[] results = dialog.getResult();
+
if ((results != null) && (results.length > 0) && (results[0] instanceof IProject)) {
String pathStr = ((IProject) results[0]).getFullPath().toPortableString();
projectText.setText(pathStr);

Powered by Google App Engine
This is Rietveld 408576698