Class orion.fileCommands
This class contains static utility methods for creating and managing commands
related to file management.
Defined in: </shared/eclipse/e4/orion/I201404012230/bundles/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, fileClient)
Creates the commands related to file management.
|
|
Returns the buffer containing the cut selections or null if a
cut operation is not in progress.
|
|
Returns a shared model event dispatcher that can be used by multiple
orion.explorer.FileExplorer
so that all explorers are notified of model changes from other explorers. |
|
updateNavTools(serviceRegistry, commandRegistry, explorer, toolbarId, selectionToolbarId, item, rootSelection)
Updates the explorer toolbar.
|
|
uploadFile(targetFolder, file, explorer, unzip, force)
Uploads a file
|
- Parameters:
- {orion.serviceregistry.ServiceRegistry} serviceRegistry
- The service registry to use when creating commands
- {orion.commandregistry.CommandRegistry} commandRegistry
- The command registry to get commands from describing model changes that are performed by file commands.
- {orion.fileClient.FileClient} fileClient
- The file system client that the commands should use
- Returns:
- {Array} bufferedSelection or null
orion.explorer.FileExplorer
so that all explorers are notified of model changes from other explorers.
- 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.
- 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