Class Index | File Index

## Classes

- _global_
- Array
- Boolean
- Date
- Function
- Object
- orion.breadcrumbs.BreadCrumbs
- orion.browse.FileBrowser
- orion.browse.FileBrowserOptions
- orion.BrowseView
- orion.cm.Configuration
- orion.cm.ConfigurationAdmin
- orion.cm.ConfigurationProperties
- orion.cm.ManagedService
- orion.commandregistry.CommandRegistry
- orion.commandregistry.ParameterCollector
- orion.commands.Command
- orion.commands.CommandInvocation
- orion.commands.CommandParameter
- orion.commands.ParametersDescription
- orion.commands.URLBinding
- orion.compare.CompareCommandFactory
- orion.compare.CompareOptions
- orion.compare.CompareSyntaxHighlighter
- orion.compare.CompareView
- orion.compare.CompareViewOptions
- orion.compare.DiffProvider
- orion.compare.FileOptions
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compare.toggleableCompareView
- orion.compare.TwoWayCompareView
- orion.compareUtils
- orion.core.ContentType
- orion.core.ContentTypeRegistry
- orion.core.TypeDef
- orion.core.TypeDefProperties
- orion.core.TypeDefRegistry
- orion.Deferred
- orion.dialogs.DialogService
- orion.DiffTreeNavigator.DiffTreeNavigator
- orion.DiffTreeNavigator.inlineDiffBlockFeeder
- orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
- orion.edit.Dispatcher
- orion.edit.EditorContext
- orion.editor.ActionDescription
- orion.editor.Annotation
- orion.editor.AnnotationIterator
- orion.editor.AnnotationModel
- orion.editor.AnnotationRuler
- orion.editor.AnnotationStyler
- orion.editor.AnnotationType
- orion.editor.AnnotationTypeList
- orion.editor.AsyncStyler
- orion.editor.BaseEditor
- orion.editor.BlurEvent
- orion.editor.ContentAssist
- orion.editor.ContentAssistMode
- orion.editor.ContentAssistProvider
- orion.editor.ContentAssistProvider.Context
- orion.editor.ContentAssistWidget
- orion.editor.ContextMenuEvent
- orion.editor.CssContentAssistProvider
- orion.editor.DestroyEvent
- orion.editor.EditOptions
- orion.editor.Editor
- orion.editor.EventTarget
- orion.editor.FindIterator
- orion.editor.FindOptions
- orion.editor.FocusEvent
- orion.editor.FoldingAnnotation
- orion.editor.HTMLContentAssistProvider
- orion.editor.InputManager
- orion.editor.JSTemplateContentAssistProvider
- orion.editor.KeyEvent
- orion.editor.LineNumberRuler
- orion.editor.LineStyleEvent
- orion.editor.ModelChangedEvent
- orion.editor.ModelChangingEvent
- orion.editor.ModifyEvent
- orion.editor.OverviewRuler
- orion.editor.Projection
- orion.editor.ProjectionTextModel
- orion.editor.Ruler
- orion.editor.ScrollEvent
- orion.editor.Selection
- orion.editor.SelectionEvent
- orion.editor.Style
- orion.editor.StyleRange
- orion.editor.StyleReadyEvent
- orion.editor.StyleReadyEvent#LineStyle
- orion.editor.TextChange
- orion.editor.TextMateStyler
- orion.editor.TextModel
- orion.editor.TextTheme
- orion.editor.TextView
- orion.editor.TextViewOptions
- orion.editor.ThemeChangedEvent
- orion.editor.ThemeStyleSheet
- orion.editor.UndoStack
- orion.editor.VerifyEvent
- orion.EditorView
- orion.EventTarget
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.FileExplorer
- orion.explorer.FileExplorer.ModelHandler
- orion.explorer.NavigatorRenderer
- orion.explorer.SelectionRenderer
- orion.explorerNavHandler.ExplorerNavDict
- orion.explorerNavHandler.ExplorerNavHandler
- orion.extensionCommands
- orion.fileClient.FileClient
- orion.fileCommands
- orion.fileUtils
- orion.FolderView
- orion.form
- orion.git.GitCommitExplorer
- orion.git.GitLogExplorer
- orion.git.GitRepositoryExplorer
- orion.git.GitReviewRequestExplorer
- orion.git.GitService
- orion.git.GitStatusExplorer
- orion.git.widgets.OpenCommitDialog
- orion.globalCommands
- orion.highlight.SyntaxHighlighter
- orion.KeyBinding
- orion.KeySequence
- orion.KeyStroke
- orion.links.TextLinkService
- orion.log.LogService
- orion.metatype.AttributeDefinition
- orion.metatype.MetaTypeRegistry
- orion.metatype.ObjectClassDefinition
- orion.mirror.CodeMirrorStyler
- orion.mirror.Mirror
- orion.mirror.MirrorLineStyle
- orion.mirror.ModeApplier
- orion.navoutliner.NavigationOutliner
- orion.objects
- orion.operation
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.PageLinks
- orion.PageLinks.PageLinksInfo
- orion.parametercollectors.CommandParameterCollector
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.progress.ProgressService
- orion.projectClient.ProjectClient
- orion.Promise
- orion.ReadonlyEditorView
- orion.regex
- orion.search.AdvSearchOptRenderer
- orion.searchClient.Searcher
- orion.searches.SavedSearches
- orion.Searches.SearchBuilder
- orion.Searches.SearchList
- orion.searchResults.SearchResultsGenerator
- orion.searchUtils
- orion.searchUtils.SearchParams
- orion.selection.Selection
- orion.serviceregistry.ServiceEvent
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.ServiceTracker
- orion.settings.Setting
- orion.settings.SettingsRegistry
- orion.settings.ui.PropertyWidget
- orion.shell.Command
- orion.shell.Parameter
- orion.shell.ParameterType
- orion.shell.Shell
- orion.sidebar.MiniNavViewMode
- orion.sidebar.ProjectNavViewMode
- orion.sidebar.Sidebar
- orion.sidebar.ViewMode
- orion.sites.SiteClient
- orion.sites.SiteConfiguration
- orion.sites.SiteEditor
- orion.sites.SiteService
- orion.sites.ViewOnSiteTree
- orion.status.StatusReportingService
- orion.SyntaxChecker
- orion.tasks.TaskList
- orion.TreeModelIterator.TreeModelIterator
- orion.treetable.TableTree
- orion.uiUtils
- orion.URITemplate
- orion.webui.contextmenu.ContextMenu
- orion.webui.dialogs.OpenResourceDialog
- orion.webui.dialogs.OperationsDialog
- orion.webui.littlelib
- orion.webui.Splitter
- orion.widgets.browse.ResourceSelector
- orion.widgets.Filesystem.FilesystemSwitcher
- orion.widgets.Section
- orion.widgets.settings.SplitSelectionLayout
- orion.xhr
- orion.xhr.Result
- String

# Class orion.commandregistry.CommandRegistry

CommandRegistry can render commands appropriate for a particular scope and DOM element.
Defined in: </shared/eclipse/e4/orion/I201402262325/plugins/org.eclipse.orion.client.ui/web/orion/commandRegistry.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.commandregistry.CommandRegistry(options) Constructs a new command registry with the given options.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addCommand(command) Add a command to the command registry.
| addCommandGroup(scopeId, groupId, position, title, parentPath, emptyGroupMessage, imageClass, tooltip, selectionClass, or) Registers a command group and specifies visual information about the group.
| closeParameterCollector() Close any active parameter collector.
| collectParameters(commandInvocation) Collect the parameters specified in the given command invocation.
| collectsParameters() Returns whether this registry has been configured to collect command parameters
| confirm(node, message, yesString, noString, modal, onConfirm) Open a parameter collector to confirm a command.
| destroy(parent) Destroy all DOM nodes and any other resources used by rendered commands.
| findCommand(commandId)
| generateSeparatorImage(parent) Add a dom node appropriate for using a separator between different groups of commands.
| getSelectionService() Return the default selection service that is being used when commands should apply against a selection.
| openParameterCollector(node, fillFunction, onClose) Open a parameter collector suitable for collecting information about a command.
| processURL(url) Process the provided URL to determine whether any commands should be invoked.
| registerCommandContribution(scopeId, commandId, position, parentPath, bindingOnly, keyBinding, urlBinding) Register a command contribution, which identifies how a command appears on a page and how it is invoked.
| registerSelectionService(scopeId, selectionService) Register a selection service that should be used for certain command scopes.
| renderCommands(scopeId, parent, items, handler, renderType, userData, domNodeWrapperList) Render the commands that are appropriate for the given scope.
| runCommand(commandId, item, handler, parameters) Run the command with the specified commandId.
| setParameterCollector(parameterCollector) Provide an object that can collect parameters for a given "tool" command.
| showKeyBindings(keyAssist) Show the keybindings that are registered with the command registry inside the specified target node.
| unregisterCommandContribution(scopeId, commandId, parentPath)

