org.eclipse.xtext.ui.editor
Class XtextEditor

java.lang.Object
  extended by org.eclipse.core.commands.common.EventManager
      extended by org.eclipse.ui.part.WorkbenchPart
          extended by org.eclipse.ui.part.EditorPart
              extended by org.eclipse.ui.texteditor.AbstractTextEditor
                  extended by org.eclipse.ui.texteditor.StatusTextEditor
                      extended by org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
                          extended by org.eclipse.ui.editors.text.TextEditor
                              extended by org.eclipse.xtext.ui.editor.XtextEditor
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.core.runtime.IExecutableExtension, org.eclipse.ui.IEditorPart, org.eclipse.ui.INavigationLocationProvider, org.eclipse.ui.IPersistable, org.eclipse.ui.IPersistableEditor, org.eclipse.ui.IReusableEditor, org.eclipse.ui.ISaveablePart, org.eclipse.ui.ISaveablesSource, org.eclipse.ui.IWorkbenchPart, org.eclipse.ui.IWorkbenchPart2, org.eclipse.ui.IWorkbenchPart3, org.eclipse.ui.part.IWorkbenchPartOrientation, org.eclipse.ui.texteditor.ITextEditor, org.eclipse.ui.texteditor.ITextEditorExtension, org.eclipse.ui.texteditor.ITextEditorExtension2, org.eclipse.ui.texteditor.ITextEditorExtension3, org.eclipse.ui.texteditor.ITextEditorExtension4, org.eclipse.ui.texteditor.ITextEditorExtension5
Direct Known Subclasses:
DefaultMergeEditor

public class XtextEditor
extends org.eclipse.ui.editors.text.TextEditor

Author:
Dennis Huebner - Initial contribution and API, Peter Friese - Initial contribution and API, Sven Efftinge, Michael Clay, Dan Stefanescu - Fix for bug 278279

Nested Class Summary
protected  class XtextEditor.DeleteNextSubWordAction
          Text operation action to delete the next sub-word.
protected  class XtextEditor.DeletePreviousSubWordAction
          Text operation action to delete the previous sub-word.
protected  class XtextEditor.NavigateNextSubWordAction
          Text navigation action to navigate to the next sub-word.
protected  class XtextEditor.NavigatePreviousSubWordAction
          Text navigation action to navigate to the previous sub-word.
protected  class XtextEditor.NextSubWordAction
          Text navigation action to navigate to the next sub-word.
protected  class XtextEditor.PreviousSubWordAction
          Text navigation action to navigate to the previous sub-word.
protected  class XtextEditor.SelectNextSubWordAction
          Text operation action to select the next sub-word.
protected  class XtextEditor.SelectPreviousSubWordAction
          Text operation action to select the previous sub-word.
protected  class XtextEditor.SmartLineStartAction
          This action implements smart home.
 
Nested classes/interfaces inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
org.eclipse.ui.texteditor.AbstractTextEditor.AbstractSelectionChangedListener, org.eclipse.ui.texteditor.AbstractTextEditor.ColumnSupport, org.eclipse.ui.texteditor.AbstractTextEditor.IdMapEntry, org.eclipse.ui.texteditor.AbstractTextEditor.LineEndAction, org.eclipse.ui.texteditor.AbstractTextEditor.LineStartAction, org.eclipse.ui.texteditor.AbstractTextEditor.SelectionProvider, org.eclipse.ui.texteditor.AbstractTextEditor.TextEditorSavable
 
Nested classes/interfaces inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3
org.eclipse.ui.texteditor.ITextEditorExtension3.InsertMode
 
Field Summary
static java.lang.String ERROR_ANNOTATION_TYPE
           
static java.lang.String ID
           
static java.lang.String WARNING_ANNOTATION_TYPE
           
 
Fields inherited from class org.eclipse.ui.editors.text.TextEditor
fEncodingSupport
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
DEFAULT_OVERVIEW_RULER_CONTEXT_MENU_ID, fAnnotationAccess, fIsUpdatingMarkerViews, fLineNumberRulerColumn, fOverviewRuler, fSourceViewerDecorationSupport
 
Fields inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
ACTION_MAP, COMMON_EDITOR_CONTEXT_MENU_ID, COMMON_RULER_CONTEXT_MENU_ID, 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_HOVER_ENRICH_MODE, PREFERENCE_HYPERLINK_KEY_MODIFIER, PREFERENCE_HYPERLINK_KEY_MODIFIER_MASK, PREFERENCE_HYPERLINKS_ENABLED, PREFERENCE_NAVIGATION_SMART_HOME_END, PREFERENCE_RULER_CONTRIBUTIONS, PREFERENCE_SHOW_CARRIAGE_RETURN, PREFERENCE_SHOW_ENCLOSED_IDEOGRAPHIC_SPACES, PREFERENCE_SHOW_ENCLOSED_SPACES, PREFERENCE_SHOW_ENCLOSED_TABS, PREFERENCE_SHOW_LEADING_IDEOGRAPHIC_SPACES, PREFERENCE_SHOW_LEADING_SPACES, PREFERENCE_SHOW_LEADING_TABS, PREFERENCE_SHOW_LINE_FEED, PREFERENCE_SHOW_TRAILING_IDEOGRAPHIC_SPACES, PREFERENCE_SHOW_TRAILING_SPACES, PREFERENCE_SHOW_TRAILING_TABS, PREFERENCE_SHOW_WHITESPACE_CHARACTERS, PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED, PREFERENCE_USE_CUSTOM_CARETS, PREFERENCE_WHITESPACE_CHARACTER_ALPHA_VALUE, PREFERENCE_WIDE_CARET, TAG_SELECTION_HORIZONTAL_PIXEL, TAG_SELECTION_LENGTH, TAG_SELECTION_OFFSET, TAG_SELECTION_TOP_PIXEL, 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
 
Fields inherited from interface org.eclipse.ui.texteditor.ITextEditorExtension3
INSERT, SMART_INSERT
 
Constructor Summary
XtextEditor()
           
 
Method Summary
protected  java.lang.String[] collectContextMenuPreferencePages()
          Returns the preference page ids of the preference pages to be shown when executing the preferences action from the editor context menu.
protected  void configureSourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport support)
          Configures the decoration support for this editor's source viewer.
protected  void configureToggleCommentAction(ToggleSLCommentAction action)
           
protected  void createActions()
          Creates this editor's standard actions and connects them with the global workbench actions.
protected  org.eclipse.jface.text.source.IAnnotationAccess createAnnotationAccess()
          Creates the annotation access for this editor.
protected  XtextEditor.DeleteNextSubWordAction createDeleteNextSubWordAction()
           
protected  XtextEditor.DeletePreviousSubWordAction createDeletePreviousSubWordAction()
           
protected  XtextEditor.NavigateNextSubWordAction createNavigateNextSubWordAction()
           
protected  XtextEditor.NavigatePreviousSubWordAction createNavigatePreviousSubWordAction()
           
protected  void createNavigationActions()
          Creates action entries for all SWT StyledText actions as defined in org.eclipse.swt.custom.ST.
 void createPartControl(org.eclipse.swt.widgets.Composite parent)
          The AbstractTextEditor implementation of this IWorkbenchPart method creates the vertical ruler and source viewer.
protected  XtextEditor.SelectNextSubWordAction createSelectNextSubWordAction()
           
protected  XtextEditor.SelectPreviousSubWordAction createSelectPreviousSubWordAction()
           
protected  XtextEditor.SmartLineStartAction createSmartLineStartAction(org.eclipse.swt.custom.StyledText textWidget, boolean doSelect)
           
protected  org.eclipse.jface.text.source.ISourceViewer createSourceViewer(org.eclipse.swt.widgets.Composite parent, org.eclipse.jface.text.source.IVerticalRuler ruler, int styles)
          Creates the source viewer to be used by this editor.
protected  CommonWordIterator createWordIterator()
           
 void dispose()
          The AbstractTextEditor implementation of this IWorkbenchPart method may be extended by subclasses.
 void doRevertToSaved()
          The AbstractTextEditor implementation of this ITextEditor method may be extended by subclasses.
 void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          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(org.eclipse.ui.IEditorInput input)
          Called directly from setInput and from within a workspace runnable from init, this method does the actual setting of the editor input.
 java.lang.Object getAdapter(java.lang.Class adapter)
          Returns an object which is an instance of the given class associated with this object.
 org.eclipse.swt.graphics.Image getDefaultImage()
          Returns the default title image.
 IXtextDocument getDocument()
           
 org.eclipse.jface.text.source.ISourceViewer getInternalSourceViewer()
           
 java.lang.String getLanguageName()
           
 org.eclipse.core.resources.IResource getResource()
           
