Class HandlerServiceImpl
java.lang.Object
org.eclipse.e4.core.commands.internal.HandlerServiceImpl
- All Implemented Interfaces:
EHandlerService
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactivateHandler(String commandId, Object handler) Makes the passedhandleractive for the command with the passedcommandId.booleancanExecute(ParameterizedCommand command) Tests if the active handler associated with the passedcommandcan be executed.booleancanExecute(ParameterizedCommand command, IEclipseContext staticContext) Check if a command can be executed.voiddeactivateHandler(String commandId, Object handler) Deactivates the passedhandlerfrom 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 IHandlergetHandler(String commandId) static ObjectlookUpHandler(IEclipseContext context, String commandId) static org.eclipse.e4.core.commands.internal.HandlerServiceImpl.ExecutionContextspop()static voidpush(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:EHandlerServiceMakes the passedhandleractive for the command with the passedcommandId.- Specified by:
activateHandlerin interfaceEHandlerService- Parameters:
commandId- Must not benullhandler- Must not benull
-
canExecute
Description copied from interface:EHandlerServiceTests if the active handler associated with the passedcommandcan be executed.- Specified by:
canExecutein 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:EHandlerServiceCheck if a command can be executed.- Specified by:
canExecutein 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:EHandlerServiceDeactivates the passedhandlerfrom the command with the passed id.- Specified by:
deactivateHandlerin interfaceEHandlerService- Parameters:
commandId- Must not benullhandler- Must not benull
-
executeHandler
Description copied from interface:EHandlerServiceExecutes the active handler of the passedcommand.- Specified by:
executeHandlerin interfaceEHandlerService- Parameters:
command- Must not benull- Returns:
- the return value of the handler, could be null
-
executeHandler
Description copied from interface:EHandlerServiceExecute a handler for the command.- Specified by:
executeHandlerin interfaceEHandlerService- Parameters:
command- Must not benullstaticContext- Must not benull. You must dispose your context when you are done.- Returns:
- the command return value.
-
setContext
-
getContext
-
getExecutionContext
-