It is possible to associate arbitrary properties with a Job
, which can be used to present its progress in different ways. For example, by specifying a command it's possible to click on a running Job
and then execute something in the user interface, such as a detailed job description. Job
properties are set with setProperty()
, and can include any key/value combination. The keys use a QualifiedName
, which is like a pair of strings for namespace/value. In the case of the Progress view, there is an IProgressConstants2
interface, which defines values that can be set, including COMMAND_PROPERTY
, which can be used to invoke a command.
Open the
HelloHandler
and go to the end of theexecute()
method. Just before theJob
is scheduled, acquire theCommand
from theICommandService
and then stamp it on theJob
as a property.ICommandService service = (ICommandService) PlatformUI.getWorkbench().getService(ICommandService.class); Command command = service == null...