Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD


 

com.ibm.lpex.alef
Class LpexAbstractDecoratedTextEditor

java.lang.Object
  extended byorg.eclipse.ui.part.WorkbenchPart
      extended byorg.eclipse.ui.part.EditorPart
          extended bycom.ibm.lpex.alef.LpexAbstractTextEditor
              extended bycom.ibm.lpex.alef.LpexStatusTextEditor
                  extended bycom.ibm.lpex.alef.LpexAbstractDecoratedTextEditor

All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ui.IEditorPart, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IReusableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.texteditor.ITextEditor, org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2

Direct Known Subclasses:
LpexTextEditor


public abstract class LpexAbstractDecoratedTextEditor
extends LpexStatusTextEditor

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  org.eclipse.jface.text.source.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  org.eclipse.jface.text.source.IAnnotationAccess createAnnotationAccess()
          Creates the annotation access for this editor.
protected  org.eclipse.jface.text.source.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 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  org.eclipse.jface.text.source.IAnnotationAccess getAnnotationAccess()
          Returns the annotation access.
 org.eclipse.ui.texteditor.IDocumentProvider getDocumentProvider()
          Returns this text editor's document provider.
 void gotoMarker(org.eclipse.core.resources.IMarker marker)
          Deprecated. Visibility will be reduced, use getAdapter(IGotoMarker.class) for accessing this method.
protected  void initializeEditor()
          Initializes this editor.
protected  boolean isErrorStatus(org.eclipse.core.runtime.IStatus status)
          Returns whether the given status indicates an error.
protected  boolean isLineNumberRulerVisible()
          This method returns false.
