eu.esdihumboldt.hale.ui.common.help
Class SelectionContextProvider
java.lang.Object
eu.esdihumboldt.hale.ui.common.help.SelectionContextProvider
- All Implemented Interfaces:
- org.eclipse.help.IContextProvider
- Direct Known Subclasses:
- HALEContextProvider
public abstract class SelectionContextProvider
- extends Object
- implements org.eclipse.help.IContextProvider
Context provider providing a context for the selection (if possible).
- Author:
- Simon Templer
Fields inherited from interface org.eclipse.help.IContextProvider |
NONE, SELECTION |
Constructor Summary |
SelectionContextProvider(org.eclipse.jface.viewers.ISelectionProvider selectionProvider,
String defaultContextId)
Create a context provider |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SelectionContextProvider
public SelectionContextProvider(org.eclipse.jface.viewers.ISelectionProvider selectionProvider,
String defaultContextId)
- Create a context provider
- Parameters:
selectionProvider
- the selection provider to use to retrieve the
selectiondefaultContextId
- the ID of the default context that is
supplemented with the selection contexts, may be
null
getContextChangeMask
public int getContextChangeMask()
- Specified by:
getContextChangeMask
in interface org.eclipse.help.IContextProvider
- See Also:
IContextProvider.getContextChangeMask()
getContext
public org.eclipse.help.IContext getContext(Object target)
- Specified by:
getContext
in interface org.eclipse.help.IContextProvider
- See Also:
IContextProvider.getContext(Object)
getSelectionContext
protected org.eclipse.help.IContext getSelectionContext(Object object)
- Get the context for the given selected object.
- Parameters:
object
- the selected object
- Returns:
- the associated context or
null
getContextId
protected abstract String getContextId(Object object)
- Get the context ID for the given selected object.
- Parameters:
object
- the selected object
- Returns:
- the context ID or
null
if none is available
getSearchExpression
public String getSearchExpression(Object target)
- Specified by:
getSearchExpression
in interface org.eclipse.help.IContextProvider
- See Also:
IContextProvider.getSearchExpression(Object)
Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d