Eclipse Platform
2.0

org.eclipse.ui.texteditor
Class StatusTextEditor

java.lang.Object
  |
  +--org.eclipse.ui.part.WorkbenchPart
        |
        +--org.eclipse.ui.part.EditorPart
              |
              +--org.eclipse.ui.texteditor.AbstractTextEditor
                    |
                    +--org.eclipse.ui.texteditor.StatusTextEditor
All Implemented Interfaces:
IAdaptable, IEditorPart, IExecutableExtension, IReusableEditor, ITextEditor, ITextEditorExtension, IWorkbenchPart
Direct Known Subclasses:
TextEditor

public class StatusTextEditor
extends AbstractTextEditor

Capable of handling input elements that have an associated status with them.

Since:
2.0

Field Summary
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
ACTION_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_FONT, 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
StatusTextEditor()
           
 
Method Summary
 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)
          Internal setInput method.
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 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.
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
addAction, addAction, addGroup, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, createActions, createNavigationActions, createSaveOperation, createSourceViewer, createVerticalRuler, dispose, doSave, doSaveAs, editorContextMenuAboutToShow, enableSanityChecking, firePropertyChange, getAction, getAdapter, getContextMenuListener, getCursorListener, getCursorPosition, getDocumentProvider, getEditorContextMenuId, getHelpContextId, getHighlightRange, getPreferenceStore, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSelectionChangedListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getVerticalRuler, gotoMarker, handleCursorPositionChanged, handleEditorInputChanged, handleExceptionOnSave, handleInsertModeChanged, handlePreferenceStoreChanged, init, isDirty, isEditable, isEditorInputReadOnly, isInInsertMode, isSaveAsAllowed, isSaveOnCloseNeeded, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, performSaveAs, performSaveOperation, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, rulerContextMenuAboutToShow, safelySanityCheckState, selectAndReveal, setAction, setActionActivationCode, setCompatibilityMode, setDocumentProvider, setEditorContextMenuId, setFocus, setHelpContextId, setHighlightRange, setInput, setPreferenceStore, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, showHighlightRangeOnly, showsHighlightRangeOnly, updateContentDependentActions, updatePropertyDependentActions, updateSelectionDependentActions, updateState, updateStateDependentActions, updateStatusFields, validateState
 
Methods inherited from class org.eclipse.ui.part.EditorPart
getEditorInput, getEditorSite, getTitleToolTip
 
Methods inherited from class org.eclipse.ui.part.WorkbenchPart
addPropertyListener, getConfigurationElement, getDefaultImage, getSite, getTitle, getTitleImage, removePropertyListener, setInitializationData, setSite, setTitle, setTitleImage, setTitleToolTip
 
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
 

Constructor Detail

StatusTextEditor

public StatusTextEditor()
Method Detail

createPartControl

public void createPartControl(Composite parent)
Description copied from class: AbstractTextEditor
The AbstractTextEditor implementation of this IWorkbenchPart method creates the vertical ruler and source viewer. Subclasses may extend.

Specified by:
createPartControl in interface IWorkbenchPart
Overrides:
createPartControl in class AbstractTextEditor
Parameters:
parent - the parent control

updatePartControl

public void updatePartControl(IEditorInput input)
Checks if the status of the given input is OK. If not the status control is shown rather than the default control.

Parameters:
input - the input whose status is checked

createStatusControl

protected Control createStatusControl(Composite parent,
                                      IStatus status)
Creates the status control for the given status. May be overridden by subclasses.

Parameters:
parent - the parent control
status - the status

getStatusHeader

protected String getStatusHeader(IStatus status)
Returns a header for the given status

Parameters:
status - the status whose message is returned
Returns:
a header for the given status

getStatusBanner

protected String getStatusBanner(IStatus status)
Returns a banner for the given status.

Parameters:
status - the status whose message is returned
Returns:
a banner for the given status

getStatusMessage

protected String getStatusMessage(IStatus status)
Returns a message for the given status.

Parameters:
status - the status whose message is returned
Returns:
a message for the given status

updateStatusField

protected void updateStatusField(String category)
Description copied from class: AbstractTextEditor
Updates the status fields for the given category.

Overrides:
updateStatusField in class AbstractTextEditor
Parameters:
category -

doSetInput

protected void doSetInput(IEditorInput input)
                   throws CoreException
Description copied from class: AbstractTextEditor
Internal setInput method.

Overrides:
doSetInput in class AbstractTextEditor
Parameters:
input - the input to be set
Throws:
CoreException - if input cannot be connected to the document provider

doRevertToSaved

public void doRevertToSaved()
Description copied from class: AbstractTextEditor
The AbstractTextEditor implementation of this ITextEditor method may be extended by subclasses.

Specified by:
doRevertToSaved in interface ITextEditor
Overrides:
doRevertToSaved in class AbstractTextEditor

sanityCheckState

protected void sanityCheckState(IEditorInput input)
Description copied from class: AbstractTextEditor
Checks the state of the given editor input.

Overrides:
sanityCheckState in class AbstractTextEditor
Parameters:
input - the editor input whose state is to be checked

Eclipse Platform
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.