|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
com.ibm.lpex.alef.LpexAbstractTextEditor
com.ibm.lpex.alef.LpexStatusTextEditor
com.ibm.lpex.alef.LpexAbstractDecoratedTextEditor
A line oriented, LPEX-based abstract base implementation of an extended text editor.
An intermediate editor comprising functionality not present in the leaner
LpexAbstractTextEditor
, but which may be used in heavy weight
(and especially source editing) editors, such as overview ruler, etc.
Field Summary | |
---|---|
protected IAnnotationAccess |
fAnnotationAccess
Helper for accessing annotation from the perspective of this editor. |
Fields inherited from class com.ibm.lpex.alef.LpexAbstractTextEditor |
---|
ACTION_MAP, DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, fErrorLabel, VERTICAL_RULER_WIDTH |
Fields inherited from interface org.eclipse.ui.IEditorPart |
---|
PROP_DIRTY, PROP_INPUT |
Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
PROP_TITLE |
Constructor Summary | |
---|---|
LpexAbstractDecoratedTextEditor()
Creates a new LPEX text editor. |
Method Summary | |
---|---|
protected void |
createActions()
Creates this editor's standard actions. |
protected IAnnotationAccess |
createAnnotationAccess()
Creates the annotation access for this editor. |
protected IVerticalRuler |
createVerticalRuler()
Override LpexAbstractTextEditor's to create the vertical ruler (an LpexVerticalRuler) used by this editor. |
void |
dispose()
Dispose this part and discard all part state. |
protected void |
disposeDocumentProvider()
Disposes of the connection with the document provider. |
Object |
getAdapter(Class adapter)
Return the object which is an instance of the given class associated with this object, or null if no such object can be found. |
protected IAnnotationAccess |
getAnnotationAccess()
Returns the annotation access. |
IDocumentProvider |
getDocumentProvider()
Returns this text editor's document provider. |
void |
gotoMarker(IMarker marker)
Deprecated. Visibility will be reduced, use getAdapter(IGotoMarker.class)
for accessing this method. |
protected void |
initializeEditor()
Initializes this editor. |
protected boolean |
isErrorStatus(IStatus status)
Returns whether the given status indicates an error. |
protected boolean |
isLineNumberRulerVisible()
This method returns false. |
protected void |
setDocumentProvider(IEditorInput input)
Hook method for setting the document provider for the given input. |
Methods inherited from class com.ibm.lpex.alef.LpexStatusTextEditor |
---|
createPartControl, createStatusControl, doRevertToSaved, doSetInput, getStatusBanner, getStatusHeader, getStatusMessage, sanityCheckState, updatePartControl, updateStatusField |
Methods inherited from class org.eclipse.ui.part.EditorPart |
---|
getEditorInput, getEditorSite, getTitleToolTip, setContentDescription, setInitializationData, setPartName |
Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
---|
addPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.eclipse.ui.IEditorPart |
---|
getEditorInput, getEditorSite |
Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
Field Detail |
protected IAnnotationAccess fAnnotationAccess
This field should not be referenced by subclasses. It is protected
for API
compatibility reasons and will be made private
soon. Use
getAnnotationAccess()
instead.
Constructor Detail |
public LpexAbstractDecoratedTextEditor()
Method Detail |
protected void initializeEditor()
The implementation of this method in LpexAbstractDecoratedTextEditor
does nothing. In Eclipse's AbstractDecoratedTextEditor it is indicated that
if subclasses do not change the contract, this method should not be
extended, i.e., do not call super.initializeEditor()
, in order
to avoid the temporary creation of objects that are immediately overwritten
by subclasses.
protected IVerticalRuler createVerticalRuler()
createVerticalRuler
in class LpexAbstractTextEditor
public void dispose()
LpexAbstractTextEditor
null
after the editor is disposed.
The AbstractTextEditor implementation of this
IWorkbenchPart
method may be extended by subclasses.
Subclasses must call super.dispose()
.
This method is called at the end of the part lifecycle: release any resources, fonts, images, etc. held by the part. The part control has already been disposed, so there is no need to dispose it here.
dispose
in interface IWorkbenchPart
dispose
in class LpexAbstractTextEditor
IWorkbenchPart.dispose()
protected IAnnotationAccess createAnnotationAccess()
protected boolean isLineNumberRulerVisible()
true
if the line numbers should be visibleprotected IAnnotationAccess getAnnotationAccess()
public void gotoMarker(IMarker marker)
getAdapter(IGotoMarker.class)
for accessing this method.
If the editor is dirty (can be saved), all the marker ranges have been changed according to the text manipulations. However, those changes are not yet propagated to the marker manager. Therefore, when opening a marker, the marker's position in the editor must be determined as it might differ from the position stated in the marker.
marker
- the marker to go toprotected boolean isErrorStatus(IStatus status)
isErrorStatus
in class LpexStatusTextEditor
status
- the status to be checked
true
if the status indicates an error, or false
otherwiseStatusTextEditor.isErrorStatus(org.eclipse.core.runtime.IStatus)
protected void createActions()
LpexAbstractTextEditor
Actions handled in here are the standard Eclipse editor actions defined in ITextEditorActionConstants (and IWorkbenchActionConstants), and some of the context menu actions.
The standard editor actions will be connected to the workbench global actions in LpexContextContributor -> BasicTextEditorActionContributor (see #doSetActiveEditor(): setGlobalActionHandler() for ITextEditorActionConstants.UNDO, REDO, CUT, COPY, PASTE, DELETE, SELECT_ALL, FIND, PRINT, REVERT; and setAction() for retargeted ITextEditorActionConstants.FIND_NEXT, FIND_PREVIOUS, FIND_INCREMENTAL, GOTO_LINE).
For LPEX's contributions to the Eclipse context, see LpexContextContributor.
Subclasses may extend.
createActions
in class LpexAbstractTextEditor
public Object getAdapter(Class adapter)
LpexAbstractTextEditor
null
if no such object can be found.
IAdaptable is an interface for an adaptable object. Adaptable objects can be dynamically extended to provide different interfaces (or "adapters"). Adapters are created by adapter factories, which are in turn managed by type by adapter managers.
getAdapter
in interface IAdaptable
getAdapter
in class LpexAbstractTextEditor
IAdaptable.getAdapter(java.lang.Class)
protected void setDocumentProvider(IEditorInput input)
LpexAbstractTextEditor
setDocumentProvider
in class LpexAbstractTextEditor
input
- the input of this editorpublic IDocumentProvider getDocumentProvider()
LpexAbstractTextEditor
getDocumentProvider
in interface ITextEditor
getDocumentProvider
in class LpexAbstractTextEditor
ITextEditor.getDocumentProvider()
protected void disposeDocumentProvider()
LpexAbstractTextEditor
disposeDocumentProvider
in class LpexAbstractTextEditor
|
SWT LPEX v3.0.5 |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |