Class Index | File Index

## Classes

- _global_
- Boolean
- Date
- eclipse.sites
- eclipse.sites.SiteRenderer
- eclipse.sites.SiteTreeModel
- 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.editor.util
- 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.links.TextLinkService
- 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.siteService.SiteConfiguration
- orion.siteService.SiteService
- orion.status.StatusReportingService
- orion.textview
- orion.textview.Annotation
- orion.textview.AnnotationIterator
- orion.textview.AnnotationModel
- orion.textview.AnnotationRuler
- orion.textview.ContextMenuEvent
- orion.textview.DestroyEvent
- orion.textview.FoldingAnnotation
- orion.textview.KeyBinding
- orion.textview.LineNumberRuler
- orion.textview.LineStyleEvent
- orion.textview.ModelChangedEvent
- orion.textview.ModelChangingEvent
- orion.textview.ModifyEvent
- orion.textview.OverviewRuler
- orion.textview.Projection
- orion.textview.ProjectionTextModel
- 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
- orion.widgets.OpenResourceDialog
- orion.widgets.SiteEditor
- String

# Class orion.commands.CommandService

CommandService can render commands appropriate for a particular scope and DOM element.
Defined in: </shared/eclipse/e4/orion/I201110211442/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(parent) Add a dom node 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(commandId, position, scopeId, parentPath, keyBinding, keyOnly) 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, cssClassCmdOver, cssClassCmdLink) 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(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 service would use when rendering different groups of commands.

Parameters:
parent

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

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

Parameters:
{String} commandId
  the id of the command
{Number} position
  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} parentPath
  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} keyBinding
  a keyBinding for the command. Optional.
{boolean} keyOnly
  if true, then the command is never rendered, but the keybinding is hooked.

renderCommands(parent, scope, items, handler, renderType, cssClass, userData, forceText, cssClassCmdOver, cssClassCmdLink)
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.
cssClassCmdOver
cssClassCmdLink

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 Fri Oct 21 2011 14:44:12 GMT-0400 (EDT)