|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.eclipse.ui.part.WorkbenchPart
|
+--org.eclipse.ui.part.EditorPart
|
+--org.eclipse.ui.texteditor.AbstractTextEditor
|
+--org.eclipse.ui.texteditor.StatusTextEditor
|
+--org.eclipse.ui.editors.text.TextEditor
The standard text editor for file resources (IFile).
This editor has id "org.eclipse.ui.DefaultTextEditor".
The editor's context menu has id #TextEditorContext.
The editor's ruler context menu has id #TextRulerContext.
The workbench will automatically instantiate this class when the default editor is needed for a workbench window.
| Field Summary | |
protected IAnnotationAccess |
fAnnotationAccess
Helper for accessing annotation from the perspective of this editor. |
protected DefaultEncodingSupport |
fEncodingSupport
The encoding support for the editor. |
protected LineNumberRulerColumn |
fLineNumberRulerColumn
The line number column. |
protected IOverviewRuler |
fOverviewRuler
The overview ruler of this editor. |
protected SourceViewerDecorationSupport |
fSourceViewerDecorationSupport
Helper for managing the decoration support of this editor's viewer. |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
PROP_TITLE |
| Constructor Summary | |
TextEditor()
Creates a new text editor. |
|
| Method Summary | |
protected void |
configureSourceViewerDecorationSupport()
Configures the decoration support for this editor's the source viewer. |
protected void |
createActions()
Creates this editor's standard actions and connects them with the global workbench actions. |
protected IAnnotationAccess |
createAnnotationAccess()
Creates the annotation access for this editor. |
protected IVerticalRulerColumn |
createLineNumberRulerColumn()
Creates a new line number ruler column that is appropriately initialized. |
void |
createPartControl(Composite parent)
The AbstractTextEditor implementation of this
IWorkbenchPart method creates the vertical ruler and
source viewer. |
protected ISourceViewer |
createSourceViewer(Composite parent,
IVerticalRuler ruler,
int styles)
Creates the source viewer to be used by this editor. |
protected IVerticalRuler |
createVerticalRuler()
Creates the vertical ruler to be used by this editor. |
void |
dispose()
The AbstractTextEditor implementation of this
IWorkbenchPart method may be extended by subclasses. |
void |
doSave(IProgressMonitor monitor)
The AbstractTextEditor implementation of this
IEditorPart method may be extended by subclasses. |
void |
doSaveAs()
The AbstractTextEditor implementation of this
IEditorPart method calls performSaveAs. |
protected void |
doSetInput(IEditorInput input)
Internal setInput method. |
protected void |
editorContextMenuAboutToShow(IMenuManager menu)
Sets up this editor's context menu before it is made visible. |
Object |
getAdapter(Class adapter)
Returns an object which is an instance of the given class associated with this object. |
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 |
handlePreferenceStoreChanged(PropertyChangeEvent event)
Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties. |
protected void |
initializeEditor()
Initializes this editor. |
protected void |
initializeKeyBindingScopes()
Initializes the key binding scopes of this editor. |
protected void |
initializeLineNumberRulerColumn(LineNumberRulerColumn rulerColumn)
Initializes the given line number ruler column from the preference store. |
protected void |
installEncodingSupport()
Installs the encoding support on the given text editor. |
protected boolean |
isOverviewRulerVisible()
Tells whether the overview ruler is visible. |
boolean |
isSaveAsAllowed()
The AbstractTextEditor implementation of this
IEditorPart method returns false. |
protected void |
performSaveAs(IProgressMonitor progressMonitor)
The TextEditor implementation of this AbstractTextEditor
method asks the user for the workspace path of a file resource and saves the document there. |
protected void |
updatePropertyDependentActions()
Updates all property dependent actions. |
| Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor |
createStatusControl, doRevertToSaved, sanityCheckState, updatePartControl, updateStatusField |
| 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 |
| Field Detail |
protected IOverviewRuler fOverviewRuler
protected IAnnotationAccess fAnnotationAccess
protected SourceViewerDecorationSupport fSourceViewerDecorationSupport
protected LineNumberRulerColumn fLineNumberRulerColumn
protected DefaultEncodingSupport fEncodingSupport
| Constructor Detail |
public TextEditor()
| Method Detail |
protected void initializeEditor()
protected void initializeKeyBindingScopes()
public void dispose()
AbstractTextEditorAbstractTextEditor implementation of this
IWorkbenchPart method may be extended by subclasses.
Subclasses must call super.dispose().
dispose in interface IWorkbenchPartdispose in class AbstractTextEditorpublic void doSaveAs()
AbstractTextEditorAbstractTextEditor implementation of this
IEditorPart method calls performSaveAs.
Subclasses may reimplement.
doSaveAs in interface ISaveablePartdoSaveAs in class AbstractTextEditorpublic void doSave(IProgressMonitor monitor)
AbstractTextEditorAbstractTextEditor implementation of this
IEditorPart method may be extended by subclasses.
doSave in interface ISaveablePartdoSave in class AbstractTextEditormonitor - the progress monitor for communicating result state or nullprotected void installEncodingSupport()
Subclasses may override to install their own encoding support or to disable the default encoding support.
protected void performSaveAs(IProgressMonitor progressMonitor)
TextEditor implementation of this AbstractTextEditor
method asks the user for the workspace path of a file resource and saves the document there.
performSaveAs in class AbstractTextEditorprogressMonitor - the progress monitor to be usedpublic boolean isSaveAsAllowed()
AbstractTextEditorAbstractTextEditor implementation of this
IEditorPart method returns false.
Subclasses may override.
isSaveAsAllowed in interface ISaveablePartisSaveAsAllowed in class AbstractTextEditortrue if "Save As" is supported, and false
if not supportedprotected void createActions()
AbstractTextEditorSubclasses may extend.
createActions in class AbstractTextEditorprotected String getStatusHeader(IStatus status)
StatusTextEditor
getStatusHeader in class StatusTextEditorstatus - the status whose message is returned
protected String getStatusBanner(IStatus status)
StatusTextEditor
getStatusBanner in class StatusTextEditorstatus - the status whose message is returned
protected String getStatusMessage(IStatus status)
StatusTextEditor
getStatusMessage in class StatusTextEditorstatus - the status whose message is returned
protected void doSetInput(IEditorInput input)
throws CoreException
AbstractTextEditorsetInput method.
doSetInput in class StatusTextEditorinput - the input to be set
CoreException - if input cannot be connected to the document providerpublic Object getAdapter(Class adapter)
IAdaptablenull if
no such object can be found.
getAdapter in interface IAdaptablegetAdapter in class AbstractTextEditoradapter - the adapter class to look up
null if this object does not
have an adapter for the given classprotected void editorContextMenuAboutToShow(IMenuManager menu)
AbstractTextEditorSubclasses may extend to add other actions.
editorContextMenuAboutToShow in class AbstractTextEditormenu - the menuprotected void updatePropertyDependentActions()
AbstractTextEditor
updatePropertyDependentActions in class AbstractTextEditor
protected ISourceViewer createSourceViewer(Composite parent,
IVerticalRuler ruler,
int styles)
AbstractTextEditor
createSourceViewer in class AbstractTextEditorparent - the parent controlruler - the vertical rulerstyles - style bits
protected IAnnotationAccess createAnnotationAccess()
protected void configureSourceViewerDecorationSupport()
protected boolean isOverviewRulerVisible()
protected void initializeLineNumberRulerColumn(LineNumberRulerColumn rulerColumn)
rulerColumn - the ruler column to be initializedprotected IVerticalRulerColumn createLineNumberRulerColumn()
protected IVerticalRuler createVerticalRuler()
AbstractTextEditor
createVerticalRuler in class AbstractTextEditorprotected void handlePreferenceStoreChanged(PropertyChangeEvent event)
AbstractTextEditor
handlePreferenceStoreChanged in class AbstractTextEditorevent - the property change eventpublic void createPartControl(Composite parent)
AbstractTextEditorAbstractTextEditor implementation of this
IWorkbenchPart method creates the vertical ruler and
source viewer.
Subclasses may extend.
createPartControl in interface IWorkbenchPartcreatePartControl in class StatusTextEditorparent - the parent composite
|
Eclipse Platform 2.1 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||