public class StatusTextEditor extends AbstractTextEditor
AbstractTextEditor.AbstractSelectionChangedListener, AbstractTextEditor.LineStartActionITextEditorExtension3.InsertModeACTION_MAP, DEFAULT_EDITOR_CONTEXT_MENU_ID, DEFAULT_RULER_CONTEXT_MENU_ID, fErrorLabel, PREFERENCE_COLOR_BACKGROUND, PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_FIND_SCOPE, PREFERENCE_COLOR_FOREGROUND, PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_BACKGROUND, PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT, PREFERENCE_COLOR_SELECTION_FOREGROUND, PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT, PREFERENCE_FONT, PREFERENCE_HYPERLINK_KEY_MODIFIER, PREFERENCE_HYPERLINK_KEY_MODIFIER_MASK, PREFERENCE_HYPERLINKS_ENABLED, PREFERENCE_NAVIGATION_SMART_HOME_END, PREFERENCE_USE_CUSTOM_CARETS, PREFERENCE_WIDE_CARET, VERTICAL_RULER_WIDTHPROP_DIRTY, PROP_INPUTPROP_TITLEINSERT, SMART_INSERT| Constructor and Description |
|---|
StatusTextEditor() |
| Modifier and Type | Method and Description |
|---|---|
void |
createPartControl(Composite parent)
The
AbstractTextEditor implementation of this
IWorkbenchPart method creates the vertical ruler and
source viewer. |
protected Control |
createStatusControl(Composite parent,
IStatus status)
Creates the status control for the given status.
|
void |
doRevertToSaved()
The
AbstractTextEditor implementation of this
ITextEditor method may be extended by subclasses. |
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 String |
getStatusBanner(IStatus status)
Returns a banner for the given status.
|
protected String |
getStatusHeader(IStatus status)
Returns a header for the given status
|
protected String |
getStatusMessage(IStatus status)
Returns a message for the given status.
|
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 boolean |
isErrorStatus(IStatus status)
Returns whether the given status indicates an error.
|
protected void |
sanityCheckState(IEditorInput input)
Checks the state of the given editor input.
|
void |
updatePartControl(IEditorInput input)
Checks if the status of the given input is OK.
|
protected void |
updateStatusField(String category)
Updates the status fields for the given category.
|
addAction, addAction, addGroup, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, configureInsertMode, createActions, createEmptyNavigationLocation, createNavigationActions, createNavigationLocation, createSourceViewer, createUndoRedoActions, createVerticalRuler, dispose, disposeDocumentProvider, doGetSelection, doSave, doSaveAs, doSetSelection, editorContextMenuAboutToShow, editorSaved, enableOverwriteMode, enableSanityChecking, enableStateValidation, findAnnotation, firePropertyChange, getAction, getAdapter, getContextMenuListener, getCoverage, getCursorListener, getCursorPosition, getDocumentProvider, getEditorContextMenuId, getFontPropertyPreferenceKey, getHelpContextId, getHighlightRange, getInsertMode, getLegalInsertModes, getPreferenceStore, getProgressMonitor, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSelectionChangedListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getUndoRedoOperationApprover, getVerticalRuler, gotoAnnotation, handleCursorPositionChanged, handleExceptionOnSave, handleInsertModeChanged, handlePreferenceStoreChanged, init, initializeDragAndDrop, initializeViewerColors, internalInit, isChangeInformationShowing, isDirty, isEditable, isEditorInputIncludedInContextMenu, isEditorInputModifiable, isEditorInputReadOnly, isInInsertMode, isNavigationTarget, isSaveAsAllowed, isVisible, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, markInNavigationHistory, modelOffset2WidgetOffset, performRevert, performSave, performSaveAs, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, rulerContextMenuAboutToShow, safelySanityCheckState, selectAndReveal, selectAndReveal, setAction, setActionActivationCode, setCompatibilityMode, setDocumentProvider, setDocumentProvider, setEditorContextMenuId, setFocus, setHelpContextId, setHighlightRange, setInput, setInputWithNotify, setInsertMode, setKeyBindingScopes, setPreferenceStore, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, setStatusLineErrorMessage, setStatusLineMessage, showChangeInformation, showHighlightRangeOnly, showRevisionInformation, showsHighlightRangeOnly, updateContentDependentActions, updatePropertyDependentActions, updateSelectionDependentActions, updateState, updateStateDependentActions, updateStatusFields, validateEditorInputState, validateState, widgetOffset2ModelOffsetcheckSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setPartNameaddPropertyListener, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getSite, getTitle, getTitleImage, removePropertyListener, setSite, setTitle, setTitleImage, setTitleToolTip, showBusyaddListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObjectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetEditorInput, getEditorSiteaddPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListenerisSaveOnCloseNeededpublic void createPartControl(Composite parent)
AbstractTextEditorAbstractTextEditor implementation of this
IWorkbenchPart method creates the vertical ruler and
source viewer.
Subclasses may extend this method. Besides extending this method, the
behavior of createPartControl may be customized by
calling, extending or replacing the following methods:
Subclasses may supply customized implementations for some members using
the following methods before createPartControl is invoked:
createPartControl:
createPartControl:
createPartControl in interface IWorkbenchPartcreatePartControl in class AbstractTextEditorparent - the parent compositepublic void updatePartControl(IEditorInput input)
input - the input whose status is checkedprotected boolean isErrorStatus(IStatus status)
status - the status to be checkedtrue if the status indicates an error, false otherwise\protected Control createStatusControl(Composite parent, IStatus status)
parent - the parent controlstatus - the statusprotected String getStatusHeader(IStatus status)
status - the status whose message is returnedprotected String getStatusBanner(IStatus status)
status - the status whose message is returnedprotected String getStatusMessage(IStatus status)
status - the status whose message is returnedprotected void updateStatusField(String category)
AbstractTextEditorupdateStatusField in class AbstractTextEditorprotected void doSetInput(IEditorInput input) throws CoreException
AbstractTextEditorsetInput and from within a workspace
runnable from init, this method does the actual setting
of the editor input. Closes the editor if input is
null. Disconnects from any previous editor input and its
document provider and connects to the new one.
Subclasses may extend.
doSetInput in class AbstractTextEditorinput - the input to be setCoreException - if input cannot be connected to the document
providerpublic void doRevertToSaved()
AbstractTextEditorAbstractTextEditor implementation of this
ITextEditor method may be extended by subclasses.doRevertToSaved in interface ITextEditordoRevertToSaved in class AbstractTextEditorprotected void sanityCheckState(IEditorInput input)
AbstractTextEditorsanityCheckState in class AbstractTextEditorinput - the editor input whose state is to be checkedprotected void handleEditorInputChanged()
AbstractTextEditorhandleEditorInputChanged in class AbstractTextEditorprotected void handleElementContentReplaced()
AbstractTextEditorClients may extended this method.
handleElementContentReplaced in class AbstractTextEditorGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.