public interface IInformationProvider
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 creatorClients may implement this interface.
IInformationProviderExtension
,
IInformationProviderExtension2
,
IInformationPresenter
,
ITextViewer
Modifier and Type | Method and Description |
---|---|
String |
getInformation(ITextViewer textViewer,
IRegion subject)
Deprecated.
As of 2.1, replaced by
IInformationProviderExtension.getInformation2(ITextViewer, IRegion) |
IRegion |
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.
|
IRegion getSubject(ITextViewer textViewer, int offset)
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.
textViewer
- the text viewer in which information has been requestedoffset
- the offset at which information has been requestedString getInformation(ITextViewer textViewer, IRegion subject)
IInformationProviderExtension.getInformation2(ITextViewer, IRegion)
null
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.textViewer
- the viewer in whose document the subject is containedsubject
- the text region constituting the information subjectIInformationPresenter
Copyright (c) 2000, 2015 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.