| 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 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 /** | 138 /** |
| 139 * @unrestricted | 139 * @unrestricted |
| 140 */ | 140 */ |
| 141 Sources.FilesNavigatorView = class extends Sources.NavigatorView { | 141 Sources.FilesNavigatorView = class extends Sources.NavigatorView { |
| 142 constructor() { | 142 constructor() { |
| 143 super(); | 143 super(); |
| 144 var toolbar = new UI.Toolbar('navigator-toolbar'); | 144 var toolbar = new UI.Toolbar('navigator-toolbar'); |
| 145 var title = Common.UIString('Add folder to workspace'); | 145 var title = Common.UIString('Add folder to workspace'); |
| 146 var addButton = new UI.ToolbarButton(title, 'largeicon-add', title); | 146 var addButton = new UI.ToolbarButton(title, 'largeicon-add', title); |
| 147 addButton.addEventListener( | 147 addButton.addEventListener( |
| 148 UI.ToolbarButton.Events.Click, () => Workspace.isolatedFileSystemManager
.addFileSystem()); | 148 UI.ToolbarButton.Events.Click, () => Persistence.isolatedFileSystemManag
er.addFileSystem()); |
| 149 toolbar.appendToolbarItem(addButton); | 149 toolbar.appendToolbarItem(addButton); |
| 150 this.element.insertBefore(toolbar.element, this.element.firstChild); | 150 this.element.insertBefore(toolbar.element, this.element.firstChild); |
| 151 } | 151 } |
| 152 | 152 |
| 153 /** | 153 /** |
| 154 * @override | 154 * @override |
| 155 * @param {!Workspace.UISourceCode} uiSourceCode | 155 * @param {!Workspace.UISourceCode} uiSourceCode |
| 156 * @return {boolean} | 156 * @return {boolean} |
| 157 */ | 157 */ |
| 158 accept(uiSourceCode) { | 158 accept(uiSourceCode) { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 * @param {string} actionId | 288 * @param {string} actionId |
| 289 * @return {boolean} | 289 * @return {boolean} |
| 290 */ | 290 */ |
| 291 handleAction(context, actionId) { | 291 handleAction(context, actionId) { |
| 292 switch (actionId) { | 292 switch (actionId) { |
| 293 case 'sources.create-snippet': | 293 case 'sources.create-snippet': |
| 294 var uiSourceCode = Snippets.scriptSnippetModel.createScriptSnippet(''); | 294 var uiSourceCode = Snippets.scriptSnippetModel.createScriptSnippet(''); |
| 295 Common.Revealer.reveal(uiSourceCode); | 295 Common.Revealer.reveal(uiSourceCode); |
| 296 return true; | 296 return true; |
| 297 case 'sources.add-folder-to-workspace': | 297 case 'sources.add-folder-to-workspace': |
| 298 Workspace.isolatedFileSystemManager.addFileSystem(); | 298 Persistence.isolatedFileSystemManager.addFileSystem(); |
| 299 return true; | 299 return true; |
| 300 } | 300 } |
| 301 return false; | 301 return false; |
| 302 } | 302 } |
| 303 }; | 303 }; |
| OLD | NEW |