| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1362 * @param {!Object} object | 1362 * @param {!Object} object |
| 1363 * @return {!Promise} | 1363 * @return {!Promise} |
| 1364 */ | 1364 */ |
| 1365 reveal: function(object) | 1365 reveal: function(object) |
| 1366 { | 1366 { |
| 1367 WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.ins
tance()); | 1367 WebInspector.inspectorView.setCurrentPanel(WebInspector.SourcesPanel.ins
tance()); |
| 1368 return Promise.resolve(); | 1368 return Promise.resolve(); |
| 1369 } | 1369 } |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 |
| 1373 /** |
| 1374 * @constructor |
| 1375 * @implements {WebInspector.Revealer} |
| 1376 */ |
| 1377 WebInspector.SourcesPanel.LineMessageRevealer = function() |
| 1378 { |
| 1379 } |
| 1380 |
| 1381 WebInspector.SourcesPanel.LineMessageRevealer.prototype = { |
| 1382 /** |
| 1383 * @override |
| 1384 * @param {!Object} object |
| 1385 * @return {!Promise} |
| 1386 */ |
| 1387 reveal: function(object) |
| 1388 { |
| 1389 var container = /** @type {!WebInspector.UISourceCodeMessages} */ (objec
t); |
| 1390 if (!(container.messages() instanceof Array)) |
| 1391 return Promise.reject(new Error("Internal error: messages member not
an array of line message definition objects")); |
| 1392 if (!(container.source() instanceof WebInspector.UISourceCode)) |
| 1393 return Promise.reject(new Error("Internal error: code member not a U
ISourceCode objects")); |
| 1394 |
| 1395 var frame = WebInspector.SourcesPanel.instance().sourcesView().viewForFi
le(container.source()); |
| 1396 frame.setMessagesForSource(container.messages().map(function(m){ |
| 1397 return new WebInspector.SourceFrameMessage(m.text(), WebInspector.So
urceFrameMessage.Level[m.kind()], { |
| 1398 line: m.location().startLine, |
| 1399 column: m.location().startColumn |
| 1400 }, { |
| 1401 line: m.location().endLine, |
| 1402 column: m.location().endColumn |
| 1403 }); |
| 1404 })); |
| 1405 |
| 1406 return Promise.resolve(); |
| 1407 } |
| 1408 } |
| 1409 |
| 1372 /** | 1410 /** |
| 1373 * @constructor | 1411 * @constructor |
| 1374 * @implements {WebInspector.ActionDelegate} | 1412 * @implements {WebInspector.ActionDelegate} |
| 1375 */ | 1413 */ |
| 1376 WebInspector.SourcesPanel.RevealingActionDelegate = function() {} | 1414 WebInspector.SourcesPanel.RevealingActionDelegate = function() {} |
| 1377 | 1415 |
| 1378 WebInspector.SourcesPanel.RevealingActionDelegate.prototype = { | 1416 WebInspector.SourcesPanel.RevealingActionDelegate.prototype = { |
| 1379 /** | 1417 /** |
| 1380 * @override | 1418 * @override |
| 1381 * @param {!WebInspector.Context} context | 1419 * @param {!WebInspector.Context} context |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1460 WebInspector.SourcesPanelFactory.prototype = { | 1498 WebInspector.SourcesPanelFactory.prototype = { |
| 1461 /** | 1499 /** |
| 1462 * @override | 1500 * @override |
| 1463 * @return {!WebInspector.Panel} | 1501 * @return {!WebInspector.Panel} |
| 1464 */ | 1502 */ |
| 1465 createPanel: function() | 1503 createPanel: function() |
| 1466 { | 1504 { |
| 1467 return WebInspector.SourcesPanel.instance(); | 1505 return WebInspector.SourcesPanel.instance(); |
| 1468 } | 1506 } |
| 1469 } | 1507 } |
| OLD | NEW |