protected  void setDocumentProvider(org.eclipse.ui.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 com.ibm.lpex.alef.LpexAbstractTextEditor
addAction, addAction, addGroup, addLines, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, createEmptyNavigationLocation, createNavigationActions, createNavigationLocation, createSourceViewer, createViewPreferenceNodes, createViewPreferencePage, doSave, doSaveAs, editorContextMenuAboutToShow, editorSaved, enableSanityChecking, enableStateValidation, firePropertyChange, getAction, getContextMenuListener, getCoverage, getCursorPosition, getEditorContextMenuId, getEOL, getFirstLpexView, getFirstLpexWindow, getHelpContextId, getHighlightRange, getInputResource, getKeyBindingScopes, getLpexView, getLpexWindow, getPreferenceStore, getProgressMonitor, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getVerticalRuler, handleDelegate, handleEditorInputChanged, handleElementContentReplaced, handleExceptionOnSave, handlePreferenceStoreChanged, init, initializeLpexView, internalInit, isChangeInformationShowing, isDirty, isEditable, isEditorInputModifiable, isEditorInputReadOnly, isSaveAsAllowed, isSaveOnCloseNeeded, isVisible, markAsPropertyDependentAction, markInNavigationHistory, modelOffset2WidgetOffset, performRevert, performSave, performSaveAs, performSaveAs, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, rulerContextMenuAboutToShow, safelySanityCheckState, selectAndReveal, setAction, setActionActivationCode, setCompatibilityMode, setDocumentProvider, setDocumentSection, setEditorContextMenuId, setFocus, setHelpContextId, setHighlightRange, setInput, setKeyBindingScopes, setKeyBindingScopes, setLanguageHelp, setPreferenceStore, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, showChangeInformation, showHighlightRangeOnly, showsHighlightRangeOnly, updateProfile, updateProfile, updatePropertyDependentActions, updateState, updateStatusFields, validateState, widgetContentsSet, widgetOffset2ModelOffset
 
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

 

 

fAnnotationAccess

protected org.eclipse.jface.text.source.IAnnotationAccess fAnnotationAccess

Helper for accessing annotation from the perspective of this editor.

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

 

 

LpexAbstractDecoratedTextEditor

public LpexAbstractDecoratedTextEditor()

Creates a new LPEX text editor.

Method Detail

 

 

initializeEditor

protected void initializeEditor()

Initializes this editor. Subclasses may reimplement.

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.


 

 

createVerticalRuler

protected org.eclipse.jface.text.source.IVerticalRuler createVerticalRuler()

Override LpexAbstractTextEditor's to create the vertical ruler (an LpexVerticalRuler) used by this editor.

Overrides:
createVerticalRuler in class LpexAbstractTextEditor

Returns:
the vertical ruler


 

 

dispose

public void dispose()

Description copied from class: LpexAbstractTextEditor
Dispose this part and discard all part state. From this point on, the part will not be referenced within the workbench.

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.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class LpexAbstractTextEditor

See Also:
IWorkbenchPart.dispose()


 

 

createAnnotationAccess

protected org.eclipse.jface.text.source.IAnnotationAccess createAnnotationAccess()

Creates the annotation access for this editor.

Returns:
the created annotation access


 

 

isLineNumberRulerVisible

protected boolean isLineNumberRulerVisible()

This method returns false. LPEX has its own prefix area to display line or sequence numbers. AbstractDecoratedTextEditor: this method returns whether the line number ruler column should be visible according to the preference store settings; subclasses may override this method to provide a custom preference setting.

Returns:
true if the line numbers should be visible


 

 

getAnnotationAccess

protected org.eclipse.jface.text.source.IAnnotationAccess getAnnotationAccess()

Returns the annotation access.

Returns:
the annotation access


 

 

gotoMarker

public void gotoMarker(org.eclipse.core.resources.IMarker marker)

Deprecated. Visibility will be reduced, use getAdapter(IGotoMarker.class) for accessing this method.

Set the cursor in the first view of the editor to the specified marker, and emphasize accordingly.

If the editor can be saved, all marker ranges have been changed according to the text manipulations. However, those changes are not yet propagated to the marker manager. Thus, 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.

Parameters:
marker - the marker to go to


 

 

isErrorStatus

protected boolean isErrorStatus(org.eclipse.core.runtime.IStatus status)

Returns whether the given status indicates an error. Subclasses may override.

Overrides:
isErrorStatus in class LpexStatusTextEditor

Parameters:
status - the status to be checked
Returns:
true if the status indicates an error, or
false otherwise
See Also:
StatusTextEditor.isErrorStatus(org.eclipse.core.runtime.IStatus)


 

 

createActions

protected void createActions()

Description copied from class: LpexAbstractTextEditor
Creates this editor's standard actions.

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 this method.

Overrides:
createActions in class LpexAbstractTextEditor


 

 

getAdapter

public Object getAdapter(Class adapter)

Description copied from class: LpexAbstractTextEditor
Return the object which is an instance of the given class associated with this object, or 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.

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class LpexAbstractTextEditor

See Also:
IAdaptable.getAdapter(java.lang.Class)


 

 

setDocumentProvider

protected void setDocumentProvider(org.eclipse.ui.IEditorInput input)

Description copied from class: LpexAbstractTextEditor
Hook method for setting the document provider for the given input. Called while updating the document provider for the new editor input. This default implementation does nothing. Clients may reimplement: this is the method in which you can configure the appropriate implicit document provider for the given editor input.

Overrides:
setDocumentProvider in class LpexAbstractTextEditor

Parameters:
input - the input of this editor


 

 

getDocumentProvider

public org.eclipse.ui.texteditor.IDocumentProvider getDocumentProvider()

Description copied from class: LpexAbstractTextEditor
Returns this text editor's document provider.

Specified by:
getDocumentProvider in interface org.eclipse.ui.texteditor.ITextEditor
Overrides:
getDocumentProvider in class LpexAbstractTextEditor

See Also:
ITextEditor.getDocumentProvider()


 

 

disposeDocumentProvider

protected void disposeDocumentProvider()

Description copied from class: LpexAbstractTextEditor
Disposes the connection with the document provider. Subclasses may extend.

Overrides:
disposeDocumentProvider in class LpexAbstractTextEditor


 

Overview

 
Package  Use  Tree  Serialized  Deprecated  Index  Help 
SWT LPEX
v3.0.0
 PREV CLASS   NEXT CLASS FRAMES    NO FRAMES  
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD