|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ltk.ui.refactoring.TextStatusContextViewer
An abstract base implementation of a status context viewer that presents textual context information.
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 Summary | |
---|---|
TextStatusContextViewer()
|
Method Summary | |
---|---|
void |
createControl(Composite parent)
Creates the status viewer's widget hierarchy. This method is only called once. Method getControl() should
be used to retrieve the 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ltk.ui.refactoring.IStatusContextViewer |
---|
setInput |
Constructor Detail |
public TextStatusContextViewer()
Method Detail |
protected 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
parent
protected 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 IStatusContextViewer
parent
- the parent for the widget hierarchyIStatusContextViewer.getControl()
public Control getControl()
getControl
in interface IStatusContextViewer
null
is the widget hierarchy hasn't been created yet
|
Eclipse Platform Release 3.1 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2000, 2005. All rights reserved.