Class Index | File Index

Classes


Class orion.fileCommands

This class contains static utility methods for creating and managing commands related to file management.
Defined in: </jobs/genie.orion/orion-client-stable/workspace/bundles/org.eclipse.orion.client.ui/web/orion/fileCommands.js>.

Class Summary
Constructor Attributes Constructor Name and Description
 
Utility methods
Method Summary
Method Attributes Method Name and Description
 
createFileCommands(serviceRegistry, commandRegistry, fileClient, prefs)
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, handlers, preventNotification)
Uploads a file
Class Detail
orion.fileCommands()
Utility methods
Method Detail
createFileCommands(serviceRegistry, commandRegistry, fileClient, prefs)
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 describing model changes that are performed by file commands.
{orion.fileClient.FileClient} fileClient
The file system client that the commands should use
{object} prefs
GeneralPreferences

{Array} getCutBuffer()
Returns the buffer containing the cut selections or null if a cut operation is not in progress.
Returns:
{Array} bufferedSelection or null

getModelEventDispatcher()
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.
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 the explorer's treeRoot as their target, when no selection has been made. If false, any selection-based commands will be inactive when no selection has been made.

{XMLHttpRequest} uploadFile(targetFolder, file, explorer, unzip, force, handlers, preventNotification)
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
{Object} handlers
Optional. An object which contains handlers for the different events that the upload can fire. handlers.progress The handler function that should be called when progress occurs. handlers.load The handler function that should be called when the transfer completes successfully. handlers.error The handler function that should be called if the transfer fails. handlers.abort The handler function that should be called if the transfer is cancelled by the user. handlers.loadend The handler function that should be called when the transfer completes (regardless of success or failure).
{Boolean} preventNotification
Optional. true if a model event should not be dispatched after the file is uploaded, false otherwise
Returns:
{XMLHttpRequest} The XMLHttpRequest object that was created and used for the upload.

Documentation generated by JsDoc Toolkit 2.4.0 on Fri Mar 17 2017 08:51:36 GMT-0400 (EDT)