Class CommandServiceImpl
java.lang.Object
org.eclipse.e4.core.commands.internal.CommandServiceImpl
- All Implemented Interfaces:
ECommandService
-
Constructor Summary
Constructors -
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:ECommandServiceAllows to create an instance of an existing command based on the id parameter- Specified by:
createCommandin 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:ECommandServiceAllows 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:
createCommandin interfaceECommandService- Parameters:
id- - Command to create- Returns:
- ParameterizedCommand - created command or null
-
defineCategory
- Specified by:
defineCategoryin interfaceECommandService- Parameters:
id- - Category to definename- - The name of this category; must not benulldescription- - 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:
defineCommandin interfaceECommandService- Parameters:
id- - Command to definename- - The name of this command; must not benulldescription- - The description for this command; may benullcategory- - The category for this command; must not benullparameters- - The parameters understood by this command. This value may be eithernullor 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:
defineCommandin interfaceECommandService- Parameters:
id- - Command to definename- - The name of this command; must not benulldescription- - The description for this command; may benullcategory- - The category for this command; must not benullparameters- - The parameters understood by this command. This value may be eithernullor empty if the command does not accept parametershelpContextId- - The identifier of the help context to associate with this command; may benullif this command does not have any help associated with it- Returns:
- the defined command
-
getCategory
Description copied from interface:ECommandServiceGet category for id.- Specified by:
getCategoryin interfaceECommandService- Parameters:
categoryId- - The category id- Returns:
- the category for id
-
getCommand
Description copied from interface:ECommandServiceGet command for id.- Specified by:
getCommandin interfaceECommandService- Parameters:
commandId- - The command id- Returns:
- the command for id
-