Tracks focusGained and focusLost events for a Control registered with this
service, and provides the control and its registered ID as variables to the
application evaluation context for evaluation be the various services.
This service provides 2 variables, activeFocusControl (a Control) and
activeFocusControlId (the ID registered with the service).
You can use this service to provide default cut/copy/paste/selectAll for
specific text controls outside of the normal workbench part lifecycle, like a
control contributed to the trim. For example:
<handler
class="org.eclipse.ui.internal.handlers.WidgetMethodHandler:paste"
commandId="org.eclipse.ui.edit.paste">
<activeWhen>
<with variable="activeFocusControlId">
<equals value="org.eclipse.ui.tests.focusText"/>
</with>
</activeWhen>
</handler>
See Also: org.eclipse.ui.ISources since: 3.3 |