Interface IInformationProvider
public interface IInformationProvider
Provides information related to the content of a text viewer.
In order to provide backward compatibility for clients of IInformationProvider
,
extension interfaces are used to provide a means of evolution. The following extension interfaces
exist:
IInformationProviderExtension
since version 2.1 introducing the ability to provide the element for a given subjectIInformationProviderExtension2
since version 3.0 introducing the ability to provide its own information control creator
Clients may implement this interface.
- Since:
- 2.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetInformation
(ITextViewer textViewer, IRegion subject) Deprecated.getSubject
(ITextViewer textViewer, int offset) Returns the region of the text viewer's document close to the given offset that contains a subject about which information can be provided.
-
Method Details
-
getSubject
Returns the region of the text viewer's document close to the given offset that contains a subject about which information can be provided.For example, if information can be provided on a per code block basis, the offset should be used to find the enclosing code block and the source range of the block should be returned.
- Parameters:
textViewer
- the text viewer in which information has been requestedoffset
- the offset at which information has been requested- Returns:
- the region of the text viewer's document containing the information subject
-
getInformation
Deprecated.As of 2.1, replaced byIInformationProviderExtension.getInformation2(ITextViewer, IRegion)
Returns the information about the given subject ornull
if no information is available. It depends on the concrete configuration in which format the information is to be provided. For example, information presented in an information control displaying HTML, should be provided in HTML.- Parameters:
textViewer
- the viewer in whose document the subject is containedsubject
- the text region constituting the information subject- Returns:
- the information about the subject
- See Also:
-
IInformationProviderExtension.getInformation2(ITextViewer, IRegion)