abstractpublic class AbstractDecoratedTextEditor extends StatusTextEditor (Code)
An intermediate editor comprising functionality not present in the leaner AbstractTextEditor,
but used in many heavy weight (and especially source editing) editors, such as line numbers,
change ruler, overview ruler, print margins, current line highlighting, etc.
since: 3.0
Field Summary
protected IAnnotationAccess
fAnnotationAccess Helper for accessing annotation from the perspective of this editor.
This field should not be referenced by subclasses.
protected boolean
fIsUpdatingMarkerViews Indicates whether this editor is updating views that show markers.
collectContextMenuPreferencePages() Returns the preference page ids of the preference pages to be shown
when executing the preferences action from the editor context menu.
collectRulerMenuPreferencePages() Returns the preference page ids of the preference pages to be shown when
executing the preferences action from the editor ruler context menu.
isLineNumberRulerVisible() Returns whether the line number ruler column should be
visible according to the preference store settings.
protected boolean
isNavigationTarget(Annotation annotation) Returns whether the given annotation is configured as a target for the
"Go to Next/Previous Annotation" actions.
performSaveAs(IProgressMonitor progressMonitor) This implementation asks the user for the workspace path of a file resource and saves the document there.
This field should not be referenced by subclasses. It is protected for API
compatibility reasons and will be made private soon. Use
AbstractTextEditor.getVerticalRuler to access the vertical bar instead.
This field should not be referenced by subclasses. It is protected for API
compatibility reasons and will be made private soon. Use
AbstractDecoratedTextEditor.getOverviewRuler() instead.
Configures the decoration support for this editor's source viewer. Subclasses may override this
method, but should call their superclass' implementation at some point.
Parameters: support - the decoration support to configure
Creates the annotation ruler column. Subclasses may re-implement or extend.
Parameters: ruler - the composite ruler that the column will be added an annotation ruler column since: 3.2
Creates and returns a LineChangeHover to be used on this editor's change
ruler column. This default implementation returns a plain LineChangeHover.
Subclasses may override.
the change hover to be used by this editors quick diff display
Returns
AbstractDecoratedTextEditor.createCompositeRuler() . Subclasses should not override this method, but
rather createCompositeRuler if they want to contribute their own vertical ruler
implementation. If not an instance of
CompositeRuler is returned, the built-in ruler
columns (line numbers, annotations) will not work.
Returns the source viewer decoration support.
Parameters: viewer - the viewer for which to return a decoration support the source viewer decoration support
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
Initializes this editor. Subclasses may re-implement. If sub-classes 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.
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.
true if the line numbers should be visible
Returns whether the overwrite mode is enabled according to the preference
store settings. Subclasses may override this method to provide a custom
preference setting.
true if overwrite mode is enabled since: 3.1
Returns whether quick diff info should be visible upon opening an editor
according to the preference store settings.
true if the line numbers should be visible
This implementation asks the user for the workspace path of a file resource and saves the document there.
Parameters: progressMonitor - the progress monitor to be used since: 3.2