|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.core.commands.common.EventManager
org.eclipse.ui.part.WorkbenchPart
org.eclipse.ui.part.EditorPart
org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.texteditor.StatusTextEditor
org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
org.eclipse.ui.editors.text.TextEditor
public class TextEditor
The standard/default text editor.
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class org.eclipse.ui.texteditor.AbstractTextEditor |
|---|
AbstractTextEditor.AbstractSelectionChangedListener, AbstractTextEditor.ColumnSupport, AbstractTextEditor.IdMapEntry, AbstractTextEditor.LineEndAction, AbstractTextEditor.LineStartAction, AbstractTextEditor.SelectionProvider, AbstractTextEditor.TextEditorSavable |
| Nested classes/interfaces inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3 |
|---|
ITextEditorExtension3.InsertMode |
| Field Summary | |
|---|---|
protected DefaultEncodingSupport |
fEncodingSupport
The encoding support for the editor. |
| Fields inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor |
|---|
DEFAULT_OVERVIEW_RULER_CONTEXT_MENU_ID, fAnnotationAccess, fIsUpdatingMarkerViews, fLineNumberRulerColumn, fOverviewRuler, fSourceViewerDecorationSupport |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Fields inherited from interface org.eclipse.ui.IEditorPart |
|---|
PROP_DIRTY, PROP_INPUT |
| Fields inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
PROP_TITLE |
| Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3 |
|---|
INSERT, SMART_INSERT |
| Constructor Summary | |
|---|---|
TextEditor()
Creates a new text editor. |
|
| Method Summary | |
|---|---|
protected void |
createActions()
Creates this editor's standard actions and connects them with the global workbench actions. |
void |
dispose()
The AbstractTextEditor implementation of this
IWorkbenchPart 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 void |
editorContextMenuAboutToShow(IMenuManager menu)
Sets up this editor's context menu before it is made visible. |
java.lang.Object |
getAdapter(java.lang.Class adapter)
Returns an object which is an instance of the given class associated with this object. Subclasses may override this method (however, if they do so, they should invoke the method on their superclass to ensure that the Platform's adapter manager is consulted). |
protected java.lang.String |
getStatusBanner(IStatus status)
Returns a banner for the given status. |
protected java.lang.String |
getStatusHeader(IStatus status)
Returns a header for the given status |
protected java.lang.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. This method configures the editor but does not define a SourceViewerConfiguration. |
protected void |
installEncodingSupport()
Installs the encoding support on the given text editor. |
boolean |
isSaveAsAllowed()
The AbstractTextEditor implementation of this
IEditorPart method returns false. |
protected void |
updatePropertyDependentActions()
Updates all property dependent actions. |
| Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor |
|---|
doRevertToSaved, handleEditorInputChanged, handleElementContentReplaced, sanityCheckState, setFocus, updatePartControl, updateStatusField |
| Methods inherited from class org.eclipse.ui.part.EditorPart |
|---|
checkSite, getEditorInput, getEditorSite, getTitleToolTip, isSaveOnCloseNeeded, setContentDescription, setInitializationData, setPartName |
| Methods inherited from class org.eclipse.ui.part.WorkbenchPart |
|---|
addPartPropertyListener, addPropertyListener, firePartPropertyChanged, getConfigurationElement, getContentDescription, getDefaultImage, getOrientation, getPartName, getPartProperties, getPartProperty, getSite, getTitle, getTitleImage, removePartPropertyListener, removePropertyListener, setPartProperty, setSite, setTitle, setTitleImage, setTitleToolTip, showBusy |
| Methods inherited from class org.eclipse.core.commands.common.EventManager |
|---|
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject |
| 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 |
| Methods inherited from interface org.eclipse.ui.ISaveablePart |
|---|
isSaveOnCloseNeeded |
| Methods inherited from interface org.eclipse.ui.IEditorPart |
|---|
getEditorInput, getEditorSite |
| Methods inherited from interface org.eclipse.ui.IWorkbenchPart |
|---|
addPropertyListener, getSite, getTitle, getTitleImage, getTitleToolTip, removePropertyListener |
| Methods inherited from interface org.eclipse.ui.ISaveablePart |
|---|
isSaveOnCloseNeeded |
| Field Detail |
|---|
protected DefaultEncodingSupport fEncodingSupport
| Constructor Detail |
|---|
public TextEditor()
initializeEditor(),
AbstractDecoratedTextEditor.initializeKeyBindingScopes()| Method Detail |
|---|
protected void initializeEditor()
super.initializeEditor() in order to avoid the
temporary creation of objects that are immediately overwritten by
subclasses.
This method configures the editor but does not define a
SourceViewerConfiguration. When only interested in
providing a custom source viewer configuration, subclasses may extend
this method.
initializeEditor in class AbstractDecoratedTextEditorpublic void dispose()
AbstractTextEditorAbstractTextEditor implementation of this
IWorkbenchPart method may be extended by subclasses.
Subclasses must call super.dispose().
Note that many methods may return null after the editor is
disposed.
dispose in interface IWorkbenchPartdispose in class AbstractDecoratedTextEditorprotected void installEncodingSupport()
Subclasses may override to install their own encoding support or to disable the default encoding support.
public boolean isSaveAsAllowed()
AbstractTextEditorAbstractTextEditor implementation of this
IEditorPart method returns false.
Subclasses may override.
isSaveAsAllowed in interface ISaveablePartisSaveAsAllowed in class AbstractTextEditorfalseprotected void createActions()
AbstractTextEditorSubclasses may extend.
createActions in class AbstractDecoratedTextEditorprotected java.lang.String getStatusHeader(IStatus status)
StatusTextEditor
getStatusHeader in class StatusTextEditorstatus - the status whose message is returned
protected java.lang.String getStatusBanner(IStatus status)
StatusTextEditor
getStatusBanner in class StatusTextEditorstatus - the status whose message is returned
protected java.lang.String getStatusMessage(IStatus status)
StatusTextEditor
getStatusMessage in class StatusTextEditorstatus - the status whose message is returned
protected 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 AbstractDecoratedTextEditorinput - the input to be set
CoreException - if input cannot be connected to the document
providerpublic java.lang.Object getAdapter(java.lang.Class adapter)
WorkbenchPartnull if
no such object can be found.
Subclasses may override this method (however, if they do so, they
should invoke the method on their superclass to ensure that the
Platform's adapter manager is consulted).
getAdapter in interface IAdaptablegetAdapter in class AbstractDecoratedTextEditoradapter - the adapter class to look up
null if this object does not
have an adapter for the given classprotected void updatePropertyDependentActions()
AbstractTextEditor
updatePropertyDependentActions in class AbstractTextEditorprotected void handlePreferenceStoreChanged(PropertyChangeEvent event)
AbstractTextEditorSubclasses may extend.
handlePreferenceStoreChanged in class AbstractDecoratedTextEditorevent - the property change eventprotected void editorContextMenuAboutToShow(IMenuManager menu)
AbstractTextEditorSubclasses may extend to add other actions.
editorContextMenuAboutToShow in class AbstractDecoratedTextEditormenu - the menu
|
Eclipse Platform Release 3.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2010. All rights reserved.