Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013

ch.elexis.commands
Class Handler

java.lang.Object
  extended by ch.elexis.commands.Handler

public class Handler
extends java.lang.Object

Simplified Handler for execution of Commands


Field Summary
static java.lang.String DEFAULTPARAM
           
 
Constructor Summary
Handler()
           
 
Method Summary
static java.lang.Object execute(org.eclipse.ui.IViewSite origin, java.lang.String commandID, java.lang.Object param)
          Execute a Command with a single Object as Parameter
static java.lang.Object executeWithProgress(org.eclipse.ui.IViewSite origin, java.lang.String commandID, java.lang.Object param, org.eclipse.core.runtime.IProgressMonitor monitor)
          Execute a Command with a single Object as Parameter and a ProgressMonitor
static org.eclipse.core.runtime.IProgressMonitor getMonitor(org.eclipse.core.commands.ExecutionEvent eev)
          get the ProgressMonitor supplied by the caller
static java.lang.Object getParam(org.eclipse.core.commands.ExecutionEvent eev)
          Return the given single Parameter.
static java.lang.Object getParam(java.lang.String paramName)
          Return a named parameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULTPARAM

public static final java.lang.String DEFAULTPARAM
See Also:
Constant Field Values
Constructor Detail

Handler

public Handler()
Method Detail

executeWithProgress

public static java.lang.Object executeWithProgress(org.eclipse.ui.IViewSite origin,
                                                   java.lang.String commandID,
                                                   java.lang.Object param,
                                                   org.eclipse.core.runtime.IProgressMonitor monitor)
Execute a Command with a single Object as Parameter and a ProgressMonitor

Parameters:
origin - The ViewSite the Command was originated
commandID - the ID of the command as defined in plugin.xml
param - the arbitrary parameter
Returns:
the return value of the Command's execute method

execute

public static java.lang.Object execute(org.eclipse.ui.IViewSite origin,
                                       java.lang.String commandID,
                                       java.lang.Object param)
Execute a Command with a single Object as Parameter

Parameters:
origin - The ViewSite the Command was originated
commandID - the ID of the command as defined in plugin.xml
param - the arbitrary parameter
Returns:
the return value of the Command's execute method

getParam

public static java.lang.Object getParam(org.eclipse.core.commands.ExecutionEvent eev)
Return the given single Parameter. This is to be called from within the execute method of the command

Parameters:
eev - the ExecutionEnvironment of the command
Returns:
the Object as given from the caller to execute(...) or null if no such object was given

getMonitor

public static org.eclipse.core.runtime.IProgressMonitor getMonitor(org.eclipse.core.commands.ExecutionEvent eev)
get the ProgressMonitor supplied by the caller

Parameters:
eev - the ExecutionEnvironment of the Command
Returns:
the monitor if any or null if none was given.

getParam

public static java.lang.Object getParam(java.lang.String paramName)
Return a named parameter

Parameters:
paramName -
Returns:

Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc für Elexis version 2.1.7.dev vom 01.09.2013