Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- Object
- orion
- orion.breadcrumbs.BreadCrumbs
- orion.commands.Command
- orion.commands.CommandService
- orion.compare.DiffProvider
- orion.compare.rulers.CompareOverviewRuler
- orion.compare.rulers.CompareRuler
- orion.compare.rulers.LineNumberCompareRuler
- orion.compareUtils
- orion.contentAssist.CssContentAssistProvider
- orion.dialogs.DialogService
- orion.editor.AbstractStyler
- orion.editor.ContentAssist
- orion.editor.Editor
- orion.editor.HtmlGrammar
- orion.editor.JavaScriptContentAssistProvider
- orion.editor.TextMateStyler
- orion.explorer-table.FileExplorer
- orion.explorer.Explorer
- orion.explorer.ExplorerFlatModel
- orion.explorer.ExplorerModel
- orion.explorer.SelectionRenderer
- orion.favorites.Favorites
- orion.favorites.FavoritesService
- orion.fileClient.FileClient
- orion.fileCommands
- orion.git.GitClonesExplorer
- orion.git.GitClonesModel
- orion.git.GitCommitNavigator
- orion.git.GitService
- orion.globalCommands
- orion.log.LogService
- orion.outliner.Outliner
- orion.outliner.OutlineService
- orion.pluginregistry.Plugin
- orion.pluginregistry.PluginRegistry
- orion.preferences.Preferences
- orion.preferences.PreferencesService
- orion.problems.ProblemService
- orion.profile.usersClient.UsersClient
- orion.searchClient.Searcher
- orion.searchResults.SearchResultsGenerator
- orion.selection.Selection
- orion.serviceregistry.EventTarget
- orion.serviceregistry.Service
- orion.serviceregistry.ServiceReference
- orion.serviceregistry.ServiceRegistration
- orion.serviceregistry.ServiceRegistry
- orion.status.StatusReportingService
- orion.textview.ContextMenuEvent
- orion.textview.DestroyEvent
- orion.textview.KeyBinding
- orion.textview.LineStyleEvent
- orion.textview.ModelChangedEvent
- orion.textview.ModelChangingEvent
- orion.textview.ModifyEvent
- orion.textview.Ruler
- orion.textview.ScrollEvent
- orion.textview.Selection
- orion.textview.SelectionEvent
- orion.textview.Style
- orion.textview.StyleRange
- orion.textview.TextModel
- orion.textview.TextView
- orion.textview.UndoStack
- orion.textview.VerifyEvent
- orion.treetable.TableTree
- orion.util
- orion.widgets.DirectoryTreeModel
- String

# Class orion.commands.CommandService

CommandService can render commands appropriate for a particular scope and DOM element.
Defined in: </shared/eclipse/e4/orion/I201106270200/plugins/org.eclipse.orion.client.core/web/orion/commands.js>.

Class Summary
Constructor Attributes | Constructor Name and Description
--- | ---
| orion.commands.CommandService(options) Constructs a new command service with the given options.

Method Summary
Method Attributes | Method Name and Description
--- | ---
| addCommand(the, scope) Add a command at a particular scope.
| addCommandGroup(groupId, position, title, parentPath, scopeId) Registers a command group and specifies visual information about the group.
| generateSeparatorImage() Return an image object that is appropriate for using a separator between different groups of commands.
| getSelectionService() Return the selection service that is being used when commands should apply against a selection.
| registerCommandContribution(the, the, scopeId, the, a, if) Register a command contribution, which identifies how a command appears on a page and how it is invoked.
| renderCommands(parent, scope, items, handler, renderType, cssClass, userData, forceText) Render the commands that are appropriate for the given scope.
| showKeyBindings(the) Show the keybindings that are registered with the command service inside the specified domNode.

Class Detail
orion.commands.CommandService(options)
Constructs a new command service with the given options.

Parameters:
{Object} options
  The command options object which includes the service registry and optional selection service.

Method Detail
addCommand(the, scope)
Add a command at a particular scope.

Parameters:
{Command} the
  command being added.
{String} scope
  The scope to which the command applies. "global" commands apply across the page, "dom" level commands apply only when the specified dom element is rendering commands, and "object" scope applies to particular objects being displayed in widgets such as lists or trees.

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

Parameters:
{String} groupId
  The id of the group, must be unique. Also used for dom node id
{Number} position
  The relative position of the group within its parent, optional.
{String} title
  The title of the group, optional
{String} parentPath
  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} scopeId
  The id of a DOM element related to the command's scope. Optional. For example, if the scope is "dom" level, the scopeId describes which dom id to which this command should be added

generateSeparatorImage()
Return an image object that is 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 service would use when rendering different groups of commands.

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

registerCommandContribution(the, the, scopeId, the, a, if)
Register a command contribution, which identifies how a command appears on a page and how it is invoked.

Parameters:
{String} the
  id of the command
{Number} the
  relative position of the command within its parent
{String} scopeId
  The id related to the scope. Depending on the scope, this might be the id of the page or of a dom element.
{String} 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.
{orion.commands.CommandKeyBinding} a
  keyBinding for the command. Optional.
{boolean} if
  true, then the command is never rendered, but the keybinding is hooked.

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

Parameters:
{DOMElement} parent
  The element in which commands should be rendered.
{String} scope
  The scope to which the command applies. "dom" level commands apply only when a specified dom element is rendering commands. "object" scope applies to particular objects/items displayed in widgets such as list or trees. "global" commands always apply.
{Object} items
  An item or array of items to which the command applies. Optional. If not 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. "image" will render a button-like image element in the dom. "menu" will render a push button menu containing the commands.
{String} cssClass
  Optional name of a CSS class that should be added to any rendered commands.
{Object} userData
  Optional user data that should be attached to generated command callbacks
{Boolean} forceText
  When true, always use text and not the icon when showing the command, regardless of the specified renderType.

showKeyBindings(the)
Show the keybindings that are registered with the command service inside the specified domNode.

Parameters:
{DOMElement} the
  dom node where the key bindings should be shown.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jun 27 2011 02:03:40 GMT-0400 (EDT)