Class orion.fileCommands
This class contains static utility methods for creating and managing commands
related to file management.
Defined in: </shared/eclipse/e4/orion/I201306251555/plugins/org.eclipse.orion.client.ui/web/orion/fileCommands.js>.
Constructor Attributes | Constructor Name and Description |
---|---|
Utility methods
|
Method Attributes | Method Name and Description |
---|---|
createFileCommands(serviceRegistry, commandRegistry, explorer, fileClient)
Creates the commands related to file management.
|
|
updateNavTools(serviceRegistry, commandRegistry, explorer, toolbarId, selectionToolbarId, item, rootSelection)
Updates the explorer toolbar.
|
|
uploadFile(targetFolder, file, explorer, unzip, force)
Uploads a file
|
Method Detail
createFileCommands(serviceRegistry, commandRegistry, explorer, fileClient)
Creates the commands related to file management.
- Parameters:
- {orion.serviceregistry.ServiceRegistry} serviceRegistry
- The service registry to use when creating commands
- {orion.commandregistry.CommandRegistry} commandRegistry
- The command registry to get commands from
- {orion.explorer.FileExplorer} explorer
- The explorer view to add commands to, and to update when model items change.
To broadcast model change nodifications, this explorer must have a
modelEventDispatcher
field. - {orion.EventTarget} explorer.modelEventDispatcher Optional
- If supplied, this dispatcher will be invoked to dispatch events describing model changes that are performed by file commands.
- {orion.fileClient.FileClient} fileClient
- The file system client that the commands should use
updateNavTools(serviceRegistry, commandRegistry, explorer, toolbarId, selectionToolbarId, item, rootSelection)
Updates the explorer toolbar.
- Parameters:
- {orion.serviceregistry.ServiceRegistry} serviceRegistry
- {orion.commandregistry.CommandRegistry} commandRegistry
- {orion.explorer.Explorer} explorer
- {String} toolbarId
- Gives the scope for toolbar commands. Commands in this scope are rendered with the
item
parameter as their target. - {String} selectionToolbarId Optional
- Gives the scope for selection-based commands. Commands in this scope are rendered with current selection as their target.
- {Object} item
- The model item to render toolbar commands against.
- {Boolean} rootSelection Optional, Default: false
- If
true
, any selection-based commands will be rendered with theexplorer
's treeRoot as their target, when no selection has been made. Iffalse
, any selection-based commands will be inactive when no selection has been made.
uploadFile(targetFolder, file, explorer, unzip, force)
Uploads a file
- Parameters:
- {Object} targetFolder
- {Object} file
- {orion.explorer.FileExplorer} explorer
- {orion.EventTarget} explorer.modelEventDispatcher Optional
- If supplied, this dispatcher will be invoked to dispatch events describing the file upload.
- {Boolean} unzip
- {Boolean} force