OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 /** | 4 /** |
5 * @implements {Sources.TabbedEditorContainerDelegate} | 5 * @implements {Sources.TabbedEditorContainerDelegate} |
6 * @implements {UI.Searchable} | 6 * @implements {UI.Searchable} |
7 * @implements {UI.Replaceable} | 7 * @implements {UI.Replaceable} |
8 * @unrestricted | 8 * @unrestricted |
9 */ | 9 */ |
10 Sources.SourcesView = class extends UI.VBox { | 10 Sources.SourcesView = class extends UI.VBox { |
11 /** | 11 /** |
12 * @suppressGlobalPropertiesCheck | 12 * @suppressGlobalPropertiesCheck |
13 */ | 13 */ |
14 constructor() { | 14 constructor() { |
15 super(); | 15 super(); |
16 this.registerRequiredCSS('sources/sourcesView.css'); | 16 this.registerRequiredCSS('sources/sourcesView.css'); |
17 this.element.id = 'sources-panel-sources-view'; | 17 this.element.id = 'sources-panel-sources-view'; |
18 this.setMinimumAndPreferredSizes(50, 52, 150, 100); | 18 this.setMinimumAndPreferredSizes(80, 52, 150, 100); |
19 | 19 |
20 var workspace = Workspace.workspace; | 20 var workspace = Workspace.workspace; |
21 | 21 |
22 this._searchableView = new UI.SearchableView(this, 'sourcesViewSearchConfig'
); | 22 this._searchableView = new UI.SearchableView(this, 'sourcesViewSearchConfig'
); |
23 this._searchableView.setMinimalSearchQuerySize(0); | 23 this._searchableView.setMinimalSearchQuerySize(0); |
24 this._searchableView.show(this.element); | 24 this._searchableView.show(this.element); |
25 | 25 |
26 /** @type {!Map.<!Workspace.UISourceCode, !UI.Widget>} */ | 26 /** @type {!Map.<!Workspace.UISourceCode, !UI.Widget>} */ |
27 this._sourceViewByUISourceCode = new Map(); | 27 this._sourceViewByUISourceCode = new Map(); |
28 | 28 |
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
778 * @return {boolean} | 778 * @return {boolean} |
779 */ | 779 */ |
780 handleAction(context, actionId) { | 780 handleAction(context, actionId) { |
781 var sourcesView = UI.context.flavor(Sources.SourcesView); | 781 var sourcesView = UI.context.flavor(Sources.SourcesView); |
782 if (!sourcesView) | 782 if (!sourcesView) |
783 return false; | 783 return false; |
784 sourcesView._editorContainer.closeAllFiles(); | 784 sourcesView._editorContainer.closeAllFiles(); |
785 return true; | 785 return true; |
786 } | 786 } |
787 }; | 787 }; |
OLD | NEW |