Class CommandServiceImpl
java.lang.Object
org.eclipse.e4.core.commands.internal.CommandServiceImpl
- All Implemented Interfaces:
ECommandService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateCommand
(String id) Allows to create an instance of an existing command based on the id parameter which does not require parameters Delegates to createCommand(String,Map) passing in null as Map parametercreateCommand
(String id, Map<String, ?> parameters) Allows to create an instance of an existing command based on the id parameterdefineCategory
(String id, String name, String description) defineCommand
(String id, String name, String description, Category category, IParameter[] parameters) defineCommand
(String id, String name, String description, Category category, IParameter[] parameters, String helpContextId) getCategory
(String categoryId) Get category for id.getCommand
(String commandId) Get command for id.void
-
Constructor Details
-
CommandServiceImpl
public CommandServiceImpl()
-
-
Method Details
-
setManager
-
createCommand
Description copied from interface:ECommandService
Allows to create an instance of an existing command based on the id parameter- Specified by:
createCommand
in interfaceECommandService
- Parameters:
id
- - Command to createparameters
- - Map of the parameters of the command or null- Returns:
- ParameterizedCommand - created command or null
-
createCommand
Description copied from interface:ECommandService
Allows to create an instance of an existing command based on the id parameter which does not require parameters Delegates to createCommand(String,Map) passing in null as Map parameter- Specified by:
createCommand
in interfaceECommandService
- Parameters:
id
- - Command to create- Returns:
- ParameterizedCommand - created command or null
-
defineCategory
- Specified by:
defineCategory
in interfaceECommandService
- Parameters:
id
- - Category to definename
- - The name of this category; must not benull
description
- - The description for this category; may benull
- Returns:
- the defined category
-
defineCommand
public Command defineCommand(String id, String name, String description, Category category, IParameter[] parameters) - Specified by:
defineCommand
in interfaceECommandService
- Parameters:
id
- - Command to definename
- - The name of this command; must not benull
description
- - The description for this command; may benull
category
- - The category for this command; must not benull
parameters
- - The parameters understood by this command. This value may be eithernull
or empty if the command does not accept parameters- Returns:
- the defined command
-
defineCommand
public Command defineCommand(String id, String name, String description, Category category, IParameter[] parameters, String helpContextId) - Specified by:
defineCommand
in interfaceECommandService
- Parameters:
id
- - Command to definename
- - The name of this command; must not benull
description
- - The description for this command; may benull
category
- - The category for this command; must not benull
parameters
- - The parameters understood by this command. This value may be eithernull
or empty if the command does not accept parametershelpContextId
- - The identifier of the help context to associate with this command; may benull
if this command does not have any help associated with it- Returns:
- the defined command
-
getCategory
Description copied from interface:ECommandService
Get category for id.- Specified by:
getCategory
in interfaceECommandService
- Parameters:
categoryId
- - The category id- Returns:
- the category for id
-
getCommand
Description copied from interface:ECommandService
Get command for id.- Specified by:
getCommand
in interfaceECommandService
- Parameters:
commandId
- - The command id- Returns:
- the command for id
-