Class Detail
orion.commandregistry.CommandRegistry(options)
Constructs a new command registry with the given options.

Parameters:
{Object} options
  The registry options object
{orion.selection.Selection} options.selection Optional
  Optional selection service.

Method Detail
addCommand(command)
Add a command to the command registry. Nothing will be shown in the UI until this command is referenced in a contribution.

Parameters:
{orion.commands.Command} command
  The command being added.

See:
  registerCommandContribution

addCommandGroup(scopeId, groupId, position, title, parentPath, emptyGroupMessage, imageClass, tooltip, selectionClass, or)
Registers a command group and specifies visual information about the group.

Parameters:
{String} scopeId
  The id of a DOM element in which the group should be visible. Required. When commands are rendered for a particular element, the group will be shown only if its scopeId matches the id being rendered.
{String} groupId
  The id of the group, must be unique. May be used for a dom node id of the element representing the group
{Number} position
  The relative position of the group within its parent. Required.
{String} title Optional
  The title of the group, optional
{String} parentPath Optional
  The path of parent groups, separated by '/'. For example, a path of "group1Id/group2Id" indicates that the group belongs as a child of group2Id, which is itself a child of group1Id. Optional.
{String} emptyGroupMessage Optional
  A message to show if the group is empty and the user activates the UI element representing the group. Optional. If not specified, then the group UI element won't be shown when it is empty.
{String} imageClass Optional
  CSS class of an image to use for this group.
{String} tooltip Optional
  Tooltip to show on this group. If not provided, and the group uses an `imageClass`, the `title` will be used as the tooltip.
{String} selectionClass Optional
  CSS class to be appended when the command button is selected. Optional.
{String} or
  {boolean} [defaultActionId] Id of an action from this group that should be invoked when the group is selected. This will add an arrow to the grup that will open the dropdown. Optionally this can be set to `true` instead of adding a particular action. If set to `true` the group will be renderer as if there was a default action, but instead of invoking the default action it will open the dropdown. Optional.

closeParameterCollector()
Close any active parameter collector. This method should be used to deactivate a parameter collector that was opened with `openParameterCollector`. Commands that describe their required parameters do not need to use this method because the command framework will open and close parameter collectors as needed and call the command callback with the values of those parameters.

collectParameters(commandInvocation)
Collect the parameters specified in the given command invocation. If parameters are collected successfully, invoke the command's callback. This method is used by clients who want to control the timing of parameter collection. For example, if a command must be executed before it can be determined what parameters are known, the client can try the command in the callback and then call this function if parameters are needed. In this case, clients typically configure the parameters description options with "options.clientWillCollect" set to true.

Parameters:
{orion.commands.CommandInvocation} commandInvocation
  the current invocation of the command

See:
  orion.commands.ParametersDescription

{Boolean} collectsParameters()
Returns whether this registry has been configured to collect command parameters

Returns:
  {Boolean} whether or not this registry is configured to collect parameters.

confirm(node, message, yesString, noString, modal, onConfirm)
Open a parameter collector to confirm a command.

Parameters:
{DOMElement} node
  the dom node that is displaying the command
{String} message
  the message to show when confirming the command
{String} yesString
  the label to show on a yes/true choice
{String} noString
  the label to show on a no/false choice
{Boolean} modal
  indicates whether the confirmation prompt should be modal.
{Function} onConfirm
  a function that will be called when the user confirms the command. The function will be called with boolean indicating whether the command was confirmed.

destroy(parent)
Destroy all DOM nodes and any other resources used by rendered commands. This call does not remove the commands from the command registry. Clients typically call this function to empty a command area when a client wants to render the commands again due to some change in state.

Parameters:
{String|DOMElement} parent
  The id or DOM node that should be emptied.

{orion.commands.Command} findCommand(commandId)

Parameters:
{String} commandId

Returns:
  {orion.commands.Command}

generateSeparatorImage(parent)
Add a dom node appropriate for using a separator between different groups of commands. This function is useful when a page is precisely arranging groups of commands (in a table or contiguous spans) and needs to use the same separator that the command registry would use when rendering different groups of commands.

Parameters:
{DOMElement} parent

getSelectionService()
Return the default selection service that is being used when commands should apply against a selection.