protected  org.eclipse.core.commands.operations.IOperationApprover getUndoRedoOperationApprover(org.eclipse.core.commands.operations.IUndoContext undoContext)
          Return an IOperationApprover appropriate for approving the undo and redo of operations that have the specified undo context.
 XtextSourceViewerConfiguration getXtextSourceViewerConfiguration()
           
protected  void handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent event)
          Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.
 void init(org.eclipse.ui.IEditorSite site, org.eclipse.ui.IEditorInput input)
          Initializes this editor with the given editor site and input.
protected  void initializeKeyBindingScopes()
          Set key binding scope.
protected  void installFoldingSupport(org.eclipse.jface.text.source.projection.ProjectionViewer projectionViewer)
           
protected  org.eclipse.jface.text.source.projection.ProjectionSupport installProjectionSupport(org.eclipse.jface.text.source.projection.ProjectionViewer projectionViewer)
           
 boolean isContentAssistAvailable()
           
 void outlinePageClosed()
          Informs the editor that its outline has been closed.
 void resetProjection()
          Resets the foldings structure according to the folding preferences.
 void reveal(int offset, int length)
          Copied from AbstractTextEditor.selectAndReveal(int, int)  and removed selection functionality.
protected  void rulerContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
          Sets up the ruler context menu before it is made visible.
 void setLanguageName(java.lang.String name)
           
protected  void setPreferenceStore(org.eclipse.jface.preference.IPreferenceStore preferenceStore)
          Sets this editor's preference store.
 void setXtextEditorCallback(CompoundXtextEditorCallback callback)
          Externally set the editor callback, e.g. to disable dirty state support for a specific instance.
protected  void uninstallFoldingSupport()
           
 void updatedTitleImage(org.eclipse.swt.graphics.Image image)
           
protected  void updateStatusLine()
           
 boolean validateEditorInputState()
          Validates the state of the given editor input.
 
Methods inherited from class org.eclipse.ui.editors.text.TextEditor
editorContextMenuAboutToShow, getStatusBanner, getStatusHeader, getStatusMessage, initializeEditor, installEncodingSupport, isSaveAsAllowed, updatePropertyDependentActions
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
collectOverviewRulerMenuPreferencePages, collectRulerMenuPreferencePages, createAnnotationRulerColumn, createChangeHover, createChangeRulerColumn, createColumnSupport, createCompositeRuler, createContextMenuListener, createLineNumberRulerColumn, createOverviewRuler, createOverviewRulerContextMenu, createStatusControl, createVerticalRuler, disposeDocumentProvider, getAnnotationAccess, getAnnotationPreferenceLookup, getAnnotationPreferences, getDocumentProvider, getOverviewRuler, getOverviewRulerContextMenuId, getSharedColors, getSourceViewerDecorationSupport, gotoAnnotation, gotoMarker, handleEditorInputChanged, hideOverviewRuler, initializeLineNumberRulerColumn, isChangeInformationShowing, isEditable, isErrorStatus, isLineNumberRulerVisible, isNavigationTarget, isOverviewRulerVisible, isOverwriteModeEnabled, isPrefQuickDiffAlwaysOn, isTabsToSpacesConversionEnabled, openSaveErrorDialog, overviewRulerContextMenuAboutToShow, performSaveAs, setDocumentProvider, setOverviewRulerContextMenuId, showChangeInformation, showOverviewRuler, showRevisionInformation, updateMarkerViews
 
Methods inherited from class org.eclipse.ui.texteditor.StatusTextEditor
handleElementContentReplaced, sanityCheckState, setFocus, updatePartControl, updateStatusField
 
