Java Doc for ICommandService.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » commands » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.commands 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.commands.ICommandService

All known Subclasses:   org.eclipse.ui.internal.commands.SlaveCommandService,  org.eclipse.ui.internal.commands.CommandService,
ICommandService
public interface ICommandService extends IDisposable(Code)

Provides services related to the command architecture within the workbench. This service can be used to access the set of commands and command categories.

This interface should not be implemented or extended by clients.


since:
   3.1


Field Summary
final public static  StringAUTOGENERATED_CATEGORY_ID
     The identifier of the category in which all auto-generated commands will appear.


Method Summary
public  voidaddExecutionListener(IExecutionListener listener)
     Adds an execution listener to the command service.
public  voiddefineUncategorizedCategory(String name, String description)
     Sets the name and description of the category for uncategorized commands.
public  ParameterizedCommanddeserialize(String serializedParameterizedCommand)
    

Returns a ParameterizedCommand with a command and parameterizations as specified in the provided serializedParameterizedCommand string.

public  CategorygetCategory(String categoryId)
     Retrieves the category with the given identifier.
public  CommandgetCommand(String commandId)
     Retrieves the command with the given identifier.
public  Category[]getDefinedCategories()
     Returns the collection of all of the defined categories in the workbench.
public  CollectiongetDefinedCategoryIds()
     Returns the collection of the identifiers for all of the defined categories in the workbench.
public  CollectiongetDefinedCommandIds()
     Returns the collection of the identifiers for all of the defined commands in the workbench.
public  Command[]getDefinedCommands()
     Returns the collection of all of the defined commands in the workbench.
public  CollectiongetDefinedParameterTypeIds()
     Returns the collection of the identifiers for all of the defined command parameter types in the workbench.
public  ParameterType[]getDefinedParameterTypes()
     Returns the collection of all of the defined command parameter types in the workbench.
public  StringgetHelpContextId(Command command)
     Gets the help context identifier for a particular command.
public  StringgetHelpContextId(String commandId)
     Gets the help context identifier for a particular command.
public  ParameterTypegetParameterType(String parameterTypeId)
     Retrieves the command parameter type with the given identifier.
public  voidreadRegistry()
    

Reads the command information from the registry and the preferences.

public  voidrefreshElements(String commandId, Map filter)
     Refresh any elements registered against the command with the given id. It allows the active handler the opportunity to provide user feedback.
public  voidregisterElement(IElementReference elementReference)
     Re-register a callback element provided by the ICommandService.
public  IElementReferenceregisterElementForCommand(ParameterizedCommand command, UIElement element)
     Register that this element accepts callbacks for this parameterized command.
Parameters:
  command - The parameterized command that is already specialized.
public  voidremoveExecutionListener(IExecutionListener listener)
     Removes an execution listener from the command service.
public  voidsetHelpContextId(IHandler handler, String helpContextId)
     Sets the help context identifier to associate with a particular handler.
public  voidunregisterElement(IElementReference elementReference)
     Unregister an element callback.

Field Detail
AUTOGENERATED_CATEGORY_ID
final public static String AUTOGENERATED_CATEGORY_ID(Code)
The identifier of the category in which all auto-generated commands will appear. This value must never be null.
since:
   3.2





Method Detail
addExecutionListener
public void addExecutionListener(IExecutionListener listener)(Code)
Adds an execution listener to the command service. This listener will be notified as commands are executed.
Parameters:
  listener - The listener to add; must not be null.



defineUncategorizedCategory
public void defineUncategorizedCategory(String name, String description)(Code)
Sets the name and description of the category for uncategorized commands. This is the category that will be returned if ICommandService.getCategory(String) is called with null.
Parameters:
  name - The name of the category for uncategorized commands; must notbe null.
Parameters:
  description - The description of the category for uncategorized commands;may be null.
since:
   3.2



deserialize
public ParameterizedCommand deserialize(String serializedParameterizedCommand) throws NotDefinedException, SerializationException(Code)

Returns a ParameterizedCommand with a command and parameterizations as specified in the provided serializedParameterizedCommand string. The serializedParameterizedCommand must use the format returned by ParameterizedCommand.serialize and described in the Javadoc for that method.

If a parameter id encoded in the serializedParameterizedCommand does not exist in the encoded command, that parameter id and value are ignored. A given parameter id should not be used more than once in serializedParameterizedCommand. This will not result in an exception, but the value of the parameter when the command is executed cannot be specified here.

This method will never return null, however it may throw an exception if there is a problem processing the serialization string or the encoded command is undefined.


Parameters:
  serializedParameterizedCommand - a String representing a command id andparameter ids and values a ParameterizedCommand with the command andparameterizations encoded in theserializedParameterizedCommand
throws:
  NotDefinedException - if the command indicated inserializedParameterizedCommand is not defined
throws:
  SerializationException - if there is an error deserializingserializedParameterizedCommand
See Also:   ParameterizedCommand.serialize
See Also:   CommandManager.deserialize(String)
since:
   3.2



getCategory
public Category getCategory(String categoryId)(Code)
Retrieves the category with the given identifier. If no such category exists, then an undefined category with the given id is created.
Parameters:
  categoryId - The identifier to find. If the category is null,then a category suitable for uncategorized items is definedand returned. A category with the given identifier, either defined orundefined.



getCommand
public Command getCommand(String commandId)(Code)
Retrieves the command with the given identifier. If no such command exists, then an undefined command with the given id is created.
Parameters:
  commandId - The identifier to find; must not be null. A command with the given identifier, either defined or undefined.



