OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014, the Dart project authors. | 2 * Copyright (c) 2014, the 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 |
(...skipping 16 matching lines...) Expand all Loading... |
27 import com.google.dart.tools.debug.core.pubserve.PubServeResourceResolver; | 27 import com.google.dart.tools.debug.core.pubserve.PubServeResourceResolver; |
28 import com.google.dart.tools.debug.core.util.BrowserManager; | 28 import com.google.dart.tools.debug.core.util.BrowserManager; |
29 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate; | 29 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate; |
30 import com.google.dart.tools.debug.core.util.IResourceResolver; | 30 import com.google.dart.tools.debug.core.util.IResourceResolver; |
31 import com.google.dart.tools.debug.core.util.ResourceServer; | 31 import com.google.dart.tools.debug.core.util.ResourceServer; |
32 import com.google.dart.tools.debug.core.util.ResourceServerManager; | 32 import com.google.dart.tools.debug.core.util.ResourceServerManager; |
33 import com.google.dart.tools.debug.core.webkit.ChromiumTabInfo; | 33 import com.google.dart.tools.debug.core.webkit.ChromiumTabInfo; |
34 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser; | 34 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser; |
35 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser; | 35 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser; |
36 | 36 |
37 import org.eclipse.core.resources.IFile; | 37 import org.eclipse.core.resources.IContainer; |
38 import org.eclipse.core.resources.IResource; | 38 import org.eclipse.core.resources.IResource; |
39 import org.eclipse.core.runtime.CoreException; | 39 import org.eclipse.core.runtime.CoreException; |
40 import org.eclipse.core.runtime.IProgressMonitor; | 40 import org.eclipse.core.runtime.IProgressMonitor; |
41 import org.eclipse.core.runtime.IStatus; | 41 import org.eclipse.core.runtime.IStatus; |
42 import org.eclipse.core.runtime.NullProgressMonitor; | 42 import org.eclipse.core.runtime.NullProgressMonitor; |
43 import org.eclipse.core.runtime.Status; | 43 import org.eclipse.core.runtime.Status; |
44 import org.eclipse.debug.core.DebugException; | 44 import org.eclipse.debug.core.DebugException; |
45 import org.eclipse.debug.core.DebugPlugin; | 45 import org.eclipse.debug.core.DebugPlugin; |
46 import org.eclipse.debug.core.ILaunch; | 46 import org.eclipse.debug.core.ILaunch; |
47 import org.eclipse.debug.core.ILaunchConfiguration; | 47 import org.eclipse.debug.core.ILaunchConfiguration; |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 IStatus.ERROR, | 191 IStatus.ERROR, |
192 DartDebugCorePlugin.PLUGIN_ID, | 192 DartDebugCorePlugin.PLUGIN_ID, |
193 "Error in specified url")); | 193 "Error in specified url")); |
194 } | 194 } |
195 } | 195 } |
196 | 196 |
197 DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch); | 197 DebugPlugin.getDefault().getLaunchManager().removeLaunch(launch); |
198 } | 198 } |
199 | 199 |
200 @Override | 200 @Override |
201 public IDebugTarget performRemoteConnection(String host, int port, IFile file, | 201 public IDebugTarget performRemoteConnection(String host, int port, IContainer
container, |
202 IProgressMonitor monitor, boolean usePubServe) throws CoreException { | 202 IProgressMonitor monitor, boolean usePubServe) throws CoreException { |
203 | 203 |
204 BrowserManager browserManager = new BrowserManager(); | 204 BrowserManager browserManager = new BrowserManager(); |
205 | 205 |
206 IResourceResolver resolver = null; | 206 IResourceResolver resolver = null; |
207 try { | 207 try { |
208 resolver = usePubServe ? new PubServeResourceResolver() : ResourceServerMa
nager.getServer(); | 208 resolver = usePubServe ? new PubServeResourceResolver() : ResourceServerMa
nager.getServer(); |
209 } catch (IOException e) { | 209 } catch (IOException e) { |
210 return null; | 210 return null; |
211 } | 211 } |
212 | 212 |
213 return browserManager.performRemoteConnection( | 213 return browserManager.performRemoteConnection( |
214 new ChromeTabChooser(), | 214 new ChromeTabChooser(), |
215 host, | 215 host, |
216 port, | 216 port, |
217 monitor, | 217 monitor, |
218 resolver); | 218 resolver); |
219 | |
220 } | 219 } |
221 | 220 |
222 protected void launchOnMobile(String launchUrl, boolean usePubServe, IProgress
Monitor monitor) | 221 protected void launchOnMobile(String launchUrl, boolean usePubServe, IProgress
Monitor monitor) |
223 throws CoreException { | 222 throws CoreException { |
224 | 223 |
225 AndroidDebugBridge devBridge = AndroidDebugBridge.getAndroidDebugBridge(); | 224 AndroidDebugBridge devBridge = AndroidDebugBridge.getAndroidDebugBridge(); |
226 | 225 |
227 devBridge.startAdbServer(); | 226 devBridge.startAdbServer(); |
228 AndroidDevice device = devBridge.getConnectedDevice(); | 227 AndroidDevice device = devBridge.getConnectedDevice(); |
229 if (device == null) { | 228 if (device == null) { |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 return true; | 289 return true; |
291 } | 290 } |
292 } catch (DebugException e) { | 291 } catch (DebugException e) { |
293 | 292 |
294 } | 293 } |
295 } | 294 } |
296 return false; | 295 return false; |
297 } | 296 } |
298 | 297 |
299 } | 298 } |
OLD | NEW |