Methods inherited from class org.eclipse.ui.texteditor.AbstractTextEditor
addAction, addAction, addGroup, addRulerContextMenuListener, adjustHighlightRange, affectsTextPresentation, canHandleMove, close, configureInsertMode, containsSavedState, createEmptyNavigationLocation, createNavigationLocation, createUndoRedoActions, doGetSelection, doRestoreState, doSetSelection, editorSaved, enableOverwriteMode, enableSanityChecking, enableStateValidation, findAnnotation, firePropertyChange, getAction, getActiveSaveables, getContextMenuListener, getCoverage, getCursorListener, getCursorPosition, getEditorContextMenuId, getFontPropertyPreferenceKey, getHelpContextId, getHighlightRange, getInsertMode, getLegalInsertModes, getPreferenceStore, getProgressMonitor, getRangeIndicator, getRulerContextMenuId, getRulerMouseListener, getSaveables, getSelectionChangedListener, getSelectionProvider, getSourceViewer, getSourceViewerConfiguration, getStatusField, getStatusLineManager, getVerticalRuler, handleCursorPositionChanged, handleExceptionOnSave, handleInsertModeChanged, initializeDragAndDrop, initializeViewerColors, installTabsToSpacesConverter, installTextDragAndDrop, internalInit, isBlockSelectionModeEnabled, isBlockSelectionModeSupported, isDirty, isEditorInputIncludedInContextMenu, isEditorInputModifiable, isEditorInputReadOnly, isInInsertMode, isVisible, markAsContentDependentAction, markAsPropertyDependentAction, markAsSelectionDependentAction, markAsStateDependentAction, markInNavigationHistory, modelOffset2WidgetOffset, performRevert, performSave, rememberSelection, removeActionActivationCode, removeRulerContextMenuListener, resetHighlightRange, restoreSelection, restoreState, safelySanityCheckState, saveState, selectAndReveal, selectAndReveal, setAction, setActionActivationCode, setBlockSelectionMode, setCompatibilityMode, setDocumentProvider, setEditorContextMenuId, setHelpContextId, setHighlightRange, setInput, setInputWithNotify, setInsertMode, setKeyBindingScopes, setRangeIndicator, setRulerContextMenuId, setSourceViewerConfiguration, setStatusField, setStatusLineErrorMessage, setStatusLineMessage, showHighlightRangeOnly, showsHighlightRangeOnly, uninstallTabsToSpacesConverter, uninstallTextDragAndDrop, updateContentDependentActions, updateContributedRulerColumns, updateIndentPrefixes, updateSelectionDependentActions, updateState, updateStateDependentActions, updateStatusFields, validateState, widgetOffset2ModelOffset
 
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, 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
 

Field Detail

ERROR_ANNOTATION_TYPE

public static final java.lang.String ERROR_ANNOTATION_TYPE
See Also:
Constant Field Values

WARNING_ANNOTATION_TYPE

public static final java.lang.String WARNING_ANNOTATION_TYPE
See Also:
Constant Field Values

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

XtextEditor

public XtextEditor()
Method Detail

getDocument

public IXtextDocument getDocument()

setLanguageName

@Inject
public void setLanguageName(java.lang.String name)

getLanguageName

public java.lang.String getLanguageName()

doSetInput

protected void doSetInput(org.eclipse.ui.IEditorInput input)
                   throws org.eclipse.core.runtime.CoreException
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Called directly from setInput 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.

Overrides:
doSetInput in class org.eclipse.ui.editors.text.TextEditor
Parameters:
input - the input to be set
Throws:
org.eclipse.core.runtime.CoreException - if input cannot be connected to the document provider

init

public void init(org.eclipse.ui.IEditorSite site,
                 org.eclipse.ui.IEditorInput input)
          throws org.eclipse.ui.PartInitException
Description copied from interface: org.eclipse.ui.IEditorPart
Initializes this editor with the given editor site and input.

This method is automatically called shortly after the part is instantiated. It marks the start of the part's lifecycle. The IWorkbenchPart.dispose method will be called automically at the end of the lifecycle. Clients must not call this method.

Implementors of this method must examine the editor input object type to determine if it is understood. If not, the implementor must throw a PartInitException

Specified by:
init in interface org.eclipse.ui.IEditorPart
Overrides:
init in class org.eclipse.ui.texteditor.AbstractTextEditor
Parameters:
site - the editor site
input - the editor input
Throws:
org.eclipse.ui.PartInitException - if this editor was not initialized successfully

setPreferenceStore

protected void setPreferenceStore(org.eclipse.jface.preference.IPreferenceStore preferenceStore)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Sets this editor's preference store. This method must be called before the editor's control is created.

Overrides:
setPreferenceStore in class org.eclipse.ui.texteditor.AbstractTextEditor
Parameters:
preferenceStore - the preference store or null to remove the preference store

getXtextSourceViewerConfiguration

public XtextSourceViewerConfiguration getXtextSourceViewerConfiguration()

doSaveAs

public void doSaveAs()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
The AbstractTextEditor implementation of this IEditorPart method calls performSaveAs. Subclasses may reimplement.

Specified by:
doSaveAs in interface org.eclipse.ui.ISaveablePart
Overrides:
doSaveAs in class org.eclipse.ui.texteditor.AbstractTextEditor

doSave

public void doSave(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
The AbstractTextEditor implementation of this IEditorPart method may be extended by subclasses.

Specified by:
doSave in interface org.eclipse.ui.ISaveablePart
Overrides:
doSave in class org.eclipse.ui.texteditor.AbstractTextEditor
Parameters:
progressMonitor - the progress monitor for communicating result state or null

doRevertToSaved

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

Specified by:
doRevertToSaved in interface org.eclipse.ui.texteditor.ITextEditor
Overrides:
doRevertToSaved in class org.eclipse.ui.texteditor.StatusTextEditor

initializeKeyBindingScopes

protected void initializeKeyBindingScopes()
Set key binding scope. Needed to make F3 work properly.

Overrides:
initializeKeyBindingScopes in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor

getResource

public org.eclipse.core.resources.IResource getResource()

getAdapter

public java.lang.Object getAdapter(java.lang.Class adapter)
Description copied from class: org.eclipse.ui.part.WorkbenchPart
Returns an object which is an instance of the given class associated with this object. Returns null 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).

Specified by:
getAdapter in interface org.eclipse.core.runtime.IAdaptable
Overrides:
getAdapter in class org.eclipse.ui.editors.text.TextEditor
Parameters:
adapter - the adapter class to look up
Returns:
a object castable to the given class, or null if this object does not have an adapter for the given class

outlinePageClosed

public void outlinePageClosed()
Informs the editor that its outline has been closed.


createActions

protected void createActions()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Creates this editor's standard actions and connects them with the global workbench actions.

Subclasses may extend.

Overrides:
createActions in class org.eclipse.ui.editors.text.TextEditor

configureToggleCommentAction

protected void configureToggleCommentAction(ToggleSLCommentAction action)

getUndoRedoOperationApprover

protected org.eclipse.core.commands.operations.IOperationApprover getUndoRedoOperationApprover(org.eclipse.core.commands.operations.IUndoContext undoContext)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Return an IOperationApprover appropriate for approving the undo and redo of operations that have the specified undo context.

Subclasses may override.

Overrides:
getUndoRedoOperationApprover in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Parameters:
undoContext - the IUndoContext of operations that should be examined by the operation approver
Returns:
the IOperationApprover appropriate for approving undo and redo operations inside this editor, or null if no approval is needed

isContentAssistAvailable

public boolean isContentAssistAvailable()
Returns:
true if content assist is available

createSourceViewer

protected org.eclipse.jface.text.source.ISourceViewer createSourceViewer(org.eclipse.swt.widgets.Composite parent,
                                                                         org.eclipse.jface.text.source.IVerticalRuler ruler,
                                                                         int styles)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Creates the source viewer to be used by this editor. Subclasses may re-implement this method.

Overrides:
createSourceViewer in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Parameters:
parent - the parent control
ruler - the vertical ruler
styles - style bits, SWT.WRAP is currently not supported
Returns:
the source viewer

configureSourceViewerDecorationSupport

protected void configureSourceViewerDecorationSupport(org.eclipse.ui.texteditor.SourceViewerDecorationSupport support)
Description copied from class: org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Configures the decoration support for this editor's source viewer. Subclasses may override this method, but should call their superclass' implementation at some point.

Overrides:
configureSourceViewerDecorationSupport in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Parameters:
support - the decoration support to configure

createPartControl

public void createPartControl(org.eclipse.swt.widgets.Composite parent)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
The AbstractTextEditor 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:


Subclasses may replace the following methods called from within createPartControl:
Subclasses may extend the following methods called from within createPartControl:

Specified by:
createPartControl in interface org.eclipse.ui.IWorkbenchPart
Overrides:
createPartControl in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Parameters:
parent - the parent composite

installProjectionSupport

protected org.eclipse.jface.text.source.projection.ProjectionSupport installProjectionSupport(org.eclipse.jface.text.source.projection.ProjectionViewer projectionViewer)

installFoldingSupport

protected void installFoldingSupport(org.eclipse.jface.text.source.projection.ProjectionViewer projectionViewer)

dispose

public void dispose()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
The AbstractTextEditor 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.

Specified by:
dispose in interface org.eclipse.ui.IWorkbenchPart
Overrides:
dispose in class org.eclipse.ui.editors.text.TextEditor

uninstallFoldingSupport

protected void uninstallFoldingSupport()

getInternalSourceViewer

public org.eclipse.jface.text.source.ISourceViewer getInternalSourceViewer()

handlePreferenceStoreChanged

protected void handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent event)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.

Subclasses may extend.

Overrides:
handlePreferenceStoreChanged in class org.eclipse.ui.editors.text.TextEditor
Parameters:
event - the property change event

collectContextMenuPreferencePages

protected java.lang.String[] collectContextMenuPreferencePages()
Description copied from class: org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Returns the preference page ids of the preference pages to be shown when executing the preferences action from the editor context menu. The first page will be selected.

Subclasses may extend or replace.

Overrides:
collectContextMenuPreferencePages in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Returns:
the preference page ids to show, may be empty

createAnnotationAccess

protected org.eclipse.jface.text.source.IAnnotationAccess createAnnotationAccess()
Description copied from class: org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Creates the annotation access for this editor.

Overrides:
createAnnotationAccess in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Returns:
the created annotation access

updateStatusLine

protected void updateStatusLine()

validateEditorInputState

public boolean validateEditorInputState()
Description copied from interface: org.eclipse.ui.texteditor.ITextEditorExtension2
Validates the state of the given editor input. The predominate intent of this method is to take any action probably necessary to ensure that the input can persistently be changed.

Specified by:
validateEditorInputState in interface org.eclipse.ui.texteditor.ITextEditorExtension2
Overrides:
validateEditorInputState in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Returns:
true if the input was validated, false otherwise

updatedTitleImage

public void updatedTitleImage(org.eclipse.swt.graphics.Image image)

getDefaultImage

public org.eclipse.swt.graphics.Image getDefaultImage()
Description copied from class: org.eclipse.ui.part.WorkbenchPart
Returns the default title image.

Overrides:
getDefaultImage in class org.eclipse.ui.part.WorkbenchPart
Returns:
the default image

rulerContextMenuAboutToShow

protected void rulerContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager menu)
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Sets up the ruler context menu before it is made visible.

Subclasses may extend to add other actions.

Overrides:
rulerContextMenuAboutToShow in class org.eclipse.ui.texteditor.AbstractDecoratedTextEditor
Parameters:
menu - the menu

resetProjection

public void resetProjection()
Resets the foldings structure according to the folding preferences.


setXtextEditorCallback

public void setXtextEditorCallback(CompoundXtextEditorCallback callback)
Externally set the editor callback, e.g. to disable dirty state support for a specific instance.


reveal

public void reveal(int offset,
                   int length)
Copied from AbstractTextEditor.selectAndReveal(int, int)  and removed selection functionality.


createWordIterator

protected CommonWordIterator createWordIterator()

createDeleteNextSubWordAction

protected XtextEditor.DeleteNextSubWordAction createDeleteNextSubWordAction()

createDeletePreviousSubWordAction

protected XtextEditor.DeletePreviousSubWordAction createDeletePreviousSubWordAction()

createSelectNextSubWordAction

protected XtextEditor.SelectNextSubWordAction createSelectNextSubWordAction()

createSelectPreviousSubWordAction

protected XtextEditor.SelectPreviousSubWordAction createSelectPreviousSubWordAction()

createNavigateNextSubWordAction

protected XtextEditor.NavigateNextSubWordAction createNavigateNextSubWordAction()

createNavigatePreviousSubWordAction

protected XtextEditor.NavigatePreviousSubWordAction createNavigatePreviousSubWordAction()

createSmartLineStartAction

protected XtextEditor.SmartLineStartAction createSmartLineStartAction(org.eclipse.swt.custom.StyledText textWidget,
                                                                      boolean doSelect)

createNavigationActions

protected void createNavigationActions()
Description copied from class: org.eclipse.ui.texteditor.AbstractTextEditor
Creates action entries for all SWT StyledText actions as defined in org.eclipse.swt.custom.ST. Overwrites and extends the list of these actions afterwards.

Subclasses may extend.

Overrides:
createNavigationActions in class org.eclipse.ui.texteditor.AbstractTextEditor