Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse Platform
Release 3.5

org.eclipse.core.commands
Class ExecutionEvent

java.lang.Object
  extended by 
org.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 ()
          Constructs a new instance of ExecutionEvent with no parameters, no trigger and no application context.
ExecutionEvent ( Command command, Map parameters, Object trigger, Object applicationContext)
          Constructs a new instance of ExecutionEvent.
ExecutionEvent ( Map parameters, Object trigger, Object applicationContext)
          Deprecated. use ExecutionEvent(Command, Map, Object, Object)
 
Method Summary
  Object getApplicationContext ()
          Returns the state of the application at the time the execution was triggered.
  Command getCommand ()
          Returns the command being executed.
  Object getObjectParameterForExecution ( String parameterId)
          Returns the object represented by the string value of the parameter with the provided id.
  String getParameter ( String parameterId)
          Returns the value of the parameter with the given id.
  Map getParameters ()
          Returns all of the parameters.
  Object getTrigger ()
          Returns the object that triggered the execution
  String toString ()
          The string representation of this execution event -- for debugging purposes only.
 
Methods inherited from class java.lang. Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExecutionEvent

public ExecutionEvent()
Constructs a new instance of ExecutionEvent with no parameters, no trigger and no application context. This is just a convenience method.

Since:
3.2

ExecutionEvent

public ExecutionEvent(
Map parameters,
                      
Object trigger,
                      
Object applicationContext)
Deprecated. use ExecutionEvent(Command, Map, Object, Object)

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 ids (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.

ExecutionEvent

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

Parameters:
command - The command being executed; may be null.
parameters - The parameters to qualify the execution; must not be null. This must be a map of parameter ids (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.
Since:
3.2
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.

getCommand

public final 
Command getCommand()
Returns the command being executed.

Returns:
The command being executed.
Since:
3.2

getObjectParameterForExecution

public final 
Object getObjectParameterForExecution(
String parameterId)
                                            throws 
ExecutionException
Returns the object represented by the string value of the parameter with the provided id.

This is intended to be used in the scope of an IHandler.execute(ExecutionEvent) method, so any problem getting the object value causes ExecutionException to be thrown.

Parameters:
parameterId - The id of a parameter to retrieve the object value of.
Returns:
The object value of the parameter with the provided id.
Throws:
ExecutionException - if the parameter object value could not be obtained for any reason
Since:
3.2

getParameter

public final 
String getParameter(
String parameterId)
Returns the value of the parameter with the given id.

Parameters:
parameterId - The id 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.

toString

public final 
String toString()
The string representation of this execution event -- for debugging purposes only. This string should not be shown to an end user.

Overrides:
toString in class Object
Returns:
The string representation; never null.

Eclipse Platform
Release 3.5

Guidelines for using Eclipse APIs.

Copyright (c) Eclipse contributors and others 2000, 2008. All rights reserved.


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire