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

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

Issue 1047863004: fix for dartbug.com/23032 - breakpoints not triggering (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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) 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 20 matching lines...) Expand all
31 import org.eclipse.core.resources.IFile; 31 import org.eclipse.core.resources.IFile;
32 import org.eclipse.core.resources.IMarkerDelta; 32 import org.eclipse.core.resources.IMarkerDelta;
33 import org.eclipse.core.resources.IResource; 33 import org.eclipse.core.resources.IResource;
34 import org.eclipse.core.resources.IWorkspaceRoot; 34 import org.eclipse.core.resources.IWorkspaceRoot;
35 import org.eclipse.core.runtime.Path; 35 import org.eclipse.core.runtime.Path;
36 import org.eclipse.debug.core.DebugPlugin; 36 import org.eclipse.debug.core.DebugPlugin;
37 import org.eclipse.debug.core.IBreakpointListener; 37 import org.eclipse.debug.core.IBreakpointListener;
38 import org.eclipse.debug.core.model.IBreakpoint; 38 import org.eclipse.debug.core.model.IBreakpoint;
39 39
40 import java.io.IOException; 40 import java.io.IOException;
41 import java.io.UnsupportedEncodingException;
42 import java.net.URLDecoder;
41 import java.util.ArrayList; 43 import java.util.ArrayList;
42 import java.util.HashMap; 44 import java.util.HashMap;
43 import java.util.List; 45 import java.util.List;
44 import java.util.Map; 46 import java.util.Map;
45 47
46 /** 48 /**
47 * Handle adding a removing breakpoints to the WebKit connection for the Dartium DebugTarget class. 49 * Handle adding a removing breakpoints to the WebKit connection for the Dartium DebugTarget class.
48 */ 50 */
49 public class BreakpointManager implements IBreakpointListener, DartBreakpointMan ager { 51 public class BreakpointManager implements IBreakpointListener, DartBreakpointMan ager {
50 public static class NullBreakpointManager implements DartBreakpointManager { 52 public static class NullBreakpointManager implements DartBreakpointManager {
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 filePath = fileLocation; 231 filePath = fileLocation;
230 packagePath = resolvePathToPackage(resource, filePath); 232 packagePath = resolvePathToPackage(resource, filePath);
231 if (packagePath != null && packagePath.startsWith(DartCore.PACKAGE_SCHEME_ SPEC)) { 233 if (packagePath != null && packagePath.startsWith(DartCore.PACKAGE_SCHEME_ SPEC)) {
232 packagePath = packagePath.substring(DartCore.PACKAGE_SCHEME_SPEC.length( )); 234 packagePath = packagePath.substring(DartCore.PACKAGE_SCHEME_SPEC.length( ));
233 } 235 }
234 if (packagePath != null && packagePath.startsWith(FILE_SPEC)) { 236 if (packagePath != null && packagePath.startsWith(FILE_SPEC)) {
235 packagePath = packagePath.substring(FILE_SPEC.length()); 237 packagePath = packagePath.substring(FILE_SPEC.length());
236 if (DartCore.isWindows() && packagePath.startsWith("/")) { 238 if (DartCore.isWindows() && packagePath.startsWith("/")) {
237 packagePath = packagePath.substring(1); 239 packagePath = packagePath.substring(1);
238 } 240 }
241 try {
242 // server returns a url encoded string, so decode before matching
243 packagePath = URLDecoder.decode(packagePath, "UTF-8");
244 } catch (UnsupportedEncodingException e) {
245 DartCore.logError(e);
246 }
239 if (new Path(packagePath).equals(new Path(fileLocation))) { 247 if (new Path(packagePath).equals(new Path(fileLocation))) {
240 return null; 248 return null;
241 } 249 }
242 } 250 }
243 } else { 251 } else {
244 252
245 Path path = new Path(regex); 253 Path path = new Path(regex);
246 int i = 0; 254 int i = 0;
247 if (regex.indexOf(LIB_DIRECTORY_PATH) != -1) { 255 if (regex.indexOf(LIB_DIRECTORY_PATH) != -1) {
248 // remove all segments after "lib", they show path in the package 256 // remove all segments after "lib", they show path in the package
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 } 473 }
466 } 474 }
467 475
468 if (container.getParent() instanceof IWorkspaceRoot) { 476 if (container.getParent() instanceof IWorkspaceRoot) {
469 return false; 477 return false;
470 } 478 }
471 479
472 return isPubLib(container.getParent()); 480 return isPubLib(container.getParent());
473 } 481 }
474 } 482 }
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