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=} skipReveal | |
358 */ | 359 */ |
359 _revealInNavigator: function(uiSourceCode) | 360 _revealInNavigator: function(uiSourceCode, skipReveal) |
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 WebInspector.viewManager.showView(extensions[i].descriptor() ["viewId"], skipReveal); |
lushnikov
2016/08/25 20:41:54
let's select tab explicitly via tabbedPane.selectT
luoe
2016/08/26 18:33:45
Done with _navigatorTabbedLocation.tabbedPane().se
| |
374 } | 375 } |
375 } | 376 } |
376 } | 377 } |
377 }, | 378 }, |
378 | 379 |
379 /** | 380 /** |
380 * @param {!WebInspector.ContextMenu} contextMenu | 381 * @param {!WebInspector.ContextMenu} contextMenu |
381 */ | 382 */ |
382 _populateNavigatorMenu: function(contextMenu) | 383 _populateNavigatorMenu: function(contextMenu) |
383 { | 384 { |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 return true; | 521 return true; |
521 }, | 522 }, |
522 | 523 |
523 /** | 524 /** |
524 * @param {!WebInspector.Event} event | 525 * @param {!WebInspector.Event} event |
525 */ | 526 */ |
526 _editorSelected: function(event) | 527 _editorSelected: function(event) |
527 { | 528 { |
528 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); | 529 var uiSourceCode = /** @type {!WebInspector.UISourceCode} */ (event.data ); |
529 this._editorChanged(uiSourceCode); | 530 this._editorChanged(uiSourceCode); |
531 if (this.editorView.mainWidget() && WebInspector.moduleSetting("autoReve alInNavigator").get()) | |
532 this._revealInNavigator(uiSourceCode, true); | |
530 }, | 533 }, |
531 | 534 |
532 /** | 535 /** |
533 * @param {!WebInspector.Event} event | 536 * @param {!WebInspector.Event} event |
534 */ | 537 */ |
535 _editorClosed: function(event) | 538 _editorClosed: function(event) |
536 { | 539 { |
537 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); | 540 var wasSelected = /** @type {boolean} */ (event.data.wasSelected); |
538 if (wasSelected) | 541 if (wasSelected) |
539 this._editorChanged(null); | 542 this._editorChanged(null); |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1367 __proto__: WebInspector.VBox.prototype | 1370 __proto__: WebInspector.VBox.prototype |
1368 } | 1371 } |
1369 | 1372 |
1370 /** | 1373 /** |
1371 * @return {boolean} | 1374 * @return {boolean} |
1372 */ | 1375 */ |
1373 WebInspector.SourcesPanel.WrapperView.isShowing = function() | 1376 WebInspector.SourcesPanel.WrapperView.isShowing = function() |
1374 { | 1377 { |
1375 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); | 1378 return !!WebInspector.SourcesPanel.WrapperView._instance && WebInspector.Sou rcesPanel.WrapperView._instance.isShowing(); |
1376 } | 1379 } |
OLD | NEW |