Class CommandServiceImpl

java.lang.Object
org.eclipse.e4.core.commands.internal.CommandServiceImpl
All Implemented Interfaces:
ECommandService

public class CommandServiceImpl extends Object implements ECommandService
  • Constructor Details

    • CommandServiceImpl

      public CommandServiceImpl()
  • Method Details

    • setManager

      @Inject public void setManager(CommandManager m)
    • createCommand

      public ParameterizedCommand createCommand(String id, Map<String,?> parameters)
      Description copied from interface: ECommandService
      Allows to create an instance of an existing command based on the id parameter
      Specified by:
      createCommand in interface ECommandService
      Parameters:
      id - - Command to create
      parameters - - Map of the parameters of the command or null
      Returns:
      ParameterizedCommand - created command or null
    • createCommand

      public ParameterizedCommand createCommand(String id)
      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 interface ECommandService
      Parameters:
      id - - Command to create
      Returns:
      ParameterizedCommand - created command or null
    • defineCategory

      public Category defineCategory(String id, String name, String description)
      Specified by:
      defineCategory in interface ECommandService
      Parameters:
      id - - Category to define
      name - - The name of this category; must not be null
      description - - The description for this category; may be null
      Returns:
      the defined category
    • defineCommand

      public Command defineCommand(String id, String name, String description, Category category, IParameter[] parameters)
      Specified by:
      defineCommand in interface ECommandService
      Parameters:
      id - - Command to define
      name - - The name of this command; must not be null
      description - - The description for this command; may be null
      category - - The category for this command; must not be null
      parameters - - The parameters understood by this command. This value may be either null 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 interface ECommandService
      Parameters:
      id - - Command to define
      name - - The name of this command; must not be null
      description - - The description for this command; may be null
      category - - The category for this command; must not be null
      parameters - - The parameters understood by this command. This value may be either null or empty if the command does not accept parameters
      helpContextId - - The identifier of the help context to associate with this command; may be null if this command does not have any help associated with it
      Returns:
      the defined command
    • getCategory

      public Category getCategory(String categoryId)
      Description copied from interface: ECommandService
      Get category for id.
      Specified by:
      getCategory in interface ECommandService
      Parameters:
      categoryId - - The category id
      Returns:
      the category for id
    • getCommand

      public Command getCommand(String commandId)
      Description copied from interface: ECommandService
      Get command for id.
      Specified by:
      getCommand in interface ECommandService
      Parameters:
      commandId - - The command id
      Returns:
      the command for id