OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 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 * | 10 * |
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
414 * @param {boolean} committed | 414 * @param {boolean} committed |
415 */ | 415 */ |
416 function callback(committed) | 416 function callback(committed) |
417 { | 417 { |
418 if (!committed) { | 418 if (!committed) { |
419 if (deleteIfCanceled) | 419 if (deleteIfCanceled) |
420 uiSourceCode.remove(); | 420 uiSourceCode.remove(); |
421 return; | 421 return; |
422 } | 422 } |
423 | 423 |
424 var data = { uiSourceCode: uiSourceCode }; | 424 this.dispatchEventToListeners(WebInspector.NavigatorView.Events.Item
Renamed, uiSourceCode); |
425 this.dispatchEventToListeners(WebInspector.NavigatorView.Events.Item
Renamed, data); | |
426 this._updateIcon(uiSourceCode); | 425 this._updateIcon(uiSourceCode); |
427 this._sourceSelected(uiSourceCode, true) | 426 this._sourceSelected(uiSourceCode, true) |
428 } | 427 } |
429 }, | 428 }, |
430 | 429 |
431 /** | 430 /** |
432 * @param {!WebInspector.Project} project | 431 * @param {!WebInspector.Project} project |
433 * @param {string} path | 432 * @param {string} path |
434 * @param {!WebInspector.UISourceCode=} uiSourceCodeToCopy | 433 * @param {!WebInspector.UISourceCode=} uiSourceCodeToCopy |
435 */ | 434 */ |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
469 { | 468 { |
470 if (!path) | 469 if (!path) |
471 return; | 470 return; |
472 filePath = path; | 471 filePath = path; |
473 uiSourceCode = project.uiSourceCode(filePath); | 472 uiSourceCode = project.uiSourceCode(filePath); |
474 if (!uiSourceCode) { | 473 if (!uiSourceCode) { |
475 console.assert(uiSourceCode) | 474 console.assert(uiSourceCode) |
476 return; | 475 return; |
477 } | 476 } |
478 this._sourceSelected(uiSourceCode, false); | 477 this._sourceSelected(uiSourceCode, false); |
| 478 this.revealUISourceCode(uiSourceCode, true); |
479 this.rename(uiSourceCode, true); | 479 this.rename(uiSourceCode, true); |
480 } | 480 } |
481 }, | 481 }, |
482 | 482 |
483 __proto__: WebInspector.VBox.prototype | 483 __proto__: WebInspector.VBox.prototype |
484 } | 484 } |
485 | 485 |
486 /** | 486 /** |
487 * @constructor | 487 * @constructor |
488 * @extends {WebInspector.NavigatorView} | 488 * @extends {WebInspector.NavigatorView} |
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1410 | 1410 |
1411 willRemoveChild: function(node) | 1411 willRemoveChild: function(node) |
1412 { | 1412 { |
1413 if (node._isMerged || !this.isPopulated()) | 1413 if (node._isMerged || !this.isPopulated()) |
1414 return; | 1414 return; |
1415 this._treeElement.removeChild(node._treeElement); | 1415 this._treeElement.removeChild(node._treeElement); |
1416 }, | 1416 }, |
1417 | 1417 |
1418 __proto__: WebInspector.NavigatorTreeNode.prototype | 1418 __proto__: WebInspector.NavigatorTreeNode.prototype |
1419 } | 1419 } |
OLD | NEW |