Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "Orion/Documentation/Developer Guide/User interface services"
< Orion | Documentation | Developer Guide
(→orion.page.selection) |
|||
Line 2: | Line 2: | ||
= orion.page.selection = | = orion.page.selection = | ||
+ | |||
+ | The selection service tracks the selection in the current page. A client can use this service to get or set the current | ||
+ | |||
+ | selection, or to register a listener that will be notified of selection changes. | ||
+ | |||
+ | Here is an example of adding a listener to track selection changes: | ||
+ | |||
+ | serviceRegistry.getService("orion.page.selection").then(function(service) { | ||
+ | service.addEventListener("selectionChanged", function(fileURI) { | ||
+ | //do something with the selection | ||
+ | }); | ||
+ | }); | ||
+ | |||
+ | See <tt>orion.selection.Selection</tt> in the client API reference for a complete list of functions available on the selection service. | ||
= orion.page.command = | = orion.page.command = |
Revision as of 17:16, 16 June 2011
Contents
Overview of user interface services
orion.page.selection
The selection service tracks the selection in the current page. A client can use this service to get or set the current
selection, or to register a listener that will be notified of selection changes.
Here is an example of adding a listener to track selection changes:
serviceRegistry.getService("orion.page.selection").then(function(service) { service.addEventListener("selectionChanged", function(fileURI) { //do something with the selection }); });
See orion.selection.Selection in the client API reference for a complete list of functions available on the selection service.