# Context Provider Delegate

The ContextProviderDelegate allows a UI control to provide the actual help context ID and help search expression to the methods of IContextProvider, while handling references to those strings as an abstract help key (helpKey constant).

To support the abstraction from help context ID to helpKey constant, a UI control must:

- Adapt to the IContextProvider.class object as a key
- Create an instance of the ContextProviderDelegate, passing in the symbolic name of the plug-in associated with the help context
- Implement static methods of IContextProvider (getContext, getContextChangeMask, and getSearchExpression), each of which returns a corresponding method of the ContextProviderDelegate instance
- Define the help context using IWorkbench.setHelp (for example, in the createPartControl method), by passing the abstract helpKey constant string

The ContextProviderDelegate methods return the actual help context ID, change mask, or help search expression to the IContextProvider methods.

Note: The DTP help-helper handles unqualified help context IDs defined in properties files to fully-qualify them, before it returns them through ContextProviderDelegate methods.
Parent topic: DTP Help-Helper