Java Doc for IHandlerService.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » handlers » 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.handlers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.handlers.IHandlerService

All known Subclasses:   org.eclipse.ui.internal.handlers.HandlerService,  org.eclipse.ui.internal.handlers.SlaveHandlerService,
IHandlerService
public interface IHandlerService extends IServiceWithSources(Code)

Provides services related to activating and deactivating handlers within the workbench.

This interface is not intended to be implemented or extended by clients.


since:
   3.1




Method Summary
public  IHandlerActivationactivateHandler(IHandlerActivation activation)
    

Activates the given handler from a child service.

public  IHandlerActivationactivateHandler(String commandId, IHandler handler)
    

Activates the given handler within the context of this service.

public  IHandlerActivationactivateHandler(String commandId, IHandler handler, Expression expression)
    

Activates the given handler within the context of this service.

public  IHandlerActivationactivateHandler(String commandId, IHandler handler, Expression expression, boolean global)
    

Activates the given handler within the context of this service.

public  IHandlerActivationactivateHandler(String commandId, IHandler handler, Expression expression, int sourcePriorities)
    

Activates the given handler within the context of this service.

public  ExecutionEventcreateExecutionEvent(Command command, Event event)
     Creates an execution event based on an SWT event.
public  ExecutionEventcreateExecutionEvent(ParameterizedCommand command, Event event)
     Creates a parameterized execution event based on an SWT event and a parameterized command.
public  voiddeactivateHandler(IHandlerActivation activation)
     Deactivates the given handler within the context of this service.
public  voiddeactivateHandlers(Collection activations)
     Deactivates the given handlers within the context of this service.
public  ObjectexecuteCommand(String commandId, Event event)
     Executes the command with the given identifier and no parameters.
Parameters:
  commandId - The identifier of the command to execute; must not benull.
Parameters:
  event - The SWT event triggering the command execution; may benull.
public  ObjectexecuteCommand(ParameterizedCommand command, Event event)
     Executes the given parameterized command.
Parameters:
  command - The parameterized command to be executed; must not benull.
Parameters:
  event - The SWT event triggering the command execution; may benull.
public  IEvaluationContextgetCurrentState()
     Returns an evaluation context representing the current state of the world.
public  voidreadRegistry()
    

Reads the handler information from the registry.

public  voidsetHelpContextId(IHandler handler, String helpContextId)
     Sets the help context identifier to associate with a particular handler.



Method Detail
activateHandler
public IHandlerActivation activateHandler(IHandlerActivation activation)(Code)

Activates the given handler from a child service. This is used by slave and nested services to promote handler activations up to the root. By using this method, it is possible for handlers coming from a more nested component to override the nested component.


Parameters:
  activation - The activation that is local to the child service; must not benull. A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. Theactivation will automatically be cancelled if the context fromwhich this service was retrieved is destroyed. This activation islocal to this service (i.e., it is not the activation that ispassed as a parameter).
since:
   3.2



activateHandler
public IHandlerActivation activateHandler(String commandId, IHandler handler)(Code)

Activates the given handler within the context of this service. If this service was retrieved from the workbench, then this handler will be active globally. If the service was retrieved from a nested component, then the handler will only be active within that component.

Also, it is guaranteed that the handlers submitted through a particular service will be cleaned up when that services is destroyed. So, for example, a service retrieved from a IWorkbenchPartSite would deactivate all of its handlers when the site is destroyed.


Parameters:
  commandId - The identifier for the command which this handler handles;must not be null.
Parameters:
  handler - The handler to activate; must not be null. A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. Theactivation will automatically be cancelled if the context fromwhich this service was retrieved is destroyed.



activateHandler
public IHandlerActivation activateHandler(String commandId, IHandler handler, Expression expression)(Code)

Activates the given handler within the context of this service. The handler becomes active when expression evaluates to true. This is the same as calling IHandlerService.activateHandler(String,IHandler,Expression,boolean) with global==false.

Also, it is guaranteed that the handlers submitted through a particular service will be cleaned up when that services is destroyed. So, for example, a service retrieved from a IWorkbenchPartSite would deactivate all of its handlers when the site is destroyed.


Parameters:
  commandId - The identifier for the command which this handler handles;must not be null.
Parameters:
  handler - The handler to activate; must not be null.
Parameters:
  expression - This expression must evaluate to true beforethis handler will really become active. The expression may benull if the handler should always be active. A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. Theactivation will automatically be cancelled if the context fromwhich this service was retrieved is destroyed.
See Also:   org.eclipse.ui.ISources
since:
   3.2



activateHandler
public IHandlerActivation activateHandler(String commandId, IHandler handler, Expression expression, boolean global)(Code)

Activates the given handler within the context of this service. The handler becomes active when expression evaluates to true. if global==false, then this handler service must also be the active service to active the handler. For example, the handler service on a part is active when that part is active.

Also, it is guaranteed that the handlers submitted through a particular service will be cleaned up when that services is destroyed. So, for example, a service retrieved from a IWorkbenchPartSite would deactivate all of its handlers when the site is destroyed.


Parameters:
  commandId - The identifier for the command which this handler handles;must not be null.
