|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.text.AbstractInformationControlManager | +--org.eclipse.jface.text.information.InformationPresenter
Standard implementation of IInformationPresenter
.
This implementation extends AbstractInformationControlManager
.
The information control is made visible on request by calling
showInformation
.
Usually, clients instantiate this class and configure it before using it. The configuration
must be consistent: This means the used IInformationControlCreator
must create an information control expecting information in the same format the configured
IInformationProvider
s use to encode the information they provide.
Nested Class Summary |
Nested classes inherited from class org.eclipse.jface.text.AbstractInformationControlManager |
AbstractInformationControlManager.Anchor, AbstractInformationControlManager.IInformationControlCloser |
Field Summary |
Fields inherited from class org.eclipse.jface.text.AbstractInformationControlManager |
ANCHOR_BOTTOM, ANCHOR_LEFT, ANCHOR_RIGHT, ANCHOR_TOP |
Constructor Summary | |
InformationPresenter(IInformationControlCreator creator)
Creates a new information presenter that uses the given information control creator. |
Method Summary | |
protected void |
computeInformation()
Computes the information to be displayed and the area in which the computed information is valid. |
IInformationProvider |
getInformationProvider(String contentType)
Returns the information provider to be used for the given content type. |
protected void |
handleInformationControlDisposed()
Handles the disposal of the information control. |
protected void |
hideInformationControl()
Hides the information control and stops the information control closer. |
void |
install(ITextViewer textViewer)
Installs the information presenter on the given text viewer. |
boolean |
requestWidgetToken(IWidgetTokenOwner owner)
The given widget token owner requests the widget token back from this token keeper. |
void |
setInformationProvider(IInformationProvider provider,
String contentType)
Registers a given information provider for a particular content type. |
protected void |
showInformationControl(Rectangle subjectArea)
Shows the information control and starts the information control closer. |
void |
uninstall()
Removes the information presenter from the text viewer it has previously been installed on. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.jface.text.information.IInformationPresenter |
showInformation |
Constructor Detail |
public InformationPresenter(IInformationControlCreator creator)
creator
- the information control creator to be usedMethod Detail |
public void setInformationProvider(IInformationProvider provider, String contentType)
provider
- the information provider to register, or null
to remove an existing onecontentType
- the content type under which to registerpublic IInformationProvider getInformationProvider(String contentType)
IInformationPresenter
getInformationProvider
in interface IInformationPresenter
contentType
- the type of the content for which information will be requested
null
if none exists for the specified content typeprotected void computeInformation()
AbstractInformationControlManager
setInformation
.
computeInformation
in class AbstractInformationControlManager
public void install(ITextViewer textViewer)
IInformationPresenter
showInformation
can be called until uninstall
is called.
install
in interface IInformationPresenter
textViewer
- the viewer on which the presenter is installedpublic void uninstall()
IInformationPresenter
uninstall
in interface IInformationPresenter
protected void showInformationControl(Rectangle subjectArea)
AbstractInformationControlManager
showInformationControl
in class AbstractInformationControlManager
subjectArea
- the information areaprotected void hideInformationControl()
AbstractInformationControlManager
hideInformationControl
in class AbstractInformationControlManager
protected void handleInformationControlDisposed()
AbstractInformationControlManager
handleInformationControlDisposed
in class AbstractInformationControlManager
public boolean requestWidgetToken(IWidgetTokenOwner owner)
IWidgetTokenKeeper
true
if the token is released
by this token keeper. Note, the keeper must not call
releaseWidgetToken(IWidgetTokenKeeper)
explicitly.
requestWidgetToken
in interface IWidgetTokenKeeper
owner
- the token owner
true
if token has been released false
otherwise
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |