|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.ui.help.WorkbenchHelp
Provides methods for accessing the help support system and for hooking it in.
The help support system is optional, to allow some products to be configured
without one. The getHelpSupport
method returns the help support
system if available.
The various setHelp
methods allow help to be hooked in to SWT
menus, menu items, and controls, and into JFace actions. This involves
furnishing a help context id. When the user requests help for one of the
established widgets (for instance, by hitting F1), the context id is retrieved
and passed to the help support system using IHelp.displayHelp(helpContexts,position)
.
In cases more dynamic situations, clients may hook their own help listner then
call displayHelp
with a context id or IContext
.
This class provides static methods only; it is not intended to be instantiated or subclassed.
IHelp
,
getHelpSupport()
Method Summary | |
static void |
displayHelp(IContext context)
Calls the help support system to display the given help context. |
static void |
displayHelp(String contextId)
Calls the help support system to display the given help context id. |
static Object |
getHelp(Control control)
Deprecated. as context computers are no longer supported |
static Object |
getHelp(Menu menu)
Deprecated. as context computers are no longer supported |
static Object |
getHelp(MenuItem menuItem)
Deprecated. as context computers are no longer supported |
static IHelp |
getHelpSupport()
Returns the help support system for the platform, if available. |
static boolean |
isContextHelpDisplayed()
Returns true if the context-sensitive help
window is currently being displayed, false if not. |
static void |
setHelp(Control control,
IContextComputer computer)
Deprecated. context computers are no longer supported, clients should implement their own help listener |
static void |
setHelp(Control control,
Object[] contexts)
Deprecated. use setHelp with single context id parameter |
static void |
setHelp(Control control,
String contextId)
Sets the given help context id on the given control. |
static void |
setHelp(IAction action,
IContextComputer computer)
Deprecated. context computers are no longer supported, clients should implement their own help listener |
static void |
setHelp(IAction action,
Object[] contexts)
Deprecated. use setHelp with a single context id parameter |
static void |
setHelp(IAction action,
String contextId)
Sets the given help context id on the given action. |
static void |
setHelp(Menu menu,
IContextComputer computer)
Deprecated. context computers are no longer supported, clients should implement their own help listener |
static void |
setHelp(MenuItem item,
IContextComputer computer)
Deprecated. context computers are no longer supported, clients should implement their own help listener |
static void |
setHelp(MenuItem item,
Object[] contexts)
Deprecated. use setHelp with single context id parameter |
static void |
setHelp(MenuItem item,
String contextId)
Sets the given help context id on the given menu item. |
static void |
setHelp(Menu menu,
Object[] contexts)
Deprecated. use setHelp with single context id parameter |
static void |
setHelp(Menu menu,
String contextId)
Sets the given help context id on the given menu. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void displayHelp(String contextId)
May only be called from a UI thread.
contextId
- the id of the context to displaypublic static void displayHelp(IContext context)
May only be called from a UI thread.
context
- the context to displaypublic static Object getHelp(Control control)
Instances of IContextComputer
may use this method
to obtain the prevviously registered help contexts of a control.
control
- the control on which the contexts are registered
String
) and/or help contexts (type
IContext
) or an IContextComputer
or
null
if no contexts have been set.public static Object getHelp(Menu menu)
Instances of IContextComputer
may use this method
to obtain the prevviously registered help contexts of a menu.
menu
- the menu on which the contexts are registered
String
) and/or help contexts (type
IContext
) or an IContextComputer
or
null
if no contexts have been set.public static Object getHelp(MenuItem menuItem)
Instances of IContextComputer
may use this method
to obtain the prevviously registered help contexts of a menu.
menuItem
- the menu item on which the contexts are registered
String
) and/or help contexts (type
IContext
) or an IContextComputer
or
null
if no contexts have been set.public static IHelp getHelpSupport()
null
if nonepublic static boolean isContextHelpDisplayed()
true
if the context-sensitive help
window is currently being displayed, false
if not.
This avoid activating the help support if it is not already activated.
public static void setHelp(IAction action, Object[] contexts)
Use this method when the list of help contexts is known in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
action
- the action on which to register the computercontexts
- the contexts to use when F1 help is invoked; a mixed-type
array of context ids (type String
) and/or help contexts (type
IContext
)public static void setHelp(IAction action, IContextComputer computer)
Use this method when the help contexts cannot be computed in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
action
- the action on which to register the computercomputer
- the computer to determine the help contexts for the control
when F1 help is invokedpublic static void setHelp(Control control, Object[] contexts)
Use this method when the list of help contexts is known in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
control
- the control on which to register the contextscontexts
- the contexts to use when F1 help is invoked; a mixed-type
array of context ids (type String
) and/or help contexts (type
IContext
)public static void setHelp(Control control, IContextComputer computer)
Use this method when the help contexts cannot be computed in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
control
- the control on which to register the computercomputer
- the computer to determine the help contexts for the control
when F1 help is invokedpublic static void setHelp(Menu menu, Object[] contexts)
Use this method when the list of help contexts is known in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
menu
- the menu on which to register the contextcontexts
- the contexts to use when F1 help is invoked; a mixed-type
array of context ids (type String
) and/or help contexts (type
IContext
)public static void setHelp(Menu menu, IContextComputer computer)
Use this method when the help contexts cannot be computed in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
menu
- the menu on which to register the computercomputer
- the computer to determine the help contexts for the control
when F1 help is invokedpublic static void setHelp(MenuItem item, Object[] contexts)
Use this method when the list of help contexts is known in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
item
- the menu item on which to register the contextcontexts
- the contexts to use when F1 help is invoked; a mixed-type
array of context ids (type String
) and/or help contexts (type
IContext
)public static void setHelp(MenuItem item, IContextComputer computer)
Use this method when the help contexts cannot be computed in advance. Help contexts can either supplied as a static list, or calculated with a context computer (but not both).
item
- the menu item on which to register the computercomputer
- the computer to determine the help contexts for the control
when F1 help is invokedpublic static void setHelp(IAction action, String contextId)
action
- the action on which to register the context idcontextId
- the context id to use when F1 help is invokedpublic static void setHelp(Control control, String contextId)
control
- the control on which to register the context idcontextId
- the context id to use when F1 help is invokedpublic static void setHelp(Menu menu, String contextId)
menu
- the menu on which to register the context idcontextId
- the context id to use when F1 help is invokedpublic static void setHelp(MenuItem item, String contextId)
item
- the menu item on which to register the context idcontextId
- the context id to use when F1 help is invoked
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |