| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 result = result.concat(this.breakpointsForUISourceCode(uiSourceCodes[i])); | 339 result = result.concat(this.breakpointsForUISourceCode(uiSourceCodes[i])); |
| 340 return result; | 340 return result; |
| 341 } | 341 } |
| 342 | 342 |
| 343 /** | 343 /** |
| 344 * @param {!Workspace.UISourceCode} uiSourceCode | 344 * @param {!Workspace.UISourceCode} uiSourceCode |
| 345 * @return {!Array.<!{breakpoint: !Bindings.BreakpointManager.Breakpoint, uiLo
cation: !Workspace.UILocation}>} | 345 * @return {!Array.<!{breakpoint: !Bindings.BreakpointManager.Breakpoint, uiLo
cation: !Workspace.UILocation}>} |
| 346 */ | 346 */ |
| 347 breakpointLocationsForUISourceCode(uiSourceCode) { | 347 breakpointLocationsForUISourceCode(uiSourceCode) { |
| 348 var uiSourceCodeBreakpoints = this._breakpointsForUISourceCode.get(uiSourceC
ode); | 348 var uiSourceCodeBreakpoints = this._breakpointsForUISourceCode.get(uiSourceC
ode); |
| 349 var lineNumbers = uiSourceCodeBreakpoints ? uiSourceCodeBreakpoints.keysArra
y() : []; | 349 if (!uiSourceCodeBreakpoints) |
| 350 return []; |
| 350 var result = []; | 351 var result = []; |
| 351 for (var i = 0; i < lineNumbers.length; ++i) { | 352 for (var lineNumber of uiSourceCodeBreakpoints.keysArray()) |
| 352 var lineBreakpoints = uiSourceCodeBreakpoints.get(lineNumbers[i]); | 353 result = result.concat(this.breakpointLocationsForLine(uiSourceCode, lineN
umber)); |
| 353 var columnNumbers = lineBreakpoints.keysArray(); | 354 return result; |
| 354 for (var j = 0; j < columnNumbers.length; ++j) { | 355 } |
| 355 var columnBreakpoints = lineBreakpoints.get(columnNumbers[j]); | 356 |
| 356 var lineNumber = parseInt(lineNumbers[i], 10); | 357 /** |
| 357 var columnNumber = parseInt(columnNumbers[j], 10); | 358 * @param {!Workspace.UISourceCode} uiSourceCode |
| 358 for (var k = 0; k < columnBreakpoints.length; ++k) { | 359 * @param {number} lineNumber |
| 359 var breakpoint = columnBreakpoints[k]; | 360 * @return {!Array<!{breakpoint: !Bindings.BreakpointManager.Breakpoint, uiLoc
ation: !Workspace.UILocation}>} |
| 360 var uiLocation = uiSourceCode.uiLocation(lineNumber, columnNumber); | 361 */ |
| 361 result.push({breakpoint: breakpoint, uiLocation: uiLocation}); | 362 breakpointLocationsForLine(uiSourceCode, lineNumber) { |
| 362 } | 363 var uiSourceCodeBreakpoints = this._breakpointsForUISourceCode.get(uiSourceC
ode); |
| 364 if (!uiSourceCodeBreakpoints || !uiSourceCodeBreakpoints.has(lineNumber)) |
| 365 return []; |
| 366 var columnBreakpoints = uiSourceCodeBreakpoints.get(lineNumber); |
| 367 var result = []; |
| 368 for (var columnNumber of columnBreakpoints.keysArray()) { |
| 369 for (var breakpoint of columnBreakpoints.get(columnNumber)) { |
| 370 var uiLocation = uiSourceCode.uiLocation(lineNumber, columnNumber); |
| 371 result.push({breakpoint: breakpoint, uiLocation: uiLocation}); |
| 363 } | 372 } |
| 364 } | 373 } |
| 365 return result; | 374 return result; |
| 366 } | 375 } |
| 367 | 376 |
| 368 /** | 377 /** |
| 369 * @return {!Array.<!{breakpoint: !Bindings.BreakpointManager.Breakpoint, uiLo
cation: !Workspace.UILocation}>} | 378 * @return {!Array.<!{breakpoint: !Bindings.BreakpointManager.Breakpoint, uiLo
cation: !Workspace.UILocation}>} |
| 370 */ | 379 */ |
| 371 allBreakpointLocations() { | 380 allBreakpointLocations() { |
| 372 var result = []; | 381 var result = []; |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1093 this.sourceFileId = breakpoint._sourceFileId; | 1102 this.sourceFileId = breakpoint._sourceFileId; |
| 1094 this.lineNumber = breakpoint.lineNumber(); | 1103 this.lineNumber = breakpoint.lineNumber(); |
| 1095 this.columnNumber = breakpoint.columnNumber(); | 1104 this.columnNumber = breakpoint.columnNumber(); |
| 1096 this.condition = breakpoint.condition(); | 1105 this.condition = breakpoint.condition(); |
| 1097 this.enabled = breakpoint.enabled(); | 1106 this.enabled = breakpoint.enabled(); |
| 1098 } | 1107 } |
| 1099 }; | 1108 }; |
| 1100 | 1109 |
| 1101 /** @type {!Bindings.BreakpointManager} */ | 1110 /** @type {!Bindings.BreakpointManager} */ |
| 1102 Bindings.breakpointManager; | 1111 Bindings.breakpointManager; |
| OLD | NEW |