Eclipse Platform
Release 3.1

org.eclipse.core.commands
Class ExecutionEvent

java.lang.Object
  extended byorg.eclipse.core.commands.ExecutionEvent

public final class ExecutionEvent
extends Object

The data object to pass to the command (and its handler) as it executes. This carries information about the current state of the application, and the application context in which the command was executed.

An execution event carries three blocks of data: the parameters, the trigger, and the application context. How these blocks are used is application dependent. In the Eclipse workbench, the trigger is an SWT event, and the application context contains information about the selection and active part.

Since:
3.1

Constructor Summary
ExecutionEvent(Map parameters, Object trigger, Object applicationContext)
          Constructs a new instance of ExecutionEvent.
 
Method Summary
 Object getApplicationContext()
          Returns the state of the application at the time the execution was triggered.
 String getParameter(String parameterName)
          Returns the parameter of the given name.
 Map getParameters()
          Returns all of the parameters.
 Object getTrigger()
          Returns the object that triggered the execution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutionEvent

public ExecutionEvent(Map parameters,
                      Object trigger,
                      Object applicationContext)
Constructs a new instance of ExecutionEvent.

Parameters:
parameters - The parameters to qualify the execution; must not be null. This must be a map of parameter names (String) to parameter values (String).
trigger - The object that triggered the execution; may be null.
applicationContext - The state of the application at the time the execution was triggered; may be null.
Method Detail

getApplicationContext

public final Object getApplicationContext()
Returns the state of the application at the time the execution was triggered.

Returns:
The application context; may be null.

getParameter

public final String getParameter(String parameterName)
Returns the parameter of the given name.

Parameters:
parameterName - The name of the parameter to retrieve; may be null.
Returns:
The parameter value; null if the parameter cannot be found.

getParameters

public final Map getParameters()
Returns all of the parameters.

Returns:
The parameters; never null, but may be empty.

getTrigger

public final Object getTrigger()
Returns the object that triggered the execution

Returns:
The trigger; null if there was no trigger.

Eclipse Platform
Release 3.1

Guidelines for using Eclipse APIs.

Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.