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

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

Issue 888643002: fix for hyperlinking in console (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 return absoluteFile.toURI().toString(); 290 return absoluteFile.toURI().toString();
291 } 291 }
292 } 292 }
293 } 293 }
294 return null; 294 return null;
295 } 295 }
296 296
297 private String resolveRelativePath(String url) { 297 private String resolveRelativePath(String url) {
298 if (container != null) { 298 if (container != null) {
299 IResource file = container.findMember(url); 299 IResource file = container.findMember(url);
300 if (file == null) {
301 file = container.getProject().findMember(url);
302 }
300 if (file != null) { 303 if (file != null) {
301 return file.getLocation().toOSString(); 304 return file.getLocation().toOSString();
302 } 305 }
303 } 306 }
304 return null; 307 return null;
305 } 308 }
306 309
307 private String returnAbsoluteOrRelative(String path) { 310 private String returnAbsoluteOrRelative(String path) {
308 // If path exists, return that. 311 // If path exists, return that.
309 File file = new File(path); 312 File file = new File(path);
(...skipping 12 matching lines...) Expand all
322 return resource.getLocation().toFile().getAbsolutePath(); 325 return resource.getLocation().toFile().getAbsolutePath();
323 } 326 }
324 index = path.indexOf('/', index + 1); 327 index = path.indexOf('/', index + 1);
325 } 328 }
326 } 329 }
327 330
328 // Else, return the original path. 331 // Else, return the original path.
329 return path; 332 return path;
330 } 333 }
331 } 334 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698