|
|
@ -26,18 +26,15 @@ class FileManager extends ApiFactory { |
|
|
|
config: this._components.registry.get('config').api, |
|
|
|
config: this._components.registry.get('config').api, |
|
|
|
browserExplorer: this._components.registry.get('fileproviders/browser').api, |
|
|
|
browserExplorer: this._components.registry.get('fileproviders/browser').api, |
|
|
|
localhostExplorer: this._components.registry.get('fileproviders/localhost').api, |
|
|
|
localhostExplorer: this._components.registry.get('fileproviders/localhost').api, |
|
|
|
configExplorer: this._components.registry.get('fileproviders/config').api, |
|
|
|
|
|
|
|
gistExplorer: this._components.registry.get('fileproviders/gist').api, |
|
|
|
gistExplorer: this._components.registry.get('fileproviders/gist').api, |
|
|
|
filesProviders: this._components.registry.get('fileproviders').api |
|
|
|
filesProviders: this._components.registry.get('fileproviders').api |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this._deps.browserExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.browserExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.localhostExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.localhostExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.configExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
|
|
|
|
this._deps.gistExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.gistExplorer.event.register('fileRenamed', (oldName, newName, isFolder) => { this.fileRenamedEvent(oldName, newName, isFolder) }) |
|
|
|
this._deps.browserExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.browserExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.localhostExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.localhostExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.configExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
|
|
|
|
this._deps.gistExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.gistExplorer.event.register('fileRemoved', (path) => { this.fileRemovedEvent(path) }) |
|
|
|
this._deps.localhostExplorer.event.register('errored', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) |
|
|
|
this._deps.localhostExplorer.event.register('errored', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) |
|
|
|
this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) |
|
|
|
this._deps.localhostExplorer.event.register('closed', (event) => { this.removeTabsOf(this._deps.localhostExplorer) }) |
|
|
@ -192,8 +189,8 @@ class FileManager extends ApiFactory { |
|
|
|
if (fileList.length) { |
|
|
|
if (fileList.length) { |
|
|
|
_switchFile(browserProvider.type + '/' + fileList[0]) |
|
|
|
_switchFile(browserProvider.type + '/' + fileList[0]) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.events.emit('currentFileChanged') |
|
|
|
|
|
|
|
this._deps.editor.displayEmptyReadOnlySession() |
|
|
|
this._deps.editor.displayEmptyReadOnlySession() |
|
|
|
|
|
|
|
this.events.emit('noFileSelected') |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|