public abstract class TextStatusContextViewer extends Object implements IStatusContextViewer
Subclasses need to implement createSourceViewer(Composite) to create
the correct source viewer. They should use the method updateTitle(IAdaptable)
and setInput(IDocument, IRegion) to set the title text and image and to
populate the source viewer.
| Constructor and Description |
|---|
TextStatusContextViewer() |
| Modifier and Type | Method and Description |
|---|---|
void |
createControl(Composite parent)
Creates the status viewer's widget hierarchy.
|
protected abstract SourceViewer |
createSourceViewer(Composite parent)
Hook to create the source viewer used to present the textual context
information.
|
Control |
getControl()
Returns the status context viewer's SWT control.
|
protected SourceViewer |
getSourceViewer()
Returns the internal source viewer.
|
protected void |
setInput(IDocument document,
IRegion region)
Sets the input of the source viewer to the given document and reveals the
region determined by the given parameter region.
|
protected void |
updateTitle(IAdaptable element)
Updates the title image and text of the pane surrounding the source
viewer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetInputprotected SourceViewer getSourceViewer()
null if the
source viewer hasn't been created yetprotected abstract SourceViewer createSourceViewer(Composite parent)
parent - the composite to be used as the source viewer's
parentprotected void updateTitle(IAdaptable element)
IWorkbenchAdapter for the given element. If the element doen't
provide a IWorkbenchAdapter or if the element is
null the image is reseted and a default label is shown.element - the element providing the image and label for the title.
Can be null to reset the image and textprotected void setInput(IDocument document, IRegion region)
document - the document to presentregion - the region to reveal.public void createControl(Composite parent)
getControl() should
be used to retrieve the widget hierarchy.createControl in interface IStatusContextViewerparent - the parent for the widget hierarchyIStatusContextViewer.getControl()public Control getControl()
getControl in interface IStatusContextViewernull
is the widget hierarchy hasn't been created yetGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.