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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 var binding = Persistence.persistence.binding(uiSourceCode); | 541 var binding = Persistence.persistence.binding(uiSourceCode); |
542 this._tabbedPane.setTabIcon( | 542 this._tabbedPane.setTabIcon( |
543 tabId, 'smallicon-green-checkmark', | 543 tabId, 'smallicon-green-checkmark', |
544 Persistence.PersistenceUtils.tooltipForUISourceCode(binding.fileSyst
em)); | 544 Persistence.PersistenceUtils.tooltipForUISourceCode(binding.fileSyst
em)); |
545 } else { | 545 } else { |
546 this._tabbedPane.setTabIcon(tabId, ''); | 546 this._tabbedPane.setTabIcon(tabId, ''); |
547 } | 547 } |
548 } | 548 } |
549 } | 549 } |
550 | 550 |
| 551 /** |
| 552 * @param {!Common.Event} event |
| 553 */ |
551 _uiSourceCodeTitleChanged(event) { | 554 _uiSourceCodeTitleChanged(event) { |
552 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.target); | 555 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
553 this._updateFileTitle(uiSourceCode); | 556 this._updateFileTitle(uiSourceCode); |
554 this._updateHistory(); | 557 this._updateHistory(); |
555 } | 558 } |
556 | 559 |
| 560 /** |
| 561 * @param {!Common.Event} event |
| 562 */ |
557 _uiSourceCodeWorkingCopyChanged(event) { | 563 _uiSourceCodeWorkingCopyChanged(event) { |
558 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.target); | 564 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data); |
559 this._updateFileTitle(uiSourceCode); | 565 this._updateFileTitle(uiSourceCode); |
560 } | 566 } |
561 | 567 |
| 568 /** |
| 569 * @param {!Common.Event} event |
| 570 */ |
562 _uiSourceCodeWorkingCopyCommitted(event) { | 571 _uiSourceCodeWorkingCopyCommitted(event) { |
563 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.target); | 572 var uiSourceCode = /** @type {!Workspace.UISourceCode} */ (event.data.uiSour
ceCode); |
564 this._updateFileTitle(uiSourceCode); | 573 this._updateFileTitle(uiSourceCode); |
565 } | 574 } |
566 | 575 |
567 /** | 576 /** |
568 * @return {string} | 577 * @return {string} |
569 */ | 578 */ |
570 _generateTabId() { | 579 _generateTabId() { |
571 return 'tab_' + (Sources.TabbedEditorContainer._tabId++); | 580 return 'tab_' + (Sources.TabbedEditorContainer._tabId++); |
572 } | 581 } |
573 | 582 |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
803 | 812 |
804 /** | 813 /** |
805 * @override | 814 * @override |
806 * @param {string} tabId | 815 * @param {string} tabId |
807 * @param {!UI.ContextMenu} contextMenu | 816 * @param {!UI.ContextMenu} contextMenu |
808 */ | 817 */ |
809 onContextMenu(tabId, contextMenu) { | 818 onContextMenu(tabId, contextMenu) { |
810 this._editorContainer._onContextMenu(tabId, contextMenu); | 819 this._editorContainer._onContextMenu(tabId, contextMenu); |
811 } | 820 } |
812 }; | 821 }; |
OLD | NEW |