getDefinedCategories
public Category[] getDefinedCategories()(Code)
Returns the collection of all of the defined categories in the workbench. The collection of categories (Category) that aredefined; never null, but may be empty.
since:
   3.2



getDefinedCategoryIds
public Collection getDefinedCategoryIds()(Code)
Returns the collection of the identifiers for all of the defined categories in the workbench. The collection of category identifiers (String)that are defined; never null, but may be empty.



getDefinedCommandIds
public Collection getDefinedCommandIds()(Code)
Returns the collection of the identifiers for all of the defined commands in the workbench. The collection of command identifiers (String)that are defined; never null, but may be empty.



getDefinedCommands
public Command[] getDefinedCommands()(Code)
Returns the collection of all of the defined commands in the workbench. The collection of commands (Command) that aredefined; never null, but may be empty.
since:
   3.2



getDefinedParameterTypeIds
public Collection getDefinedParameterTypeIds()(Code)
Returns the collection of the identifiers for all of the defined command parameter types in the workbench. The collection of command parameter type identifiers (String)that are defined; never null, but may be empty.
since:
   3.2



getDefinedParameterTypes
public ParameterType[] getDefinedParameterTypes()(Code)
Returns the collection of all of the defined command parameter types in the workbench. The collection of command parameter types (ParameterType)that are defined; never null, but may be empty.
since:
   3.2



getHelpContextId
public String getHelpContextId(Command command) throws NotDefinedException(Code)
Gets the help context identifier for a particular command. The command's handler is first checked for a help context identifier. If the handler does not have a help context identifier, then the help context identifier for the command is returned. If neither has a help context identifier, then null is returned.
Parameters:
  command - The command for which the help context should be retrieved;must not be null. The help context identifier to use for the given command; may benull.
throws:
  NotDefinedException - If the given command is not defined.
since:
   3.2



getHelpContextId
public String getHelpContextId(String commandId) throws NotDefinedException(Code)
Gets the help context identifier for a particular command. The command's handler is first checked for a help context identifier. If the handler does not have a help context identifier, then the help context identifier for the command is returned. If neither has a help context identifier, then null is returned.
Parameters:
  commandId - The identifier of the command for which the help contextshould be retrieved; must not be null. The help context identifier to use for the given command; may benull.
throws:
  NotDefinedException - If the command with the given identifier is not defined.
since:
   3.2



getParameterType
public ParameterType getParameterType(String parameterTypeId)(Code)
Retrieves the command parameter type with the given identifier. If no such parameter type exists, then an undefined parameter type with the given id is created.
Parameters:
  parameterTypeId - The identifier to find; must not be null. A command parameter type with the given identifier, eitherdefined or undefined.
since:
   3.2



readRegistry
public void readRegistry()(Code)

Reads the command information from the registry and the preferences. This will overwrite any of the existing information in the command service. This method is intended to be called during start-up. When this method completes, this command service will reflect the current state of the registry and preference store.




refreshElements
public void refreshElements(String commandId, Map filter)(Code)
Refresh any elements registered against the command with the given id. It allows the active handler the opportunity to provide user feedback. If the command is parameterized, some of the parameters can be specified to help narrow down which elements to refresh.

The service locator used in registering the element can also be used to scope the search. For example: if you wanted all elements for your command but only within the part's workbench window, you could use:

 Map filter = new HashMap();
 filter.put(IServiceScopes.WINDOW_SCOPE, getSite().getPage()
 .getWorkbenchWindow());
 commandService.refreshElements(commandId, filter);
 


Parameters:
  commandId - The command id to refresh if it has registered eleemnts.
Parameters:
  filter - key-value pairs that can narrow down the callbacks to return.The parameters are ANDed together. This may benull.
since:
   3.3



registerElement
public void registerElement(IElementReference elementReference)(Code)
Re-register a callback element provided by the ICommandService. This element reference must not currently be held by the ICommandService. i.e. it must have been removed using ICommandService.unregisterElement(IElementReference) .
Parameters:
  elementReference - The reference to re-register. Must not be null.
since:
   3.3



registerElementForCommand
public IElementReference registerElementForCommand(ParameterizedCommand command, UIElement element) throws NotDefinedException(Code)
Register that this element accepts callbacks for this parameterized command.
Parameters:
  command - The parameterized command that is already specialized. Mustnot be null.
Parameters:
  element - The callback to register for this specialized commandinstance. Must not be null. A reference for the registered element that can be used tounregister it.
throws:
  NotDefinedException - If the command included in the ParameterizedCommand is notdefined, or the element is null.
since:
   3.3



removeExecutionListener
public void removeExecutionListener(IExecutionListener listener)(Code)
Removes an execution listener from the command service.
Parameters:
  listener - The listener to remove; must not be null.



setHelpContextId
public void setHelpContextId(IHandler handler, String helpContextId)(Code)
Sets the help context identifier to associate with a particular handler.
Parameters:
  handler - The handler with which to register a help context identifier;must not be null.
Parameters:
  helpContextId - The help context identifier to register; may benull if the help context identifier should beremoved.
since:
   3.2



unregisterElement
public void unregisterElement(IElementReference elementReference)(Code)
Unregister an element callback. It will be removed from the ICommandService. The same service that is used to register an element for a command must be used to unregister the element.
Parameters:
  elementReference - The callback reference that was provided by the commandservice on registration. Must not be null.
since:
   3.3



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.