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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
348 * @param {!WebInspector.UILocation} uiLocation | 348 * @param {!WebInspector.UILocation} uiLocation |
349 * @param {boolean=} omitFocus | 349 * @param {boolean=} omitFocus |
350 */ | 350 */ |
351 showUILocation: function(uiLocation, omitFocus) | 351 showUILocation: function(uiLocation, omitFocus) |
352 { | 352 { |
353 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus); | 353 this.showUISourceCode(uiLocation.uiSourceCode, uiLocation.lineNumber, ui Location.columnNumber, omitFocus); |
354 }, | 354 }, |
355 | 355 |
356 /** | 356 /** |
357 * @param {!WebInspector.UISourceCode} uiSourceCode | 357 * @param {!WebInspector.UISourceCode} uiSourceCode |
358 * @param {boolean=} skipShow | |
358 */ | 359 */ |
359 _revealInNavigator: function(uiSourceCode) | 360 _revealInNavigator: function(uiSourceCode, skipShow) |
360 { | 361 { |
361 var extensions = self.runtime.extensions(WebInspector.NavigatorView); | 362 var extensions = self.runtime.extensions(WebInspector.NavigatorView); |
362 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators); | 363 Promise.all(extensions.map(extension => extension.instance())).then(filt erNavigators); |
363 | 364 |
364 /** | 365 /** |
365 * @param {!Array.<!Object>} objects | 366 * @param {!Array.<!Object>} objects |
366 */ | 367 */ |
367 function filterNavigators(objects) | 368 function filterNavigators(objects) |
368 { | 369 { |
369 for (var i = 0; i < objects.length; ++i) { | 370 for (var i = 0; i < objects.length; ++i) { |
370 var navigatorView = /** @type {!WebInspector.NavigatorView} */ ( objects[i]); | 371 var navigatorView = /** @type {!WebInspector.NavigatorView} */ ( objects[i]); |
371 if (navigatorView.accept(uiSourceCode)) { | 372 if (navigatorView.accept(uiSourceCode)) { |
372 navigatorView.revealUISourceCode(uiSourceCode, true); | 373 navigatorView.revealUISourceCode(uiSourceCode, true); |
373 WebInspector.viewManager.showView(extensions[i].descriptor() ["viewId"]); | 374 if (skipShow) |
lushnikov
2016/08/25 02:00:09
should it be vice-versa?
luoe
2016/08/25 18:19:34
This check is wrong. Really, we want to call show
| |
375 WebInspector.viewManager.showView(extensions[i].descript or()["viewId"]); | |
374 } | 376 } |
375 } | 377 } |
376 } | 378 } |
377 }, | 379 }, |
378 | 380 |
379 /** | 381 /** |
380 * @param {!WebInspector.ContextMenu} contextMenu | 382 * @param {!WebInspector.ContextMenu} contextMenu |
381 */ | 383 */ |
382 _populateNavigatorMenu: function(contextMenu) | 384 _populateNavigatorMenu: function(contextMenu) |
383 { | 385 { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 return true; | 522 return true; |
521 }, | 523 }, |
522 | 524 |
523 /** | 525 /** |
524 * @param {!WebInspector.Event} event | 526 * @param {!WebInspector.Event} event |
525 */ | 527 */ |
526 _editorSelected: function(event) | 528 _editorSelected: function(event) |
527 { | 529 { |
528 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); | 530 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); |
529 this._editorChanged(uiSourceCode); | 531 this._editorChanged(uiSourceCode); |
532 if (this.editorView.mainWidget() && WebInspector.moduleSetting("autoReve alInNavigator").get()) | |
533 this._revealInNavigator(uiSourceCode, true); | |
530 }, | 534 }, |
531 | 535 |
532 /** | 536 /** |
533 * @param {!WebInspector.Event} event | 537 * @param {!WebInspector.Event} event |
534 */ | 538 */ |
535 _editorClosed: function(event) | 539 _editorClosed: function(event) |
536 { | 540 { |
537 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); | 541 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); |
538 if (wasSelected) | 542 if (wasSelected) |
539 this._editorChanged(null); | 543 this._editorChanged(null); |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1367 __proto__: WebInspector.VBox.prototype | 1371 __proto__: WebInspector.VBox.prototype |
1368 } | 1372 } |
1369 | 1373 |
1370 /** | 1374 /** |
1371 * @return {boolean} | 1375 * @return {boolean} |
1372 */ | 1376 */ |
1373 WebInspector.SourcesPanel.WrapperView.isShowing = function() | 1377 WebInspector.SourcesPanel.WrapperView.isShowing = function() |
1374 { | 1378 { |
1375 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); | 1379 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); |
1376 } | 1380 } |
OLD | NEW |