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


java.lang.Object
   org.eclipse.ui.internal.services.ExpressionAuthority
      org.eclipse.ui.internal.contexts.ContextAuthority

ContextAuthority
final public class ContextAuthority extends ExpressionAuthority (Code)

A central authority for deciding activation of contexts. This authority listens to a variety of incoming sources, and updates the underlying context manager if changes occur.


since:
   3.1


Field Summary
final public static  StringDEFER_EVENTS
    
final public static  StringSEND_EVENTS
    

Constructor Summary
 ContextAuthority(ContextManager contextManager, IContextService contextService)
     Constructs a new instance of ContextAuthority.
Parameters:
  contextManager - The context manager from which contexts can be retrieved (toupdate their active state); must not be null.
Parameters:
  contextService - The workbench context service for which this authority isacting.

Method Summary
final  voidactivateContext(IContextActivation activation)
     Activates a context on the workbench.
final  voiddeactivateContext(IContextActivation activation)
     Removes an activation for a context on the workbench.
final  ShellgetActiveShell()
     Returns the currently active shell.
final public  intgetShellType(Shell shell)
     Returns the shell type for the given shell.
Parameters:
  shell - The shell for which the type should be determined.
final public  booleanregisterShell(Shell shell, int type)
    

Registers a shell to automatically promote or demote some basic types of contexts.

final protected  voidsourceChanged(int sourcePriority)
     Carries out the actual source change notification.
final public  booleanunregisterShell(Shell shell)
    

Unregisters a shell that was previously registered.

final protected  voidupdateEvaluationContext(String name, Object value)
     Updates this authority's evaluation context.
final  voidupdateShellKludge()
    

Bug 95792.


Field Detail
DEFER_EVENTS
final public static String DEFER_EVENTS(Code)



SEND_EVENTS
final public static String SEND_EVENTS(Code)




Constructor Detail
ContextAuthority
ContextAuthority(ContextManager contextManager, IContextService contextService)(Code)
Constructs a new instance of ContextAuthority.
Parameters:
  contextManager - The context manager from which contexts can be retrieved (toupdate their active state); must not be null.
Parameters:
  contextService - The workbench context service for which this authority isacting. This allows the authority to manage shell-specificcontexts. This value must not be null.




Method Detail
activateContext
final void activateContext(IContextActivation activation)(Code)
Activates a context on the workbench. This will add it to a master list.
Parameters:
  activation - The activation; must not be null.



deactivateContext
final void deactivateContext(IContextActivation activation)(Code)
Removes an activation for a context on the workbench. This will remove it from the master list, and update the appropriate context, if necessary.
Parameters:
  activation - The activation; must not be null.



getActiveShell
final Shell getActiveShell()(Code)
Returns the currently active shell. The currently active shell; may be null.



getShellType
final public int getShellType(Shell shell)(Code)
Returns the shell type for the given shell.
Parameters:
  shell - The shell for which the type should be determined. If thisvalue is null, thenIWorkbenchContextSupport.TYPE_NONE is returned. IWorkbenchContextSupport.TYPE_WINDOW,IWorkbenchContextSupport.TYPE_DIALOG, orIWorkbenchContextSupport.TYPE_NONE.



registerShell
final public boolean registerShell(Shell shell, int type)(Code)

Registers a shell to automatically promote or demote some basic types of contexts. The "In Dialogs" and "In Windows" contexts are provided by the system. This a convenience method to ensure that these contexts are promoted when the given is shell is active.

If a shell is registered as a window, then the "In Windows" context is enabled when that shell is active. If a shell is registered as a dialog -- or is not registered, but has a parent shell -- then the "In Dialogs" context is enabled when that shell is active. If the shell is registered as none -- or is not registered, but has no parent shell -- then the neither of the contexts will be enabled (by us -- someone else can always enabled them).

If the provided shell has already been registered, then this method will change the registration.


Parameters:
  shell - The shell to register for key bindings; must not benull.
Parameters:
  type - The type of shell being registered. This value must be one ofthe constants given in this interface. true if the shell had already been registered(i.e., the registration has changed); falseotherwise.



sourceChanged
final protected void sourceChanged(int sourcePriority)(Code)
Carries out the actual source change notification. It assumed that by the time this method is called, context is up-to-date with the current state of the application.
Parameters:
  sourcePriority - A bit mask of all the source priorities that have changed.



unregisterShell
final public boolean unregisterShell(Shell shell)(Code)

Unregisters a shell that was previously registered. After this method completes, the shell will be treated as if it had never been registered at all. If you have registered a shell, you should ensure that this method is called when the shell is disposed. Otherwise, a potential memory leak will exist.

If the shell was never registered, or if the shell is null, then this method returns false and does nothing.
Parameters:
  shell - The shell to be unregistered; does nothing if this value isnull. true if the shell had been registered;false otherwise.




updateEvaluationContext
final protected void updateEvaluationContext(String name, Object value)(Code)
Updates this authority's evaluation context. If the changed variable is the ISources.ACTIVE_SHELL_NAME variable, then this also triggers an update of the shell-specific contexts. For example, if a dialog becomes active, then the dialog context will be activated by this method.
Parameters:
  name - The name of the variable to update; must not benull.
Parameters:
  value - The new value of the variable. If this value isnull, then the variable is removed.



updateShellKludge
final void updateShellKludge()(Code)

Bug 95792. A mechanism by which the key binding architecture can force an update of the contexts (based on the active shell) before trying to execute a command. This mechanism is required for GTK+ only.

DO NOT CALL THIS METHOD.




Methods inherited from org.eclipse.ui.internal.services.ExpressionAuthority
final public void addSourceProvider(ISourceProvider provider)(Code)(Java Doc)
final protected void changeVariable(String name, Object value)(Code)(Java Doc)
public void dispose()(Code)(Java Doc)
final protected boolean evaluate(Collection collection)(Code)(Java Doc)
final protected boolean evaluate(IEvaluationResultCache expression)(Code)(Java Doc)
final public IEvaluationContext getCurrentState()(Code)(Java Doc)
final protected Object getVariable(String name)(Code)(Java Doc)
final public void removeSourceProvider(ISourceProvider provider)(Code)(Java Doc)
abstract protected void sourceChanged(int sourcePriority)(Code)(Java Doc)
protected void sourceChanged(String[] sourceNames)(Code)(Java Doc)
final public void sourceChanged(int sourcePriority, Map sourceValuesByName)(Code)(Java Doc)
final public void sourceChanged(int sourcePriority, String sourceName, Object sourceValue)(Code)(Java Doc)
final protected void updateCurrentState()(Code)(Java Doc)
protected void updateEvaluationContext(String name, Object value)(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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