Interface IDebugContextProvider
- All Known Subinterfaces:
IDebugContextProvider2
- All Known Implementing Classes:
AbstractDebugContextProvider
A context provider can provide context information for a specific workbench part. There can only be one context provider registered per part with a context service. When there is more than one context provider per window, the context provider associated with the most recently active part provides the context for that window.
A context provider does not have to be associated with a part. In this case the provider
specifies null
for its part, and provides context information for the window.
There can only be one context provider without an associated part registered per context
service (i.e. per window). A context provider that provides context without an associated
part is only active (i.e. used to provide context information) when there are no other
context providers with associated parts registered with that service.
Clients may implement this interface.
- Since:
- 3.3
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDebugContextListener
(IDebugContextListener listener) Registers the given listener for debug context events.Returns the currently active context, possibly empty ornull
.getPart()
Returns the part associated with this context provider ornull
if none.void
Unregisters the given listener for debug context events.
-
Method Details
-
getPart
IWorkbenchPart getPart()Returns the part associated with this context provider ornull
if none.- Returns:
- part associated with this context provider or
null
-
addDebugContextListener
Registers the given listener for debug context events.- Parameters:
listener
- event listener
-
removeDebugContextListener
Unregisters the given listener for debug context events.- Parameters:
listener
- event listener
-
getActiveContext
ISelection getActiveContext()Returns the currently active context, possibly empty ornull
.- Returns:
- active context, possibly empty or
null
.
-