| 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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 var data = { uiSourceCode: uiSourceCode, name: newTitle }; | 235 var data = { uiSourceCode: uiSourceCode, name: newTitle }; |
| 236 this.dispatchEventToListeners(WebInspector.NavigatorView.Events.FileRena
med, data); | 236 this.dispatchEventToListeners(WebInspector.NavigatorView.Events.FileRena
med, data); |
| 237 }, | 237 }, |
| 238 | 238 |
| 239 /** | 239 /** |
| 240 * @param {WebInspector.UISourceCode} uiSourceCode | 240 * @param {WebInspector.UISourceCode} uiSourceCode |
| 241 * @param {function(boolean)=} callback | 241 * @param {function(boolean)=} callback |
| 242 */ | 242 */ |
| 243 rename: function(uiSourceCode, callback) | 243 rename: function(uiSourceCode, callback) |
| 244 { | 244 { |
| 245 var scriptTreeElement = this._getScriptTreeElement[uiSourceCode.uri()]; | 245 var scriptTreeElement = this._getScriptTreeElement(uiSourceCode); |
| 246 if (!scriptTreeElement) | 246 if (!scriptTreeElement) |
| 247 return; | 247 return; |
| 248 | 248 |
| 249 // Tree outline should be marked as edited as well as the tree element t
o prevent search from starting. | 249 // Tree outline should be marked as edited as well as the tree element t
o prevent search from starting. |
| 250 var treeOutlineElement = scriptTreeElement.treeOutline.element; | 250 var treeOutlineElement = scriptTreeElement.treeOutline.element; |
| 251 WebInspector.markBeingEdited(treeOutlineElement, true); | 251 WebInspector.markBeingEdited(treeOutlineElement, true); |
| 252 | 252 |
| 253 function commitHandler(element, newTitle, oldTitle) | 253 function commitHandler(element, newTitle, oldTitle) |
| 254 { | 254 { |
| 255 if (newTitle && newTitle !== oldTitle) | 255 if (newTitle && newTitle !== oldTitle) |
| (...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 /** | 679 /** |
| 680 * @param {Event} event | 680 * @param {Event} event |
| 681 */ | 681 */ |
| 682 _handleContextMenuEvent: function(event) | 682 _handleContextMenuEvent: function(event) |
| 683 { | 683 { |
| 684 this._navigatorView.handleContextMenu(event, this._uiSourceCode); | 684 this._navigatorView.handleContextMenu(event, this._uiSourceCode); |
| 685 }, | 685 }, |
| 686 | 686 |
| 687 __proto__: WebInspector.BaseNavigatorTreeElement.prototype | 687 __proto__: WebInspector.BaseNavigatorTreeElement.prototype |
| 688 } | 688 } |
| OLD | NEW |