openParameterCollector(node, fillFunction, onClose)
Open a parameter collector suitable for collecting information about a command. Once a collector is created, the specified function is used to fill it with information needed by the command. This method is used for commands that cannot rely on a simple parameter description to collect parameters. Commands that describe their required parameters do not need to use this method because the command framework will open and close parameter collectors as needed and call the command callback with the values of those parameters.

Parameters:
{DOMElement} node
  the dom node that is displaying the command, or a node in the parameter collector area
{Function} fillFunction
  a function that will fill the parameter area
{Function} onClose
  a function that will be called when the user closes the collector

processURL(url)
Process the provided URL to determine whether any commands should be invoked. Note that we never invoke a command callback by URL, only its parameter collector. If a parameter collector is not specified, commands in the URL will be ignored.

Parameters:
{String} url
  a url that may contain URL bindings.

registerCommandContribution(scopeId, commandId, position, parentPath, bindingOnly, keyBinding, urlBinding)
Register a command contribution, which identifies how a command appears on a page and how it is invoked.

Parameters:
{String} scopeId
  The id describing the scope of the command. Required. This scope id is used when rendering commands.
{String} commandId
  the id of the command. Required.
{Number} position
  the relative position of the command within its parent. Required.
{String} parentPath Optional, Default: null
  the path of any parent groups, separated by '/'. For example, a path of "group1Id/group2Id/command" indicates that the command belongs as a child of group2Id, which is itself a child of group1Id. Optional.
{boolean} bindingOnly Optional, Default: false
  if true, then the command is never rendered, but the key or URL binding is hooked.
{orion.editor.KeyBinding} keyBinding Optional
  a keyBinding for the command. Optional.
{orion.commands.URLBinding} urlBinding Optional
  a url binding for the command. Optional.

registerSelectionService(scopeId, selectionService)
Register a selection service that should be used for certain command scopes.

Parameters:
{String} scopeId
  The id describing the scope for which this selection service applies. Required. Only contributions made to this scope will use the selection service.
{orion.selection.Selection} selectionService
  the selection service for the scope.

renderCommands(scopeId, parent, items, handler, renderType, userData, domNodeWrapperList)
Render the commands that are appropriate for the given scope.

Parameters:
{String} scopeId
  The id describing the scope for which we are rendering commands. Required. Only contributions made to this scope will be rendered.
{DOMElement} parent
  The element in which commands should be rendered. If commands have been previously rendered into this element, it is up to the caller to empty any previously generated content.
{Object} items Optional
  An item or array of items to which the command applies. Optional. If no items are specified and a selection service was specified at creation time, then the selection service will be used to determine which items are involved.
{Object} handler
  The object that should perform the command
{String} renderType
  The style in which the command should be rendered. "tool" will render a tool image in the dom. "button" will render a text button. "menu" will render menu items.
{Object} userData Optional
  Optional user data that should be attached to generated command callbacks
{Object[]} domNodeWrapperList Optional
  Optional an array used to record any DOM nodes that are rendered during this call. If an array is provided, then as commands are rendered, an object will be created to represent the command's node. The object will always have the property "domNode" which contains the node created for the command. If the command is rendered using other means (toolkit widget) then the optional property "widget" should contain the toolkit object that represents the specified dom node.

runCommand(commandId, item, handler, parameters)
Run the command with the specified commandId.

Parameters:
{String} commandId
  the id of the command to run.
{Object} item
  the item on which the command should run.
{Object} handler
  the handler for the command.
{orion.commands.ParametersDescription} parameters
  used on this invocation. Optional. Note: The current implementation will only run the command if a URL binding has been specified, or if an item to run the command against has been specified.

setParameterCollector(parameterCollector)
Provide an object that can collect parameters for a given "tool" command. When a command that describes its required parameters is shown in a toolbar (as an image, button, or link), clicking the command will invoke any registered parameterCollector before calling the command's callback. This hook allows a page to define a standard way for collecting required parameters that is appropriate for the page architecture. If no parameterCollector is specified, then the command callback will be responsible for collecting parameters.

Parameters:
{orion.commandregistry.ParameterCollector} parameterCollector

showKeyBindings(keyAssist)
Show the keybindings that are registered with the command registry inside the specified target node.

Parameters:
{KeyAssistPanel} keyAssist
  the key assist panel

unregisterCommandContribution(scopeId, commandId, parentPath)

Parameters:
scopeId
commandId
parentPath

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Feb 26 2014 23:28:23 GMT-0500 (EST)