| 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 519 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 530 */ | 530 */ |
| 531 _updateFileTitle(uiSourceCode) { | 531 _updateFileTitle(uiSourceCode) { |
| 532 var tabId = this._tabIds.get(uiSourceCode); | 532 var tabId = this._tabIds.get(uiSourceCode); |
| 533 if (tabId) { | 533 if (tabId) { |
| 534 var title = this._titleForFile(uiSourceCode); | 534 var title = this._titleForFile(uiSourceCode); |
| 535 this._tabbedPane.changeTabTitle(tabId, title); | 535 this._tabbedPane.changeTabTitle(tabId, title); |
| 536 var icon = null; | 536 var icon = null; |
| 537 if (Persistence.persistence.hasUnsavedCommittedChanges(uiSourceCode)) { | 537 if (Persistence.persistence.hasUnsavedCommittedChanges(uiSourceCode)) { |
| 538 icon = UI.Icon.create('smallicon-warning'); | 538 icon = UI.Icon.create('smallicon-warning'); |
| 539 icon.title = Common.UIString('Changes to this file were not saved to fil
e system.'); | 539 icon.title = Common.UIString('Changes to this file were not saved to fil
e system.'); |
| 540 } else if (Runtime.experiments.isEnabled('persistence2') && Persistence.pe
rsistence.binding(uiSourceCode)) { | 540 } else { |
| 541 var binding = Persistence.persistence.binding(uiSourceCode); | 541 icon = Persistence.PersistenceUtils.iconForUISourceCode(uiSourceCode); |
| 542 icon = UI.Icon.create('smallicon-green-checkmark'); | |
| 543 icon.title = Persistence.PersistenceUtils.tooltipForUISourceCode(binding
.fileSystem); | |
| 544 } | 542 } |
| 545 this._tabbedPane.setTabIcon(tabId, icon); | 543 this._tabbedPane.setTabIcon(tabId, icon); |
| 546 } | 544 } |
| 547 } | 545 } |
| 548 | 546 |
| 549 /** | 547 /** |
| 550 * @param {!Common.Event} event | 548 * @param {!Common.Event} event |
| 551 */ | 549 */ |
| 552 _uiSourceCodeTitleChanged(event) { | 550 _uiSourceCodeTitleChanged(event) { |
| 553 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); | 551 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 810 | 808 |
| 811 /** | 809 /** |
| 812 * @override | 810 * @override |
| 813 * @param {string} tabId | 811 * @param {string} tabId |
| 814 * @param {!UI.ContextMenu} contextMenu | 812 * @param {!UI.ContextMenu} contextMenu |
| 815 */ | 813 */ |
| 816 onContextMenu(tabId, contextMenu) { | 814 onContextMenu(tabId, contextMenu) { |
| 817 this._editorContainer._onContextMenu(tabId, contextMenu); | 815 this._editorContainer._onContextMenu(tabId, contextMenu); |
| 818 } | 816 } |
| 819 }; | 817 }; |
| OLD | NEW |