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

Unified Diff: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java

Issue 611473005: Issue 16417. Use better implemention for converting paths to resources. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java
diff --git a/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java b/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java
index 855600fee1333c7b895f8433bccea5400891113a..29543885d3c421a959d12f565b4bf36a152f0be2 100644
--- a/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java
+++ b/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/source/WorkspaceSourceContainer.java
@@ -50,24 +50,21 @@ public class WorkspaceSourceContainer extends AbstractSourceContainer {
if (path == null) {
return null;
}
+ File file = new File(path);
// Look for a resource reference (/project/directory/file.dart).
- IResource resource = ResourcesPlugin.getWorkspace().getRoot().findMember(path);
-
+ IResource resource = ResourceUtil.getResource(file);
if (resource != null) {
return resource;
}
// Look for something which could potentially resolve to a resource in the workspace.
resource = findPotentialWorkspaceMatch(path);
-
if (resource != null) {
return resource;
}
// Look for a file system reference.
- File file = new File(path);
-
if (file.exists() && !file.isDirectory()) {
IFile[] files = ResourcesPlugin.getWorkspace().getRoot().findFilesForLocationURI(file.toURI());
« 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