|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Dynamic context provider. Classes that implement this interface should be
returned from adaptable objects when IContextProvider.class
is
used as the adapter key. Adaptable objects must implement
org.eclipse.core.runtime.IAdaptable
interface.
Dynamic context providers should be used for providing focused dynamic help that changes depending on the various platform states. State change criteria is defined by bitwise-OR of the individual state change triggers. Each time a registered trigger occurs, the class that implements this interface will be called again to provide the help context for the given target.
Context provider should be used for all visual artifacts that provide context help that handle context help trigger by handling the SWT help event instead of tagging the artifact with a static context Id.
In addition to providing static help context, this interface can also be used to control the query string that is passed to the help search system on context switches. If not provided, the query string is computed based on the current context. Providing the string explicitly gives the context owners better control over the search outcome.
IContext
,
IAdaptable
Field Summary | |
---|---|
static int |
NONE
State change trigger indicating a static context provider. |
static int |
SELECTION
State change trigger indicating that the provider should be asked for context help on each selection change. |
Method Summary | |
---|---|
IContext |
getContext(Object target)
Returns a help context for the given target. |
int |
getContextChangeMask()
Returns the mask created by combining supported change triggers using the bitwise OR operation. |
String |
getSearchExpression(Object target)
Returns a search expression that should be used to find more information about the current target. |
Field Detail |
public static final int NONE
public static final int SELECTION
Method Detail |
public int getContextChangeMask()
NONE
for a static provider.public IContext getContext(Object target)
target
- the focus of the context help
null
if
none is defined.public String getSearchExpression(Object target)
target
- the focus of the context help
null
if background search is not desired.
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.