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

Side by Side Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/configs/DartiumLaunchConfigurationDelegate.java

Issue 772443002: Version 1.8.2 (Closed) Base URL: http://dart.googlecode.com/svn/branches/1.8/
Patch Set: Created 6 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012, the Dart project authors. 2 * Copyright (c) 2012, 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 14 matching lines...) Expand all
25 import com.google.dart.tools.debug.core.pubserve.PubServeResourceResolver; 25 import com.google.dart.tools.debug.core.pubserve.PubServeResourceResolver;
26 import com.google.dart.tools.debug.core.util.BrowserManager; 26 import com.google.dart.tools.debug.core.util.BrowserManager;
27 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate; 27 import com.google.dart.tools.debug.core.util.IRemoteConnectionDelegate;
28 import com.google.dart.tools.debug.core.util.IResourceResolver; 28 import com.google.dart.tools.debug.core.util.IResourceResolver;
29 import com.google.dart.tools.debug.core.util.LaunchConfigResourceResolver; 29 import com.google.dart.tools.debug.core.util.LaunchConfigResourceResolver;
30 import com.google.dart.tools.debug.core.util.ResourceServer; 30 import com.google.dart.tools.debug.core.util.ResourceServer;
31 import com.google.dart.tools.debug.core.util.ResourceServerManager; 31 import com.google.dart.tools.debug.core.util.ResourceServerManager;
32 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser; 32 import com.google.dart.tools.debug.core.webkit.DefaultChromiumTabChooser;
33 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser; 33 import com.google.dart.tools.debug.core.webkit.IChromiumTabChooser;
34 34
35 import org.eclipse.core.resources.IContainer;
35 import org.eclipse.core.resources.IFile; 36 import org.eclipse.core.resources.IFile;
36 import org.eclipse.core.resources.IResource; 37 import org.eclipse.core.resources.IResource;
37 import org.eclipse.core.runtime.CoreException; 38 import org.eclipse.core.runtime.CoreException;
38 import org.eclipse.core.runtime.IProgressMonitor; 39 import org.eclipse.core.runtime.IProgressMonitor;
39 import org.eclipse.core.runtime.IStatus; 40 import org.eclipse.core.runtime.IStatus;
40 import org.eclipse.core.runtime.NullProgressMonitor; 41 import org.eclipse.core.runtime.NullProgressMonitor;
41 import org.eclipse.core.runtime.Status; 42 import org.eclipse.core.runtime.Status;
42 import org.eclipse.debug.core.ILaunch; 43 import org.eclipse.debug.core.ILaunch;
43 import org.eclipse.debug.core.ILaunchConfiguration; 44 import org.eclipse.debug.core.ILaunchConfiguration;
44 import org.eclipse.debug.core.ILaunchManager; 45 import org.eclipse.debug.core.ILaunchManager;
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 if (launchSemaphore.tryAcquire()) { 111 if (launchSemaphore.tryAcquire()) {
111 try { 112 try {
112 launchImpl(mode, monitor); 113 launchImpl(mode, monitor);
113 } finally { 114 } finally {
114 launchSemaphore.release(); 115 launchSemaphore.release();
115 } 116 }
116 } 117 }
117 } 118 }
118 119
119 @Override 120 @Override
120 public IDebugTarget performRemoteConnection(String host, int port, IFile file, 121 public IDebugTarget performRemoteConnection(String host, int port, IContainer container,
121 IProgressMonitor monitor, boolean usePubServe) throws CoreException { 122 IProgressMonitor monitor, boolean usePubServe) throws CoreException {
122 BrowserManager browserManager = new BrowserManager(); 123 BrowserManager browserManager = new BrowserManager();
123 124
124 IResourceResolver resolver = null; 125 IResourceResolver resolver = null;
125 try { 126 try {
126 resolver = usePubServe ? new PubServeResourceResolver() : ResourceServerMa nager.getServer(); 127 resolver = usePubServe ? new PubServeResourceResolver() : ResourceServerMa nager.getServer();
127 } catch (IOException e) { 128 } catch (IOException e) {
128 return null; 129 return null;
129 } 130 }
130 131
131 return browserManager.performRemoteConnection(tabChooser, host, port, monito r, resolver); 132 return browserManager.performRemoteConnection(tabChooser, host, port, monito r, resolver);
132
133 } 133 }
134 134
135 private ResourceServer getResourceServer() throws CoreException { 135 private ResourceServer getResourceServer() throws CoreException {
136 ResourceServer resourceResolver;
136 137
137 ResourceServer resourceResolver;
138 try { 138 try {
139 resourceResolver = ResourceServerManager.getServer(); 139 resourceResolver = ResourceServerManager.getServer();
140 } catch (IOException ioe) { 140 } catch (IOException ioe) {
141 throw new CoreException(new Status( 141 throw new CoreException(new Status(
142 IStatus.ERROR, 142 IStatus.ERROR,
143 DartDebugCorePlugin.PLUGIN_ID, 143 DartDebugCorePlugin.PLUGIN_ID,
144 ioe.getMessage(), 144 ioe.getMessage(),
145 ioe)); 145 ioe));
146 } 146 }
147 147
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 manager.launchBrowser( 213 manager.launchBrowser(
214 launch, 214 launch,
215 launchConfig, 215 launchConfig,
216 url, 216 url,
217 new NullProgressMonitor(), 217 new NullProgressMonitor(),
218 enableDebugging, 218 enableDebugging,
219 new PubServeResourceResolver()); 219 new PubServeResourceResolver());
220 220
221 } 221 }
222 } 222 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698