Method Summary |
|
final protected void | addAction(IMenuManager menu, String actionId) Convenience method to add the action installed under the given action id to the given menu. |
final protected void | addAction(IMenuManager menu, String group, String actionId) Convenience method to add the action installed under the given action id to the specified group of the menu. |
final protected void | addGroup(IMenuManager menu, String existingGroup, String newGroup) Convenience method to add a new group after the specified group. |
public void | addRulerContextMenuListener(IMenuListener listener) |
protected void | adjustHighlightRange(int offset, int length) Adjusts the highlight range so that at least the specified range
is highlighted. |
protected boolean | affectsTextPresentation(PropertyChangeEvent event) Determines whether the given preference change affects the editor's
presentation. |
protected boolean | canHandleMove(IEditorInput originalElement, IEditorInput movedElement) Returns whether this editor can handle the move of the original element
so that it ends up being the moved element. |
public void | close(boolean save) |
protected void | configureInsertMode(InsertMode mode, boolean legal) Configures the given insert mode as legal or illegal. |
protected boolean | containsSavedState(IMemento memento) |
protected void | createActions() Creates this editor's standard actions and connects them with the global
workbench actions. |
protected IColumnSupport | createColumnSupport() Creates the column support to be used by this editor to manage the
contributed ruler columns.
Subclasses may re-implement this method using the
ColumnSupport ,
e.g. |
public INavigationLocation | createEmptyNavigationLocation() |
protected void | createNavigationActions() Creates action entries for all SWT StyledText actions as defined in
org.eclipse.swt.custom.ST . |
public INavigationLocation | createNavigationLocation() |
public void | createPartControl(Composite parent) The AbstractTextEditor implementation of this
IWorkbenchPart method creates the vertical ruler and
source viewer.
Subclasses may extend this method. |
protected ISourceViewer | createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) Creates the source viewer to be used by this editor. |
protected void | createUndoRedoActions() Creates this editor's undo/redo actions. |
protected IVerticalRuler | createVerticalRuler() Creates the vertical ruler to be used by this editor. |
public void | dispose() The AbstractTextEditor implementation of this
IWorkbenchPart method may be extended by subclasses. |
protected void | disposeDocumentProvider() Disposes of the connection with the document provider. |
protected ISelection | doGetSelection() Returns the current selection. |
protected void | doRestoreState(IMemento memento) Restores this editor's state using the given memento. |
public void | doRevertToSaved() The AbstractTextEditor implementation of this
ITextEditor method may be extended by subclasses. |
public void | doSave(IProgressMonitor progressMonitor) The AbstractTextEditor implementation of this
IEditorPart method may be extended by subclasses. |
public void | doSaveAs() The AbstractTextEditor implementation of this
IEditorPart method calls performSaveAs . |
protected void | doSetInput(IEditorInput input) Called directly from setInput and from within a workspace
runnable from init , this method does the actual setting
of the editor input. |
protected void | doSetSelection(ISelection selection) Sets the given selection. |
protected void | editorContextMenuAboutToShow(IMenuManager menu) Sets up this editor's context menu before it is made visible. |
protected void | editorSaved() Hook which gets called when the editor has been saved. |
protected void | enableOverwriteMode(boolean enable) Sets the overwrite mode enablement. |
protected void | enableSanityChecking(boolean enable) Enables/disables sanity checking. |
protected void | enableStateValidation(boolean enable) Enables/disables state validation. |
protected Annotation | findAnnotation(int offset, int length, boolean forward, Position annotationPosition) Returns the annotation closest to the given range respecting the given
direction. |
protected void | firePropertyChange(int property) |
public IAction | getAction(String actionID) |
public Saveable[] | getActiveSaveables() |
public Object | getAdapter(Class required) |
final protected IMenuListener | getContextMenuListener() Creates and returns the listener on this editor's context menus. |
final protected static IRegion | getCoverage(ISourceViewer viewer) Returns the minimal region of the given source viewer's document that completely
comprises everything that is visible in the viewer's widget. |
final protected ICursorListener | getCursorListener() Returns this editor's "cursor" listener to be installed on the editor's
source viewer. |
protected String | getCursorPosition() Returns a description of the cursor position. |
public IDocumentProvider | getDocumentProvider() |
final protected String | getEditorContextMenuId() Returns the editor's context menu id. |
final protected String | getFontPropertyPreferenceKey() Returns the property preference key for the editor font. |
final protected String | getHelpContextId() Returns the editor's help context id or null if none has
been set. |
public IRegion | getHighlightRange() |
public InsertMode | getInsertMode() |
protected List | getLegalInsertModes() Returns the set of legal insert modes. |
final protected IPreferenceStore | getPreferenceStore() Returns this editor's preference store or null if none has
been set. |
protected IProgressMonitor | getProgressMonitor() Returns the progress monitor related to this editor. |
final protected Annotation | getRangeIndicator() Returns the editor's range indicator. |
final protected String | getRulerContextMenuId() Returns the ruler's context menu id. |
final protected MouseListener | getRulerMouseListener() Creates and returns the listener on this editor's vertical ruler. |
public Saveable[] | getSaveables() |
final protected ISelectionChangedListener | getSelectionChangedListener() Returns this editor's selection changed listener to be installed
on the editor's source viewer. |
public ISelectionProvider | getSelectionProvider()
Returns null after disposal. |
final protected ISourceViewer | getSourceViewer() Returns the editor's source viewer. |
final protected SourceViewerConfiguration | getSourceViewerConfiguration() Returns the editor's source viewer configuration. |
protected IStatusField | getStatusField(String category) Returns the current status field for the given status category. |
protected IStatusLineManager | getStatusLineManager() Returns the status line manager of this editor. |
protected IOperationApprover | getUndoRedoOperationApprover(IUndoContext undoContext) Return an
IOperationApprover appropriate for approving the undo and
redo of operations that have the specified undo context. |
final protected IVerticalRuler | getVerticalRuler() Returns the editor's vertical ruler. |
public Annotation | gotoAnnotation(boolean forward) Jumps to the next annotation according to the given direction. |
protected void | handleCursorPositionChanged() Handles a potential change of the cursor position. |
protected void | handleEditorInputChanged() Handles an external change of the editor's input element. |
protected void | handleElementContentReplaced() Performs any additional action necessary to perform after the input
document's content has been replaced. |
protected void | handleExceptionOnSave(CoreException exception, IProgressMonitor progressMonitor) Handles the given exception. |
protected void | handleInsertModeChanged() Handles a change of the editor's insert mode. |
protected void | handlePreferenceStoreChanged(PropertyChangeEvent event) Handles a property change event describing a change of the editor's
preference store and updates the preference related editor properties. |
public void | init(IEditorSite site, IEditorInput input) |
protected void | initializeDragAndDrop(ISourceViewer viewer) Initializes the drag and drop support for the given viewer based on
provided editor adapter for drop target listeners. |
protected void | initializeViewerColors(ISourceViewer viewer) Initializes the fore- and background colors of the given viewer for both
normal and selected text. |
protected void | installTabsToSpacesConverter() Installs a tabs to spaces converter. |
protected void | installTextDragAndDrop(ISourceViewer viewer) Installs text drag and drop on the given source viewer. |
final protected void | internalInit(IWorkbenchWindow window, IEditorSite site, IEditorInput input) Implements the init method of IEditorPart . |
public boolean | isChangeInformationShowing() |
public boolean | isDirty() |
public boolean | isEditable() |
protected boolean | isEditorInputIncludedInContextMenu() Tells whether the editor input should be included when adding object
contributions to this editor's context menu. |
public boolean | isEditorInputModifiable() |
public boolean | isEditorInputReadOnly() |
protected boolean | isInInsertMode() Returns whether this editor is in overwrite or insert mode. |
protected boolean | isNavigationTarget(Annotation annotation) Returns whether the given annotation is configured as a target for the
"Go to Next/Previous Annotation" actions. |
public boolean | isSaveAsAllowed() The AbstractTextEditor implementation of this
IEditorPart method returns false . |
protected boolean | isTabsToSpacesConversionEnabled() Tells whether tabs should be converted to
spaces while editing inside this editor. |
final protected static boolean | isVisible(ISourceViewer viewer, int offset, int length) Tells whether the given region is visible in the given source viewer. |
public void | markAsContentDependentAction(String actionId, boolean mark) Marks or unmarks the given action to be updated on content changes. |
public void | markAsPropertyDependentAction(String actionId, boolean mark) Marks or unmarks the given action to be updated on property changes. |
public void | markAsSelectionDependentAction(String actionId, boolean mark) Marks or unmarks the given action to be updated on text selection changes. |
public void | markAsStateDependentAction(String actionId, boolean mark) Marks or unmarks the given action to be updated on state changes. |
protected void | markInNavigationHistory() Writes a check mark of the given situation into the navigation history. |
final protected static int | modelOffset2WidgetOffset(ISourceViewer viewer, int modelOffset) Returns the offset of the given source viewer's text widget that corresponds
to the given model offset or -1 if there is no such offset. |
protected void | openSaveErrorDialog(String title, String message, CoreException exception) Presents an error dialog to the user when a problem
happens during save. |
protected void | performRevert() Performs revert and handles errors appropriately. |
protected void | performSave(boolean overwrite, IProgressMonitor progressMonitor) Performs the save and handles errors appropriately. |
protected void | performSaveAs(IProgressMonitor progressMonitor) Performs a save as and reports the result state back to the
given progress monitor. |
protected void | rememberSelection() Remembers the current selection of this editor. |
public void | removeActionActivationCode(String actionID) |
public void | removeRulerContextMenuListener(IMenuListener listener) |
public void | resetHighlightRange() |
protected void | restoreSelection() Restores a selection previously remembered by rememberSelection .
Subclasses may reimplement this method and thereby semantically adapt the
remembered selection. |
public void | restoreState(IMemento memento) |
protected void | rulerContextMenuAboutToShow(IMenuManager menu) Sets up the ruler context menu before it is made visible. |
protected void | safelySanityCheckState(IEditorInput input) Checks the state of the given editor input if sanity checking is enabled. |
protected void | sanityCheckState(IEditorInput input) Checks the state of the given editor input. |
public void | saveState(IMemento memento) |
public void | selectAndReveal(int start, int length) |
protected void | selectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength) Selects and reveals the specified ranges in this text editor. |
public void | setAction(String actionID, IAction action) |
public void | setActionActivationCode(String actionID, char activationCharacter, int activationKeyCode, int activationStateMask) |
final protected void | setCompatibilityMode(boolean compatible) Sets the context menu registration 1.0 compatibility mode. |
protected void | setDocumentProvider(IDocumentProvider provider) Sets this editor's document provider. |
protected void | setDocumentProvider(IEditorInput input) Hook method for setting the document provider for the given input.
This default implementation does nothing. |
protected void | setEditorContextMenuId(String contextMenuId) Sets this editor's context menu id. |
public void | setFocus() |
protected void | setHelpContextId(String helpContextId) Sets the editor's help context id. |
public void | setHighlightRange(int offset, int length, boolean moveCursor) |
final public void | setInput(IEditorInput input) |
final protected void | setInputWithNotify(IEditorInput input) |
public void | setInsertMode(InsertMode newMode) |
protected void | setKeyBindingScopes(String[] scopes) Sets the key binding scopes for this editor. |
protected void | setPreferenceStore(IPreferenceStore store) Sets this editor's preference store. |
protected void | setRangeIndicator(Annotation rangeIndicator) Sets the annotation which this editor uses to represent the highlight
range if the editor is configured to show the entire document. |
protected void | setRulerContextMenuId(String contextMenuId) Sets the ruler's context menu id. |
protected void | setSourceViewerConfiguration(SourceViewerConfiguration configuration) Sets this editor's source viewer configuration used to configure its
internal source viewer. |
public void | setStatusField(IStatusField field, String category) |
protected void | setStatusLineErrorMessage(String message) Sets the given message as error message to this editor's status line. |
protected void | setStatusLineMessage(String message) Sets the given message as message to this editor's status line. |
public void | showChangeInformation(boolean show) |
public void | showHighlightRangeOnly(boolean showHighlightRangeOnly) |
public void | showRevisionInformation(RevisionInformation info, String quickDiffProviderId) |
public boolean | showsHighlightRangeOnly() |
protected void | uninstallTabsToSpacesConverter() Installs a tabs to spaces converter. |
protected void | uninstallTextDragAndDrop(ISourceViewer viewer) Uninstalls text drag and drop from the given source viewer. |
protected void | updateContentDependentActions() Updates all content dependent actions. |
protected void | updateContributedRulerColumns(CompositeRuler ruler) Adds enabled ruler contributions to the vertical ruler. |
final protected void | updateIndentPrefixes() Updates the source viewer's indent prefixes with
the values provided by the source viewer configuration. |
protected void | updatePropertyDependentActions() Updates all property dependent actions. |
protected void | updateSelectionDependentActions() Updates all selection dependent actions. |
protected void | updateState(IEditorInput input) Updates the state of the given editor input such as read-only flag. |
protected void | updateStateDependentActions() Updates all state dependent actions. |
protected void | updateStatusField(String category) Updates the status fields for the given category. |
protected void | updateStatusFields() Updates all status fields. |
public boolean | validateEditorInputState() |
protected void | validateState(IEditorInput input) Validates the state of the given editor input. |
final protected static int | widgetOffset2ModelOffset(ISourceViewer viewer, int widgetOffset) Returns the offset of the given source viewer's document that corresponds
to the given widget offset or -1 if there is no such offset. |