Class HandlerServiceImpl
java.lang.Object
org.eclipse.e4.core.commands.internal.HandlerServiceImpl
- All Implemented Interfaces:
EHandlerService
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activateHandler
(String commandId, Object handler) Makes the passedhandler
active for the command with the passedcommandId
.boolean
canExecute
(ParameterizedCommand command) Tests if the active handler associated with the passedcommand
can be executed.boolean
canExecute
(ParameterizedCommand command, IEclipseContext staticContext) Check if a command can be executed.void
deactivateHandler
(String commandId, Object handler) Deactivates the passedhandler
from the command with the passed id.executeHandler
(ParameterizedCommand command) Executes the active handler of the passedcommand
.executeHandler
(ParameterizedCommand command, IEclipseContext staticContext) Execute a handler for the command.static IHandler
getHandler
(String commandId) static Object
lookUpHandler
(IEclipseContext context, String commandId) static org.eclipse.e4.core.commands.internal.HandlerServiceImpl.ExecutionContexts
pop()
static void
push
(IEclipseContext ctx, IEclipseContext staticCtx) void
-
Field Details
-
H_ID
- See Also:
-
PARM_MAP
- See Also:
-
CAN_EXECUTE
- See Also:
-
NOT_HANDLED
- See Also:
-
STATIC_CONTEXT
- See Also:
-
HANDLER_EXCEPTION
- See Also:
-
handlerGenerator
-
-
Constructor Details
-
HandlerServiceImpl
public HandlerServiceImpl()
-
-
Method Details
-
getHandler
-
push
-
pop
public static org.eclipse.e4.core.commands.internal.HandlerServiceImpl.ExecutionContexts pop() -
lookUpHandler
- Parameters:
context
- the context to start the lookup process- Returns:
- a handler, or
null
-
activateHandler
Description copied from interface:EHandlerService
Makes the passedhandler
active for the command with the passedcommandId
.- Specified by:
activateHandler
in interfaceEHandlerService
- Parameters:
commandId
- Must not benull
handler
- Must not benull
-
canExecute
Description copied from interface:EHandlerService
Tests if the active handler associated with the passedcommand
can be executed.- Specified by:
canExecute
in interfaceEHandlerService
- Parameters:
command
- Must not benull
- Returns:
- true of the handler can be executed, false if it cannot be executed or if no handler is active for the passed command.
-
canExecute
Description copied from interface:EHandlerService
Check if a command can be executed.- Specified by:
canExecute
in interfaceEHandlerService
- Parameters:
command
- Must not benull
.staticContext
- Must not benull
. You must dispose your context when you are done.- Returns:
- true if the command can be executed.
-
deactivateHandler
Description copied from interface:EHandlerService
Deactivates the passedhandler
from the command with the passed id.- Specified by:
deactivateHandler
in interfaceEHandlerService
- Parameters:
commandId
- Must not benull
handler
- Must not benull
-
executeHandler
Description copied from interface:EHandlerService
Executes the active handler of the passedcommand
.- Specified by:
executeHandler
in interfaceEHandlerService
- Parameters:
command
- Must not benull
- Returns:
- the return value of the handler, could be null
-
executeHandler
Description copied from interface:EHandlerService
Execute a handler for the command.- Specified by:
executeHandler
in interfaceEHandlerService
- Parameters:
command
- Must not benull
staticContext
- Must not benull
. You must dispose your context when you are done.- Returns:
- the command return value.
-
setContext
-
getContext
-
getExecutionContext
-