| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Dart project authors. | 2 * Copyright 2013 Dart project authors. |
| 3 * | 3 * |
| 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except | 4 * Licensed under the Eclipse Public License v1.0 (the "License"); you may not u
se this file except |
| 5 * in compliance with the License. You may obtain a copy of the License at | 5 * in compliance with the License. You may obtain a copy of the License at |
| 6 * | 6 * |
| 7 * http://www.eclipse.org/legal/epl-v10.html | 7 * http://www.eclipse.org/legal/epl-v10.html |
| 8 * | 8 * |
| 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License | 9 * Unless required by applicable law or agreed to in writing, software distribut
ed under the License |
| 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express | 10 * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY K
IND, either express |
| 11 * or implied. See the License for the specific language governing permissions a
nd limitations under | 11 * or implied. See the License for the specific language governing permissions a
nd limitations under |
| 12 * the License. | 12 * the License. |
| 13 */ | 13 */ |
| 14 | 14 |
| 15 package com.google.dart.tools.debug.ui.internal.dialogs; | 15 package com.google.dart.tools.debug.ui.internal.dialogs; |
| 16 | 16 |
| 17 import com.google.dart.tools.debug.core.configs.DartServerLaunchConfigurationDel
egate; | 17 import com.google.dart.tools.debug.core.configs.DartServerLaunchConfigurationDel
egate; |
| 18 import com.google.dart.tools.debug.core.configs.DartiumLaunchConfigurationDelega
te; | 18 import com.google.dart.tools.debug.core.configs.DartiumLaunchConfigurationDelega
te; |
| 19 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate; | 19 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate; |
| 20 import com.google.dart.tools.debug.core.webkit.ChromiumTabInfo; | 20 import com.google.dart.tools.debug.core.webkit.ChromiumTabInfo; |
| 21 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser; | 21 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser; |
| 22 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser; | 22 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser; |
| 23 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; | 23 import com.google.dart.tools.debug.ui.internal.DartDebugUIPlugin; |
| 24 import com.google.dart.tools.debug.ui.internal.view.DebuggerView; | 24 import com.google.dart.tools.debug.ui.internal.view.DebuggerViewManager; |
| 25 import com.google.dart.tools.ui.DartToolsPlugin; | |
| 26 import com.google.dart.tools.ui.themes.Fonts; | 25 import com.google.dart.tools.ui.themes.Fonts; |
| 27 | 26 |
| 28 import org.eclipse.core.runtime.CoreException; | 27 import org.eclipse.core.runtime.CoreException; |
| 29 import org.eclipse.core.runtime.IProgressMonitor; | 28 import org.eclipse.core.runtime.IProgressMonitor; |
| 30 import org.eclipse.core.runtime.IStatus; | 29 import org.eclipse.core.runtime.IStatus; |
| 31 import org.eclipse.core.runtime.Status; | 30 import org.eclipse.core.runtime.Status; |
| 32 import org.eclipse.core.runtime.jobs.Job; | 31 import org.eclipse.core.runtime.jobs.Job; |
| 33 import org.eclipse.jface.dialogs.ErrorDialog; | 32 import org.eclipse.jface.dialogs.ErrorDialog; |
| 34 import org.eclipse.jface.dialogs.IDialogSettings; | 33 import org.eclipse.jface.dialogs.IDialogSettings; |
| 35 import org.eclipse.jface.dialogs.TitleAreaDialog; | 34 import org.eclipse.jface.dialogs.TitleAreaDialog; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 129 |
| 131 this.connectionDelegate = connectionDelegate; | 130 this.connectionDelegate = connectionDelegate; |
| 132 this.host = host; | 131 this.host = host; |
| 133 this.port = port; | 132 this.port = port; |
| 134 this.usePubServe = usePubServe; | 133 this.usePubServe = usePubServe; |
| 135 } | 134 } |
| 136 | 135 |
| 137 @Override | 136 @Override |
| 138 protected IStatus run(IProgressMonitor monitor) { | 137 protected IStatus run(IProgressMonitor monitor) { |
| 139 try { | 138 try { |
| 140 | |
| 141 connectionDelegate.performRemoteConnection(host, port, monitor, usePubSe
rve); | 139 connectionDelegate.performRemoteConnection(host, port, monitor, usePubSe
rve); |
| 142 | 140 |
| 143 // Show the debugger view. | 141 // Show the debugger view. |
| 144 Display.getDefault().asyncExec(new Runnable() { | 142 Display.getDefault().asyncExec(new Runnable() { |
| 145 @Override | 143 @Override |
| 146 public void run() { | 144 public void run() { |
| 147 DartToolsPlugin.showView(DebuggerView.ID); | 145 DebuggerViewManager viewManager = DebuggerViewManager.getDefault(); |
| 146 |
| 147 if (viewManager.hasDebuggerView()) { |
| 148 viewManager.openDebuggerView(); |
| 149 } |
| 148 } | 150 } |
| 149 }); | 151 }); |
| 150 } catch (CoreException ce) { | 152 } catch (CoreException ce) { |
| 151 displayError(ce); | 153 displayError(ce); |
| 152 } | 154 } |
| 153 | 155 |
| 154 return Status.OK_STATUS; | 156 return Status.OK_STATUS; |
| 155 } | 157 } |
| 156 | 158 |
| 157 private void displayError(final CoreException exception) { | 159 private void displayError(final CoreException exception) { |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 portText.setText(notNull(settings.get(connection.name() + ".port"))); | 438 portText.setText(notNull(settings.get(connection.name() + ".port"))); |
| 437 | 439 |
| 438 pubGroup.setVisible(connection == ConnectionType.CHROME); | 440 pubGroup.setVisible(connection == ConnectionType.CHROME); |
| 439 } | 441 } |
| 440 | 442 |
| 441 private String notNull(String str) { | 443 private String notNull(String str) { |
| 442 return str == null ? "" : str; | 444 return str == null ? "" : str; |
| 443 } | 445 } |
| 444 | 446 |
| 445 } | 447 } |
| OLD | NEW |