| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 * * Redistributions of source code must retain the above copyright | 8 * * 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 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 dispose() { | 86 dispose() { |
| 87 Common.EventTarget.removeEventListeners(this._eventListeners); | 87 Common.EventTarget.removeEventListeners(this._eventListeners); |
| 88 } | 88 } |
| 89 | 89 |
| 90 _update() { | 90 _update() { |
| 91 if (this._muteUpdate) | 91 if (this._muteUpdate) |
| 92 return; | 92 return; |
| 93 | 93 |
| 94 this._mappings = []; | 94 this._mappings = []; |
| 95 |
| 96 this._excludedFoldersList.clear(); |
| 97 this._excludedFolders = []; |
| 98 for (var folder of Workspace.isolatedFileSystemManager.fileSystem(this._file
SystemPath) |
| 99 .excludedFolders() |
| 100 .values()) { |
| 101 this._excludedFolders.push(folder); |
| 102 this._excludedFoldersList.appendItem(folder, true); |
| 103 } |
| 104 |
| 95 if (Runtime.experiments.isEnabled('persistence2')) | 105 if (Runtime.experiments.isEnabled('persistence2')) |
| 96 return; | 106 return; |
| 97 | 107 |
| 98 this._mappingsList.clear(); | 108 this._mappingsList.clear(); |
| 99 var mappings = Workspace.fileSystemMapping.mappingEntries(this._fileSystemPa
th); | 109 var mappings = Workspace.fileSystemMapping.mappingEntries(this._fileSystemPa
th); |
| 100 for (var entry of mappings) { | 110 for (var entry of mappings) { |
| 101 if (entry.configurable) { | 111 if (entry.configurable) { |
| 102 this._mappingsList.appendItem(entry, true); | 112 this._mappingsList.appendItem(entry, true); |
| 103 this._mappings.push(entry); | 113 this._mappings.push(entry); |
| 104 } | 114 } |
| 105 } | 115 } |
| 106 for (var entry of mappings) { | 116 for (var entry of mappings) { |
| 107 if (!entry.configurable) { | 117 if (!entry.configurable) { |
| 108 this._mappingsList.appendItem(entry, false); | 118 this._mappingsList.appendItem(entry, false); |
| 109 this._mappings.push(entry); | 119 this._mappings.push(entry); |
| 110 } | 120 } |
| 111 } | 121 } |
| 112 | 122 |
| 113 this._excludedFoldersList.clear(); | |
| 114 this._excludedFolders = []; | |
| 115 for (var folder of Workspace.isolatedFileSystemManager.fileSystem(this._file
SystemPath) | |
| 116 .excludedFolders() | |
| 117 .values()) { | |
| 118 this._excludedFolders.push(folder); | |
| 119 this._excludedFoldersList.appendItem(folder, true); | |
| 120 } | |
| 121 for (var folder of Workspace.isolatedFileSystemManager.fileSystem(this._file
SystemPath) | 123 for (var folder of Workspace.isolatedFileSystemManager.fileSystem(this._file
SystemPath) |
| 122 .nonConfigurableExcludedFolders() | 124 .nonConfigurableExcludedFolders() |
| 123 .values()) { | 125 .values()) { |
| 124 this._excludedFolders.push(folder); | 126 this._excludedFolders.push(folder); |
| 125 this._excludedFoldersList.appendItem(folder, false); | 127 this._excludedFoldersList.appendItem(folder, false); |
| 126 } | 128 } |
| 127 } | 129 } |
| 128 | 130 |
| 129 _addMappingButtonClicked() { | 131 _addMappingButtonClicked() { |
| 130 var entry = new Workspace.FileSystemMapping.Entry(this._fileSystemPath, '',
'', true); | 132 var entry = new Workspace.FileSystemMapping.Entry(this._fileSystemPath, '',
'', true); |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 /** | 329 /** |
| 328 * @param {string} prefix | 330 * @param {string} prefix |
| 329 * @return {string} | 331 * @return {string} |
| 330 */ | 332 */ |
| 331 _normalizePrefix(prefix) { | 333 _normalizePrefix(prefix) { |
| 332 if (!prefix) | 334 if (!prefix) |
| 333 return ''; | 335 return ''; |
| 334 return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/'); | 336 return prefix + (prefix[prefix.length - 1] === '/' ? '' : '/'); |
| 335 } | 337 } |
| 336 }; | 338 }; |
| OLD | NEW |