| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 }; | 300 }; |
| 301 this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.
EditorSelected, eventData); | 301 this.dispatchEventToListeners(WebInspector.TabbedEditorContainer.Events.
EditorSelected, eventData); |
| 302 }, | 302 }, |
| 303 | 303 |
| 304 /** | 304 /** |
| 305 * @param {!WebInspector.UISourceCode} uiSourceCode | 305 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 306 * @return {string} | 306 * @return {string} |
| 307 */ | 307 */ |
| 308 _titleForFile: function(uiSourceCode) | 308 _titleForFile: function(uiSourceCode) |
| 309 { | 309 { |
| 310 uiSourceCode = WebInspector.persistence.fileSystem(uiSourceCode) || uiSo
urceCode; | 310 var binding = WebInspector.persistence.binding(uiSourceCode); |
| 311 var titleUISourceCode = binding ? binding.fileSystem : uiSourceCode; |
| 311 var maxDisplayNameLength = 30; | 312 var maxDisplayNameLength = 30; |
| 312 var title = uiSourceCode.displayName(true).trimMiddle(maxDisplayNameLeng
th); | 313 var title = titleUISourceCode.displayName(true).trimMiddle(maxDisplayNam
eLength); |
| 313 if (uiSourceCode.isDirty() || WebInspector.persistence.hasUnsavedCommitt
edChanges(uiSourceCode)) | 314 if (uiSourceCode.isDirty() || WebInspector.persistence.hasUnsavedCommitt
edChanges(uiSourceCode)) |
| 314 title += "*"; | 315 title += "*"; |
| 315 return title; | 316 return title; |
| 316 }, | 317 }, |
| 317 | 318 |
| 318 /** | 319 /** |
| 319 * @param {string} id | 320 * @param {string} id |
| 320 * @param {string} nextTabId | 321 * @param {string} nextTabId |
| 321 */ | 322 */ |
| 322 _maybeCloseTab: function(id, nextTabId) | 323 _maybeCloseTab: function(id, nextTabId) |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 839 /** | 840 /** |
| 840 * @override | 841 * @override |
| 841 * @param {string} tabId | 842 * @param {string} tabId |
| 842 * @param {!WebInspector.ContextMenu} contextMenu | 843 * @param {!WebInspector.ContextMenu} contextMenu |
| 843 */ | 844 */ |
| 844 onContextMenu: function(tabId, contextMenu) | 845 onContextMenu: function(tabId, contextMenu) |
| 845 { | 846 { |
| 846 this._editorContainer._onContextMenu(tabId, contextMenu); | 847 this._editorContainer._onContextMenu(tabId, contextMenu); |
| 847 } | 848 } |
| 848 } | 849 } |
| OLD | NEW |