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

Unified Diff: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/util/LaunchConfigResourceResolver.java

Issue 125033003: Version 1.1.0-dev.5.1 (Closed) Base URL: http://dart.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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
Index: dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/util/LaunchConfigResourceResolver.java
===================================================================
--- dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/util/LaunchConfigResourceResolver.java (revision 31466)
+++ dart/editor/tools/plugins/com.google.dart.tools.debug.core/src/com/google/dart/tools/debug/core/util/LaunchConfigResourceResolver.java (working copy)
@@ -69,13 +69,28 @@
@Override
public String getUrlRegexForResource(IResource resource) {
- String relPath = calcRelPath(getSourceContainer(), resource);
+ IContainer container = getSourceContainer();
- if (relPath == null) {
- return null;
+ String relPath = calcRelPath(container, resource);
+
+ if (relPath != null) {
+ return URIUtilities.uriEncode(relPath);
}
- return URIUtilities.uriEncode(relPath);
+ // Check for package or self-reference links.
+ if (container.getProject().equals(resource.getProject())) {
+ String path = resource.getFullPath().toString();
+
+ if (path.contains("/packages/") || path.contains("/lib/")) {
+ if (path.startsWith("/")) {
+ path = path.substring(1);
+ }
+
+ return URIUtilities.uriEncode(path);
+ }
+ }
+
+ return null;
}
@Override

Powered by Google App Engine
This is Rietveld 408576698