Parameters:
  handler - The handler to activate; must not be null.
Parameters:
  expression - This expression must evaluate to true beforethis handler will really become active. The expression may benull if the handler should always be active.
Parameters:
  global - Indicates that the handler should be activated irrespectivelyof whether the corresponding workbench component (e.g.,window, part, etc.) is active. A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. Theactivation will automatically be cancelled if the context fromwhich this service was retrieved is destroyed.
See Also:   org.eclipse.ui.ISources
since:
   3.2



activateHandler
public IHandlerActivation activateHandler(String commandId, IHandler handler, Expression expression, int sourcePriorities)(Code)

Activates the given handler within the context of this service. The handler becomes active when expression evaluates to true.

Also, it is guaranteed that the handlers submitted through a particular service will be cleaned up when that services is destroyed. So, for example, a service retrieved from a IWorkbenchPartSite would deactivate all of its handlers when the site is destroyed.


Parameters:
  commandId - The identifier for the command which this handler handles;must not be null.
Parameters:
  handler - The handler to activate; must not be null.
Parameters:
  expression - This expression must evaluate to true beforethis handler will really become active. The expression may benull if the handler should always be active.
Parameters:
  sourcePriorities - The source priorities for the expression. A token which can be used to later cancel the activation. Onlysomeone with access to this token can cancel the activation. Theactivation will automatically be cancelled if the context fromwhich this service was retrieved is destroyed.
See Also:   org.eclipse.ui.ISourcesIHandlerService.activateHandler(StringIHandlerExpression)



createExecutionEvent
public ExecutionEvent createExecutionEvent(Command command, Event event)(Code)
Creates an execution event based on an SWT event. This execution event can then be passed to a command for execution.
Parameters:
  command - The command for which an execution event should be created;must not be null.
Parameters:
  event - The SWT event triggering the command execution; may benull. An execution event suitable for callingCommand.executeWithChecks(ExecutionEvent).
since:
   3.2
See Also:   Command.executeWithChecks(ExecutionEvent)



createExecutionEvent
public ExecutionEvent createExecutionEvent(ParameterizedCommand command, Event event)(Code)
Creates a parameterized execution event based on an SWT event and a parameterized command. This execution event can then be passed to a command for execution.
Parameters:
  command - The parameterized command for which an execution event shouldbe created; must not be null.
Parameters:
  event - The SWT event triggering the command execution; may benull. An execution event suitable for callingCommand.executeWithChecks(ExecutionEvent).
since:
   3.2
See Also:   ParameterizedCommand.getCommand
See Also:   Command.executeWithChecks(ExecutionEvent)



deactivateHandler
public void deactivateHandler(IHandlerActivation activation)(Code)
Deactivates the given handler within the context of this service. If the handler was activated with a different service, then it must be deactivated from that service instead. It is only possible to retract a handler activation with this method. That is, you must have the same IHandlerActivation used to activate the handler.
Parameters:
  activation - The token that was returned from a call toactivateHandler; must not be null.



deactivateHandlers
public void deactivateHandlers(Collection activations)(Code)
Deactivates the given handlers within the context of this service. If the handler was activated with a different service, then it must be deactivated from that service instead. It is only possible to retract a handler activation with this method. That is, you must have the same IHandlerActivation used to activate the handler.
Parameters:
  activations - The tokens that were returned from a call toactivateHandler. This collection must onlycontain instances of IHandlerActivation. Thecollection must not be null.



executeCommand
public Object executeCommand(String commandId, Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException(Code)
Executes the command with the given identifier and no parameters.
Parameters:
  commandId - The identifier of the command to execute; must not benull.
Parameters:
  event - The SWT event triggering the command execution; may benull. The return value from the execution; may be null.
throws:
  ExecutionException - If the handler has problems executing this command.
throws:
  NotDefinedException - If the command you are trying to execute is not defined.
throws:
  NotEnabledException - If the command you are trying to execute is not enabled.
throws:
  NotHandledException - If there is no handler.
since:
   3.2
See Also:   Command.executeWithChecks(ExecutionEvent)



executeCommand
public Object executeCommand(ParameterizedCommand command, Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException(Code)
Executes the given parameterized command.
Parameters:
  command - The parameterized command to be executed; must not benull.
Parameters:
  event - The SWT event triggering the command execution; may benull. The return value from the execution; may be null.
throws:
  ExecutionException - If the handler has problems executing this command.
throws:
  NotDefinedException - If the command you are trying to execute is not defined.
throws:
  NotEnabledException - If the command you are trying to execute is not enabled.
throws:
  NotHandledException - If there is no handler.
since:
   3.2
See Also:   Command.executeWithChecks(ExecutionEvent)



getCurrentState
public IEvaluationContext getCurrentState()(Code)
Returns an evaluation context representing the current state of the world. This is equivalent to the application context required by ExecutionEvent . the current state of the application; never null.
See Also:   ParameterizedCommand.executeWithChecks(ObjectObject)
See Also:   ExecutionEvent.ExecutionEvent(Commandjava.util.MapObjectObject)



readRegistry
public void readRegistry()(Code)

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




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



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