Java Doc for AbstractTextEditor.java in  » IDE-Eclipse » ui-workbench » org » eclipse » ui » texteditor » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » ui workbench » org.eclipse.ui.texteditor 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.ui.part.EditorPart
   org.eclipse.ui.texteditor.AbstractTextEditor

All known Subclasses:   org.eclipse.ui.texteditor.StatusTextEditor,
AbstractTextEditor
abstract public class AbstractTextEditor extends EditorPart implements ITextEditor,IReusableEditor,ITextEditorExtension,ITextEditorExtension2,ITextEditorExtension3,ITextEditorExtension4,INavigationLocationProvider,ISaveablesSource,IPersistableEditor(Code)
Abstract base implementation of a text editor.

Subclasses are responsible for configuring the editor appropriately. The standard text editor, TextEditor, is one such example.

If a subclass calls the argument is used as the id under which the editor's context menu is registered for extensions. If no id is set, the context menu is registered under [editor_id].EditorContext whereby [editor_id] is replaced with the editor's part id. If the editor is instructed to run in version 1.0 context menu registration compatibility mode, the latter form of the registration even happens if a context menu id has been set via . If no id is set while in compatibility mode, the menu is registered under AbstractTextEditor.DEFAULT_EDITOR_CONTEXT_MENU_ID .

If a subclass calls the argument is used as the id under which the ruler's context menu is registered for extensions. If no id is set, the context menu is registered under [editor_id].RulerContext whereby [editor_id] is replaced with the editor's part id. If the editor is instructed to run in version 1.0 context menu registration compatibility mode, the latter form of the registration even happens if a context menu id has been set via . If no id is set while in compatibility mode, the menu is registered under AbstractTextEditor.DEFAULT_RULER_CONTEXT_MENU_ID .


Inner Class :class ElementStateListener implements IElementStateListener,IElementStateListenerExtension
Inner Class :class TextListener implements ITextListener,ITextInputListener
Inner Class :class PropertyChangeListener implements IPropertyChangeListener
Inner Class :class FontPropertyChangeListener implements IPropertyChangeListener
Inner Class :class ActivationCodeTrigger implements VerifyKeyListener
Inner Class :static class ActionActivationCode
Inner Class :class ActivationListener implements IPartListener,IWindowListener
Inner Class :interface ICursorListener extends MouseListener,KeyListener
Inner Class :final protected static class IdMapEntry
Inner Class :class ScrollLinesAction extends Action
Inner Class :class ToggleInsertModeAction extends ResourceAction
Inner Class :class ToggleOverwriteModeAction extends ResourceAction
Inner Class :protected class LineEndAction extends TextNavigationAction
Inner Class :protected class LineStartAction extends TextNavigationAction
Inner Class :class ShowRulerContextMenuAction extends Action
Inner Class :class SelectionProvider implements IPostSelectionProvider,ISelectionValidator
Inner Class :abstract protected class AbstractSelectionChangedListener implements ISelectionChangedListener
Inner Class :protected static class ColumnSupport implements IColumnSupport
Inner Class :protected static class TextEditorSavable extends Saveable

Field Summary
final protected static  IdMapEntry[]ACTION_MAP
     The complete mapping between action definition IDs used by eclipse and StyledText actions.
final public static  StringDEFAULT_EDITOR_CONTEXT_MENU_ID
     Menu id for the editor context menu.
final public static  StringDEFAULT_RULER_CONTEXT_MENU_ID
     Menu id for the ruler context menu.
final public static  StringPREFERENCE_COLOR_BACKGROUND
     Key used to look up background color preference.
final public static  StringPREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT
     Key used to look up background color system default preference.
final public static  StringPREFERENCE_COLOR_FIND_SCOPE
     Key used to look up find scope background color preference.
final public static  StringPREFERENCE_COLOR_FOREGROUND
     Key used to look up foreground color preference.
final public static  StringPREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT
     Key used to look up foreground color system default preference.
final public static  StringPREFERENCE_COLOR_SELECTION_BACKGROUND
     Key used to look up selection background color preference.
final public static  StringPREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT
     Key used to look up selection background color system default preference.
final public static  StringPREFERENCE_COLOR_SELECTION_FOREGROUND
     Key used to look up selection foreground color preference.
final public static  StringPREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT
     Key used to look up selection foreground color system default preference.
final public static  StringPREFERENCE_FONT
     Key used to look up font preference.
final public static  StringPREFERENCE_HYPERLINKS_ENABLED
     A named preference that controls if hyperlinks are turned on or off.
final public static  StringPREFERENCE_HYPERLINK_KEY_MODIFIER
     A named preference that controls the key modifier for hyperlinks.
final public static  StringPREFERENCE_HYPERLINK_KEY_MODIFIER_MASK
     A named preference that controls the key modifier mask for hyperlinks.
final public static  StringPREFERENCE_NAVIGATION_SMART_HOME_END
     Key used to look up smart home/end preference.
final public static  StringPREFERENCE_RULER_CONTRIBUTIONS
     A named preference that controls the visible ruler column contributions.
final public static  StringPREFERENCE_SHOW_WHITESPACE_CHARACTERS
     A named preference that controls the display of whitespace characters.
final public static  StringPREFERENCE_TEXT_DRAG_AND_DROP_ENABLED
     A named preference that controls whether text drag and drop is enabled.
final public static  StringPREFERENCE_USE_CUSTOM_CARETS
     Key used to look up the custom caret preference.
final public static  StringPREFERENCE_WIDE_CARET
     Key used to look up the caret width preference.
final protected static  StringTAG_SELECTION_LENGTH
    
final protected static  StringTAG_SELECTION_OFFSET
     Tags used in the IMemento when saving and restoring editor state.
final protected static  intVERTICAL_RULER_WIDTH
     The width of the vertical ruler.
final protected  StringfErrorLabel
     The error message shown in the status line in case of failed information look up.

Constructor Summary
protected  AbstractTextEditor()
     Creates a new text editor.

Method Summary
final protected  voidaddAction(IMenuManager menu, String actionId)
     Convenience method to add the action installed under the given action id to the given menu.
final protected  voidaddAction(IMenuManager menu, String group, String actionId)
     Convenience method to add the action installed under the given action id to the specified group of the menu.
final protected  voidaddGroup(IMenuManager menu, String existingGroup, String newGroup)
     Convenience method to add a new group after the specified group.
public  voidaddRulerContextMenuListener(IMenuListener listener)
    
protected  voidadjustHighlightRange(int offset, int length)
     Adjusts the highlight range so that at least the specified range is highlighted.
protected  booleanaffectsTextPresentation(PropertyChangeEvent event)
     Determines whether the given preference change affects the editor's presentation.
protected  booleancanHandleMove(IEditorInput originalElement, IEditorInput movedElement)
     Returns whether this editor can handle the move of the original element so that it ends up being the moved element.
public  voidclose(boolean save)
    
protected  voidconfigureInsertMode(InsertMode mode, boolean legal)
     Configures the given insert mode as legal or illegal.
protected  booleancontainsSavedState(IMemento memento)
    
protected  voidcreateActions()
     Creates this editor's standard actions and connects them with the global workbench actions.
protected  IColumnSupportcreateColumnSupport()
     Creates the column support to be used by this editor to manage the contributed ruler columns. Subclasses may re-implement this method using the ColumnSupport , e.g.
public  INavigationLocationcreateEmptyNavigationLocation()
    
protected  voidcreateNavigationActions()
     Creates action entries for all SWT StyledText actions as defined in org.eclipse.swt.custom.ST.
public  INavigationLocationcreateNavigationLocation()
    
public  voidcreatePartControl(Composite parent)
     The AbstractTextEditor implementation of this IWorkbenchPart method creates the vertical ruler and source viewer.

Subclasses may extend this method.

protected  ISourceViewercreateSourceViewer(Composite parent, IVerticalRuler ruler, int styles)
     Creates the source viewer to be used by this editor.
protected  voidcreateUndoRedoActions()
     Creates this editor's undo/redo actions.
protected  IVerticalRulercreateVerticalRuler()
     Creates the vertical ruler to be used by this editor.
public  voiddispose()
     The AbstractTextEditor implementation of this IWorkbenchPart method may be extended by subclasses.
protected  voiddisposeDocumentProvider()
     Disposes of the connection with the document provider.
protected  ISelectiondoGetSelection()
     Returns the current selection.
protected  voiddoRestoreState(IMemento memento)
     Restores this editor's state using the given memento.
public  voiddoRevertToSaved()
     The AbstractTextEditor implementation of this ITextEditor method may be extended by subclasses.
public  voiddoSave(IProgressMonitor progressMonitor)
     The AbstractTextEditor implementation of this IEditorPart method may be extended by subclasses.
public  voiddoSaveAs()
     The AbstractTextEditor implementation of this IEditorPart method calls performSaveAs.
protected  voiddoSetInput(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  voiddoSetSelection(ISelection selection)
     Sets the given selection.
protected  voideditorContextMenuAboutToShow(IMenuManager menu)
     Sets up this editor's context menu before it is made visible.
protected  voideditorSaved()
     Hook which gets called when the editor has been saved.
protected  voidenableOverwriteMode(boolean enable)
     Sets the overwrite mode enablement.
protected  voidenableSanityChecking(boolean enable)
     Enables/disables sanity checking.
protected  voidenableStateValidation(boolean enable)
     Enables/disables state validation.
protected  AnnotationfindAnnotation(int offset, int length, boolean forward, Position annotationPosition)
     Returns the annotation closest to the given range respecting the given direction.
protected  voidfirePropertyChange(int property)
    
public  IActiongetAction(String actionID)
    
public  Saveable[]getActiveSaveables()
    
public  ObjectgetAdapter(Class required)
    
final protected  IMenuListenergetContextMenuListener()
     Creates and returns the listener on this editor's context menus.
final protected static  IRegiongetCoverage(ISourceViewer viewer)
     Returns the minimal region of the given source viewer's document that completely comprises everything that is visible in the viewer's widget.
final protected  ICursorListenergetCursorListener()
     Returns this editor's "cursor" listener to be installed on the editor's source viewer.
protected  StringgetCursorPosition()
     Returns a description of the cursor position.
public  IDocumentProvidergetDocumentProvider()
    
final protected  StringgetEditorContextMenuId()
     Returns the editor's context menu id.
final protected  StringgetFontPropertyPreferenceKey()
     Returns the property preference key for the editor font.
final protected  StringgetHelpContextId()
     Returns the editor's help context id or null if none has been set.
public  IRegiongetHighlightRange()
    
public  InsertModegetInsertMode()
    
protected  ListgetLegalInsertModes()
     Returns the set of legal insert modes.
final protected  IPreferenceStoregetPreferenceStore()
     Returns this editor's preference store or null if none has been set.
protected  IProgressMonitorgetProgressMonitor()
     Returns the progress monitor related to this editor.
final protected  AnnotationgetRangeIndicator()
     Returns the editor's range indicator.
final protected  StringgetRulerContextMenuId()
     Returns the ruler's context menu id.
final protected  MouseListenergetRulerMouseListener()
     Creates and returns the listener on this editor's vertical ruler.
public  Saveable[]getSaveables()
    
final protected  ISelectionChangedListenergetSelectionChangedListener()
     Returns this editor's selection changed listener to be installed on the editor's source viewer.
public  ISelectionProvidergetSelectionProvider()
    

Returns null after disposal.

final protected  ISourceViewergetSourceViewer()
     Returns the editor's source viewer.
final protected  SourceViewerConfigurationgetSourceViewerConfiguration()
     Returns the editor's source viewer configuration.
protected  IStatusFieldgetStatusField(String category)
     Returns the current status field for the given status category.
protected  IStatusLineManagergetStatusLineManager()
     Returns the status line manager of this editor.
protected  IOperationApprovergetUndoRedoOperationApprover(IUndoContext undoContext)
     Return an IOperationApprover appropriate for approving the undo and redo of operations that have the specified undo context.
final protected  IVerticalRulergetVerticalRuler()
     Returns the editor's vertical ruler.
public  AnnotationgotoAnnotation(boolean forward)
     Jumps to the next annotation according to the given direction.
protected  voidhandleCursorPositionChanged()
     Handles a potential change of the cursor position.
protected  voidhandleEditorInputChanged()
     Handles an external change of the editor's input element.
protected  voidhandleElementContentReplaced()
     Performs any additional action necessary to perform after the input document's content has been replaced.
protected  voidhandleExceptionOnSave(CoreException exception, IProgressMonitor progressMonitor)
     Handles the given exception.
protected  voidhandleInsertModeChanged()
     Handles a change of the editor's insert mode.
protected  voidhandlePreferenceStoreChanged(PropertyChangeEvent event)
     Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.
public  voidinit(IEditorSite site, IEditorInput input)
    
protected  voidinitializeDragAndDrop(ISourceViewer viewer)
     Initializes the drag and drop support for the given viewer based on provided editor adapter for drop target listeners.
protected  voidinitializeViewerColors(ISourceViewer viewer)
     Initializes the fore- and background colors of the given viewer for both normal and selected text.
protected  voidinstallTabsToSpacesConverter()
     Installs a tabs to spaces converter.
protected  voidinstallTextDragAndDrop(ISourceViewer viewer)
     Installs text drag and drop on the given source viewer.
final protected  voidinternalInit(IWorkbenchWindow window, IEditorSite site, IEditorInput input)
     Implements the init method of IEditorPart.
public  booleanisChangeInformationShowing()
    
public  booleanisDirty()
    
public  booleanisEditable()
    
protected  booleanisEditorInputIncludedInContextMenu()
     Tells whether the editor input should be included when adding object contributions to this editor's context menu.
public  booleanisEditorInputModifiable()
    
public  booleanisEditorInputReadOnly()
    
protected  booleanisInInsertMode()
     Returns whether this editor is in overwrite or insert mode.
protected  booleanisNavigationTarget(Annotation annotation)
     Returns whether the given annotation is configured as a target for the "Go to Next/Previous Annotation" actions.
public  booleanisSaveAsAllowed()
     The AbstractTextEditor implementation of this IEditorPart method returns false.
protected  booleanisTabsToSpacesConversionEnabled()
     Tells whether tabs should be converted to spaces while editing inside this editor.
final protected static  booleanisVisible(ISourceViewer viewer, int offset, int length)
     Tells whether the given region is visible in the given source viewer.
public  voidmarkAsContentDependentAction(String actionId, boolean mark)
     Marks or unmarks the given action to be updated on content changes.
public  voidmarkAsPropertyDependentAction(String actionId, boolean mark)
     Marks or unmarks the given action to be updated on property changes.
public  voidmarkAsSelectionDependentAction(String actionId, boolean mark)
     Marks or unmarks the given action to be updated on text selection changes.
public  voidmarkAsStateDependentAction(String actionId, boolean mark)
     Marks or unmarks the given action to be updated on state changes.
protected  voidmarkInNavigationHistory()
     Writes a check mark of the given situation into the navigation history.
final protected static  intmodelOffset2WidgetOffset(ISourceViewer viewer, int modelOffset)
     Returns the offset of the given source viewer's text widget that corresponds to the given model offset or -1 if there is no such offset.
protected  voidopenSaveErrorDialog(String title, String message, CoreException exception)
     Presents an error dialog to the user when a problem happens during save.
protected  voidperformRevert()
     Performs revert and handles errors appropriately.
protected  voidperformSave(boolean overwrite, IProgressMonitor progressMonitor)
     Performs the save and handles errors appropriately.
protected  voidperformSaveAs(IProgressMonitor progressMonitor)
     Performs a save as and reports the result state back to the given progress monitor.
protected  voidrememberSelection()
     Remembers the current selection of this editor.
public  voidremoveActionActivationCode(String actionID)
    
public  voidremoveRulerContextMenuListener(IMenuListener listener)
    
public  voidresetHighlightRange()
    
protected  voidrestoreSelection()
     Restores a selection previously remembered by rememberSelection. Subclasses may reimplement this method and thereby semantically adapt the remembered selection.
public  voidrestoreState(IMemento memento)
    
protected  voidrulerContextMenuAboutToShow(IMenuManager menu)
     Sets up the ruler context menu before it is made visible.
protected  voidsafelySanityCheckState(IEditorInput input)
     Checks the state of the given editor input if sanity checking is enabled.
protected  voidsanityCheckState(IEditorInput input)
     Checks the state of the given editor input.
public  voidsaveState(IMemento memento)
    
public  voidselectAndReveal(int start, int length)
    
protected  voidselectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength)
     Selects and reveals the specified ranges in this text editor.
public  voidsetAction(String actionID, IAction action)
    
public  voidsetActionActivationCode(String actionID, char activationCharacter, int activationKeyCode, int activationStateMask)
    
final protected  voidsetCompatibilityMode(boolean compatible)
     Sets the context menu registration 1.0 compatibility mode.
protected  voidsetDocumentProvider(IDocumentProvider provider)
     Sets this editor's document provider.
protected  voidsetDocumentProvider(IEditorInput input)
     Hook method for setting the document provider for the given input. This default implementation does nothing.
protected  voidsetEditorContextMenuId(String contextMenuId)
     Sets this editor's context menu id.
public  voidsetFocus()
    
protected  voidsetHelpContextId(String helpContextId)
     Sets the editor's help context id.
public  voidsetHighlightRange(int offset, int length, boolean moveCursor)
    
final public  voidsetInput(IEditorInput input)
    
final protected  voidsetInputWithNotify(IEditorInput input)
    
public  voidsetInsertMode(InsertMode newMode)
    
protected  voidsetKeyBindingScopes(String[] scopes)
     Sets the key binding scopes for this editor.
protected  voidsetPreferenceStore(IPreferenceStore store)
     Sets this editor's preference store.
protected  voidsetRangeIndicator(Annotation rangeIndicator)
     Sets the annotation which this editor uses to represent the highlight range if the editor is configured to show the entire document.
protected  voidsetRulerContextMenuId(String contextMenuId)
     Sets the ruler's context menu id.
protected  voidsetSourceViewerConfiguration(SourceViewerConfiguration configuration)
     Sets this editor's source viewer configuration used to configure its internal source viewer.
public  voidsetStatusField(IStatusField field, String category)
    
protected  voidsetStatusLineErrorMessage(String message)
     Sets the given message as error message to this editor's status line.
protected  voidsetStatusLineMessage(String message)
     Sets the given message as message to this editor's status line.
public  voidshowChangeInformation(boolean show)
    
public  voidshowHighlightRangeOnly(boolean showHighlightRangeOnly)
    
public  voidshowRevisionInformation(RevisionInformation info, String quickDiffProviderId)
    
public  booleanshowsHighlightRangeOnly()
    
protected  voiduninstallTabsToSpacesConverter()
     Installs a tabs to spaces converter.
protected  voiduninstallTextDragAndDrop(ISourceViewer viewer)
     Uninstalls text drag and drop from the given source viewer.
protected  voidupdateContentDependentActions()
     Updates all content dependent actions.
protected  voidupdateContributedRulerColumns(CompositeRuler ruler)
     Adds enabled ruler contributions to the vertical ruler.
final protected  voidupdateIndentPrefixes()
     Updates the source viewer's indent prefixes with the values provided by the source viewer configuration.
protected  voidupdatePropertyDependentActions()
     Updates all property dependent actions.
protected  voidupdateSelectionDependentActions()
     Updates all selection dependent actions.
protected  voidupdateState(IEditorInput input)
     Updates the state of the given editor input such as read-only flag.
protected  voidupdateStateDependentActions()
     Updates all state dependent actions.
protected  voidupdateStatusField(String category)
     Updates the status fields for the given category.
protected  voidupdateStatusFields()
     Updates all status fields.
public  booleanvalidateEditorInputState()
    
protected  voidvalidateState(IEditorInput input)
     Validates the state of the given editor input.
final protected static  intwidgetOffset2ModelOffset(ISourceViewer viewer, int widgetOffset)
     Returns the offset of the given source viewer's document that corresponds to the given widget offset or -1 if there is no such offset.

Field Detail
ACTION_MAP
final protected static IdMapEntry[] ACTION_MAP(Code)
The complete mapping between action definition IDs used by eclipse and StyledText actions.
since:
   2.0



DEFAULT_EDITOR_CONTEXT_MENU_ID
final public static String DEFAULT_EDITOR_CONTEXT_MENU_ID(Code)
Menu id for the editor context menu.



DEFAULT_RULER_CONTEXT_MENU_ID
final public static String DEFAULT_RULER_CONTEXT_MENU_ID(Code)
Menu id for the ruler context menu.



PREFERENCE_COLOR_BACKGROUND
final public static String PREFERENCE_COLOR_BACKGROUND(Code)
Key used to look up background color preference. Value: AbstractTextEditor.Color.Background
since:
   2.0



PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT
final public static String PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAULT(Code)
Key used to look up background color system default preference. Value: AbstractTextEditor.Color.Background.SystemDefault
since:
   2.0



PREFERENCE_COLOR_FIND_SCOPE
final public static String PREFERENCE_COLOR_FIND_SCOPE(Code)
Key used to look up find scope background color preference. Value: AbstractTextEditor.Color.FindScope
since:
   2.0



PREFERENCE_COLOR_FOREGROUND
final public static String PREFERENCE_COLOR_FOREGROUND(Code)
Key used to look up foreground color preference. Value: AbstractTextEditor.Color.Foreground
since:
   2.0



PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT
final public static String PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT(Code)
Key used to look up foreground color system default preference. Value: AbstractTextEditor.Color.Foreground.SystemDefault
since:
   2.0



PREFERENCE_COLOR_SELECTION_BACKGROUND
final public static String PREFERENCE_COLOR_SELECTION_BACKGROUND(Code)
Key used to look up selection background color preference. Value: AbstractTextEditor.Color.SelectionBackground
since:
   3.0



PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT
final public static String PREFERENCE_COLOR_SELECTION_BACKGROUND_SYSTEM_DEFAULT(Code)
Key used to look up selection background color system default preference. Value: AbstractTextEditor.Color.SelectionBackground.SystemDefault
since:
   3.0



PREFERENCE_COLOR_SELECTION_FOREGROUND
final public static String PREFERENCE_COLOR_SELECTION_FOREGROUND(Code)
Key used to look up selection foreground color preference. Value: AbstractTextEditor.Color.SelectionForeground
since:
   3.0



PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT
final public static String PREFERENCE_COLOR_SELECTION_FOREGROUND_SYSTEM_DEFAULT(Code)
Key used to look up selection foreground color system default preference. Value: AbstractTextEditor.Color.SelectionForeground.SystemDefault
since:
   3.0



PREFERENCE_FONT
final public static String PREFERENCE_FONT(Code)
Key used to look up font preference. Value: "org.eclipse.jface.textfont" JFaceResources.TEXT_FONT



PREFERENCE_HYPERLINKS_ENABLED
final public static String PREFERENCE_HYPERLINKS_ENABLED(Code)
A named preference that controls if hyperlinks are turned on or off.

Value is of type Boolean.


since:
   3.1



PREFERENCE_HYPERLINK_KEY_MODIFIER
final public static String PREFERENCE_HYPERLINK_KEY_MODIFIER(Code)
A named preference that controls the key modifier for hyperlinks.

Value is of type String.


since:
   3.1



PREFERENCE_HYPERLINK_KEY_MODIFIER_MASK
final public static String PREFERENCE_HYPERLINK_KEY_MODIFIER_MASK(Code)
A named preference that controls the key modifier mask for hyperlinks. The value is only used if the value of PREFERENCE_HYPERLINK_KEY_MODIFIER cannot be resolved to valid SWT modifier bits.

Value is of type String.


See Also:   AbstractTextEditor.PREFERENCE_HYPERLINK_KEY_MODIFIER
since:
   3.1



PREFERENCE_NAVIGATION_SMART_HOME_END
final public static String PREFERENCE_NAVIGATION_SMART_HOME_END(Code)
Key used to look up smart home/end preference. Value: AbstractTextEditor.Navigation.SmartHomeEnd
since:
   2.1



PREFERENCE_RULER_CONTRIBUTIONS
final public static String PREFERENCE_RULER_CONTRIBUTIONS(Code)
A named preference that controls the visible ruler column contributions.

Value is of type String and should be read using a RulerColumnPreferenceAdapter .


since:
   3.3



PREFERENCE_SHOW_WHITESPACE_CHARACTERS
final public static String PREFERENCE_SHOW_WHITESPACE_CHARACTERS(Code)
A named preference that controls the display of whitespace characters.

Value is of type Boolean.


since:
   3.3



PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED
final public static String PREFERENCE_TEXT_DRAG_AND_DROP_ENABLED(Code)
A named preference that controls whether text drag and drop is enabled.

Value is of type Boolean.


since:
   3.3



PREFERENCE_USE_CUSTOM_CARETS
final public static String PREFERENCE_USE_CUSTOM_CARETS(Code)
Key used to look up the custom caret preference. Value:
since:
   3.0



PREFERENCE_WIDE_CARET
final public static String PREFERENCE_WIDE_CARET(Code)
Key used to look up the caret width preference. Value:
since:
   3.0



TAG_SELECTION_LENGTH
final protected static String TAG_SELECTION_LENGTH(Code)



TAG_SELECTION_OFFSET
final protected static String TAG_SELECTION_OFFSET(Code)
Tags used in the IMemento when saving and restoring editor state.
See Also:   AbstractTextEditor.saveState(IMemento)
See Also:   AbstractTextEditor.restoreState(IMemento)
since:
   3.3



VERTICAL_RULER_WIDTH
final protected static int VERTICAL_RULER_WIDTH(Code)
The width of the vertical ruler.



fErrorLabel
final protected String fErrorLabel(Code)
The error message shown in the status line in case of failed information look up.




Constructor Detail
AbstractTextEditor
protected AbstractTextEditor()(Code)
Creates a new text editor. If not explicitly set, this editor uses a SourceViewerConfiguration to configure its source viewer. This viewer does not have a range indicator installed, nor any menu id set. By default, the created editor runs in 1.0 context menu registration compatibility mode.




Method Detail
addAction
final protected void addAction(IMenuManager menu, String actionId)(Code)
Convenience method to add the action installed under the given action id to the given menu.
Parameters:
  menu - the menu to add the action to
Parameters:
  actionId - the id of the action to be added



addAction
final protected void addAction(IMenuManager menu, String group, String actionId)(Code)
Convenience method to add the action installed under the given action id to the specified group of the menu.
Parameters:
  menu - the menu to add the action to
Parameters:
  group - the group in the menu
Parameters:
  actionId - the id of the action to add



addGroup
final protected void addGroup(IMenuManager menu, String existingGroup, String newGroup)(Code)
Convenience method to add a new group after the specified group.
Parameters:
  menu - the menu to add the new group to
Parameters:
  existingGroup - the group after which to insert the new group
Parameters:
  newGroup - the new group



addRulerContextMenuListener
public void addRulerContextMenuListener(IMenuListener listener)(Code)



adjustHighlightRange
protected void adjustHighlightRange(int offset, int length)(Code)
Adjusts the highlight range so that at least the specified range is highlighted.

Subclasses may re-implement this method.


Parameters:
  offset - the offset of the range which at least should be highlighted
Parameters:
  length - the length of the range which at least should be highlighted



affectsTextPresentation
protected boolean affectsTextPresentation(PropertyChangeEvent event)(Code)
Determines whether the given preference change affects the editor's presentation. This implementation always returns false. May be reimplemented by subclasses.
Parameters:
  event - the event which should be investigated true if the event describes a preference change affecting the editor's presentation
since:
   2.0



canHandleMove
protected boolean canHandleMove(IEditorInput originalElement, IEditorInput movedElement)(Code)
Returns whether this editor can handle the move of the original element so that it ends up being the moved element. By default this method returns true. Subclasses may reimplement.
Parameters:
  originalElement - the original element
Parameters:
  movedElement - the moved element whether this editor can handle the move of the original elementso that it ends up being the moved element
since:
   2.0



close
public void close(boolean save)(Code)



configureInsertMode
protected void configureInsertMode(InsertMode mode, boolean legal)(Code)
Configures the given insert mode as legal or illegal. This call is ignored if the set of legal input modes would be empty after the call.
Parameters:
  mode - the insert mode to be configured
Parameters:
  legal - true if the given mode is legal, false otherwise
since:
   3.0



containsSavedState
protected boolean containsSavedState(IMemento memento)(Code)
Returns whether the given memento contains saved state

Subclasses may extend or override this method.


Parameters:
  memento - the saved state of this editor true if the given memento contains saved state
since:
   3.3



createActions
protected void createActions()(Code)
Creates this editor's standard actions and connects them with the global workbench actions.

Subclasses may extend.




createColumnSupport
protected IColumnSupport createColumnSupport()(Code)
Creates the column support to be used by this editor to manage the contributed ruler columns. Subclasses may re-implement this method using the ColumnSupport , e.g. by returning new ColumnSupport(this, RulerColumnRegistry.getDefault());.

Note: If you override this method to provide column support you will also need to override AbstractTextEditor.createVerticalRuler() to return a CompositeRuler .

Out of the box this class does not install this support and hence this implementation always returns null.

the column support or null if none
since:
   3.3



createEmptyNavigationLocation
public INavigationLocation createEmptyNavigationLocation()(Code)



createNavigationActions
protected void createNavigationActions()(Code)
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.


since:
   2.0



createNavigationLocation
public INavigationLocation createNavigationLocation()(Code)



createPartControl
public void createPartControl(Composite parent)(Code)
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:

  • to supply a custom source viewer configuration,
  • to provide a range indicator,
  • to provide a help context id,
  • to set a custom context menu id,
  • to set a custom ruler context menu id.

Subclasses may replace the following methods called from within createPartControl:
  • to supply a custom vertical ruler,
  • to supply a custom source viewer,
  • to supply a custom selection provider.

Subclasses may extend the following methods called from within createPartControl:
  • to customize the viewer color scheme (may also be replaced),
  • to customize drag and drop (may also be replaced),
  • to add navigation actions,
  • to add text editor actions.


Parameters:
  parent - the parent composite



createSourceViewer
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles)(Code)
Creates the source viewer to be used by this editor. Subclasses may re-implement this method.
Parameters:
  parent - the parent control
Parameters:
  ruler - the vertical ruler
Parameters:
  styles - style bits, SWT.WRAP is currently not supported the source viewer



createUndoRedoActions
protected void createUndoRedoActions()(Code)
Creates this editor's undo/redo actions.

Subclasses may override or extend.


since:
   3.1



createVerticalRuler
protected IVerticalRuler createVerticalRuler()(Code)
Creates the vertical ruler to be used by this editor. Subclasses may re-implement this method. the vertical ruler



dispose
public void dispose()(Code)
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.




disposeDocumentProvider
protected void disposeDocumentProvider()(Code)
Disposes of the connection with the document provider. Subclasses may extend.
since:
   3.0



doGetSelection
protected ISelection doGetSelection()(Code)
Returns the current selection. ISelection
since:
   2.1



doRestoreState
protected void doRestoreState(IMemento memento)(Code)
Restores this editor's state using the given memento.

Subclasses may extend or override this method.


Parameters:
  memento - the saved state of this editor
since:
   3.3



doRevertToSaved
public void doRevertToSaved()(Code)
The AbstractTextEditor implementation of this ITextEditor method may be extended by subclasses.



doSave
public void doSave(IProgressMonitor progressMonitor)(Code)
The AbstractTextEditor implementation of this IEditorPart method may be extended by subclasses.
Parameters:
  progressMonitor - the progress monitor for communicating result state or null



doSaveAs
public void doSaveAs()(Code)
The AbstractTextEditor implementation of this IEditorPart method calls performSaveAs. Subclasses may reimplement.



doSetInput
protected void doSetInput(IEditorInput input) throws CoreException(Code)
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.


Parameters:
  input - the input to be set
exception:
  CoreException - if input cannot be connected to the documentprovider



doSetSelection
protected void doSetSelection(ISelection selection)(Code)
Sets the given selection.
Parameters:
  selection -
since:
   2.1



editorContextMenuAboutToShow
protected void editorContextMenuAboutToShow(IMenuManager menu)(Code)
Sets up this editor's context menu before it is made visible.

Subclasses may extend to add other actions.


Parameters:
  menu - the menu



editorSaved
protected void editorSaved()(Code)
Hook which gets called when the editor has been saved. Subclasses may extend.
since:
   2.1



enableOverwriteMode
protected void enableOverwriteMode(boolean enable)(Code)
Sets the overwrite mode enablement.
Parameters:
  enable - true to enable new overwrite mode,false to disable
since:
   3.0



enableSanityChecking
protected void enableSanityChecking(boolean enable)(Code)
Enables/disables sanity checking.
Parameters:
  enable - true if sanity checking should be enabled, false otherwise
since:
   2.0



enableStateValidation
protected void enableStateValidation(boolean enable)(Code)
Enables/disables state validation.
Parameters:
  enable - true if state validation should be enabled, false otherwise
since:
   2.1



findAnnotation
protected Annotation findAnnotation(int offset, int length, boolean forward, Position annotationPosition)(Code)
Returns the annotation closest to the given range respecting the given direction. If an annotation is found, the annotations current position is copied into the provided annotation position.
Parameters:
  offset - the region offset
Parameters:
  length - the region length
Parameters:
  forward - true for forwards, false for backward
Parameters:
  annotationPosition - the position of the found annotation the found annotation
since:
   3.2



firePropertyChange
protected void firePropertyChange(int property)(Code)



getAction
public IAction getAction(String actionID)(Code)



getActiveSaveables
public Saveable[] getActiveSaveables()(Code)



getAdapter
public Object getAdapter(Class required)(Code)



getContextMenuListener
final protected IMenuListener getContextMenuListener()(Code)
Creates and returns the listener on this editor's context menus. the menu listener



getCoverage
final protected static IRegion getCoverage(ISourceViewer viewer)(Code)
Returns the minimal region of the given source viewer's document that completely comprises everything that is visible in the viewer's widget.
Parameters:
  viewer - the viewer go return the coverage for the minimal region of the source viewer's document comprising the contents of the viewer's widget
since:
   2.1



getCursorListener
final protected ICursorListener getCursorListener()(Code)
Returns this editor's "cursor" listener to be installed on the editor's source viewer. This listener is listening to key and mouse button events. It triggers the updating of the status line by calling handleCursorPositionChanged(). the listener
since:
   2.0



getCursorPosition
protected String getCursorPosition()(Code)
Returns a description of the cursor position. a description of the cursor position
since:
   2.0



getDocumentProvider
public IDocumentProvider getDocumentProvider()(Code)



getEditorContextMenuId
final protected String getEditorContextMenuId()(Code)
Returns the editor's context menu id. May return null before the editor's part has been created. the editor's context menu id which may be null



getFontPropertyPreferenceKey
final protected String getFontPropertyPreferenceKey()(Code)
Returns the property preference key for the editor font. Subclasses may replace this method. a String with the key
since:
   2.1



getHelpContextId
final protected String getHelpContextId()(Code)
Returns the editor's help context id or null if none has been set. the editor's help context id which may be null



getHighlightRange
public IRegion getHighlightRange()(Code)



getInsertMode
public InsertMode getInsertMode()(Code)



getLegalInsertModes
protected List getLegalInsertModes()(Code)
Returns the set of legal insert modes. If insert modes are configured all defined insert modes are legal. the set of legal insert modes
since:
   3.0



getPreferenceStore
final protected IPreferenceStore getPreferenceStore()(Code)
Returns this editor's preference store or null if none has been set. this editor's preference store which may be null



getProgressMonitor
protected IProgressMonitor getProgressMonitor()(Code)
Returns the progress monitor related to this editor. It should not be necessary to extend this method. the progress monitor related to this editor
since:
   2.1



getRangeIndicator
final protected Annotation getRangeIndicator()(Code)
Returns the editor's range indicator. May return null if no range indicator is installed. the editor's range indicator which may be null



getRulerContextMenuId
final protected String getRulerContextMenuId()(Code)
Returns the ruler's context menu id. May return null before the editor's part has been created. the ruler's context menu id which may be null



getRulerMouseListener
final protected MouseListener getRulerMouseListener()(Code)
Creates and returns the listener on this editor's vertical ruler. the mouse listener



getSaveables
public Saveable[] getSaveables()(Code)



getSelectionChangedListener
final protected ISelectionChangedListener getSelectionChangedListener()(Code)
Returns this editor's selection changed listener to be installed on the editor's source viewer. the listener



getSelectionProvider
public ISelectionProvider getSelectionProvider()(Code)

Returns null after disposal.

the selection provider or null if the editor hasbeen disposed



getSourceViewer
final protected ISourceViewer getSourceViewer()(Code)
Returns the editor's source viewer. May return null before the editor's part has been created and after disposal. the editor's source viewer which may be null



getSourceViewerConfiguration
final protected SourceViewerConfiguration getSourceViewerConfiguration()(Code)
Returns the editor's source viewer configuration. May return null before the editor's part has been created and after disposal. the editor's source viewer configuration which may be null



getStatusField
protected IStatusField getStatusField(String category)(Code)
Returns the current status field for the given status category.
Parameters:
  category - the status category the current status field for the given status category
since:
   2.0



getStatusLineManager
protected IStatusLineManager getStatusLineManager()(Code)
Returns the status line manager of this editor. the status line manager of this editor
since:
   2.0, protected since 3.3



getUndoRedoOperationApprover
protected IOperationApprover getUndoRedoOperationApprover(IUndoContext undoContext)(Code)
Return an IOperationApprover appropriate for approving the undo and redo of operations that have the specified undo context.

Subclasses may override.


Parameters:
  undoContext - the IUndoContext of operations that should be examinedby the operation approver the IOperationApprover appropriate for approving undoand redo operations inside this editor, or null if noapproval is needed
since:
   3.1



getVerticalRuler
final protected IVerticalRuler getVerticalRuler()(Code)
Returns the editor's vertical ruler. May return null before the editor's part has been created and after disposal. the editor's vertical ruler which may be null



gotoAnnotation
public Annotation gotoAnnotation(boolean forward)(Code)
Jumps to the next annotation according to the given direction.
Parameters:
  forward - true if search direction is forward, false if backward the selected annotation or null if none
See Also:   AbstractTextEditor.isNavigationTarget(Annotation)
See Also:   AbstractTextEditor.findAnnotation(int,int,boolean,Position)
since:
   3.2



handleCursorPositionChanged
protected void handleCursorPositionChanged()(Code)
Handles a potential change of the cursor position. Subclasses may extend.
since:
   2.0



handleEditorInputChanged
protected void handleEditorInputChanged()(Code)
Handles an external change of the editor's input element. Subclasses may extend.



handleElementContentReplaced
protected void handleElementContentReplaced()(Code)
Performs any additional action necessary to perform after the input document's content has been replaced.

Clients may extended this method.
since:
   3.0




handleExceptionOnSave
protected void handleExceptionOnSave(CoreException exception, IProgressMonitor progressMonitor)(Code)
Handles the given exception. If the exception reports an out-of-sync situation, this is reported to the user. Otherwise, the exception is generically reported.
Parameters:
  exception - the exception to handle
Parameters:
  progressMonitor - the progress monitor



handleInsertModeChanged
protected void handleInsertModeChanged()(Code)
Handles a change of the editor's insert mode. Subclasses may extend.
since:
   2.0



handlePreferenceStoreChanged
protected void handlePreferenceStoreChanged(PropertyChangeEvent event)(Code)
Handles a property change event describing a change of the editor's preference store and updates the preference related editor properties.

Subclasses may extend.


Parameters:
  event - the property change event



init
public void init(IEditorSite site, IEditorInput input) throws PartInitException(Code)



initializeDragAndDrop
protected void initializeDragAndDrop(ISourceViewer viewer)(Code)
Initializes the drag and drop support for the given viewer based on provided editor adapter for drop target listeners.
Parameters:
  viewer - the viewer
since:
   3.0



initializeViewerColors
protected void initializeViewerColors(ISourceViewer viewer)(Code)
Initializes the fore- and background colors of the given viewer for both normal and selected text.
Parameters:
  viewer - the viewer to be initialized
since:
   2.0



installTabsToSpacesConverter
protected void installTabsToSpacesConverter()(Code)
Installs a tabs to spaces converter.

Subclasses may extend or override this method.


since:
   3.3



installTextDragAndDrop
protected void installTextDragAndDrop(ISourceViewer viewer)(Code)
Installs text drag and drop on the given source viewer.
Parameters:
  viewer - the viewer
since:
   3.3



internalInit
final protected void internalInit(IWorkbenchWindow window, IEditorSite site, IEditorInput input) throws PartInitException(Code)
Implements the init method of IEditorPart. Subclasses replacing init may choose to call this method in their implementation.
Parameters:
  window - the workbench window
Parameters:
  site - the editor's site
Parameters:
  input - the editor input for the editor being created
throws:
  PartInitException - if AbstractTextEditor.doSetInput(IEditorInput) fails or gets canceled
See Also:   org.eclipse.ui.IEditorPart.init(org.eclipse.ui.IEditorSiteorg.eclipse.ui.IEditorInput)
since:
   2.1



isChangeInformationShowing
public boolean isChangeInformationShowing()(Code)



isDirty
public boolean isDirty()(Code)



isEditable
public boolean isEditable()(Code)



isEditorInputIncludedInContextMenu
protected boolean isEditorInputIncludedInContextMenu()(Code)
Tells whether the editor input should be included when adding object contributions to this editor's context menu.

This implementation always returns true.

true if the editor input should be considered
since:
   3.2



isEditorInputModifiable
public boolean isEditorInputModifiable()(Code)



isEditorInputReadOnly
public boolean isEditorInputReadOnly()(Code)



isInInsertMode
protected boolean isInInsertMode()(Code)
Returns whether this editor is in overwrite or insert mode. true if in insert mode, false for overwrite mode
since:
   2.0



isNavigationTarget
protected boolean isNavigationTarget(Annotation annotation)(Code)
Returns whether the given annotation is configured as a target for the "Go to Next/Previous Annotation" actions.

Per default every annotation is a target.


Parameters:
  annotation - the annotation true if this is a target, false otherwise
since:
   3.2



isSaveAsAllowed
public boolean isSaveAsAllowed()(Code)
The AbstractTextEditor implementation of this IEditorPart method returns false. Subclasses may override. false



isTabsToSpacesConversionEnabled
protected boolean isTabsToSpacesConversionEnabled()(Code)
Tells whether tabs should be converted to spaces while editing inside this editor.

Subclasses may override this method.

true if tabs should be converted to spaces
since:
   3.3



isVisible
final protected static boolean isVisible(ISourceViewer viewer, int offset, int length)(Code)
Tells whether the given region is visible in the given source viewer.
Parameters:
  viewer - the source viewer
Parameters:
  offset - the offset of the region
Parameters:
  length - the length of the region true if visible
since:
   2.1



markAsContentDependentAction
public void markAsContentDependentAction(String actionId, boolean mark)(Code)
Marks or unmarks the given action to be updated on content changes.
Parameters:
  actionId - the action id
Parameters:
  mark - true if the action is content dependent



markAsPropertyDependentAction
public void markAsPropertyDependentAction(String actionId, boolean mark)(Code)
Marks or unmarks the given action to be updated on property changes.
Parameters:
  actionId - the action id
Parameters:
  mark - true if the action is property dependent
since:
   2.0



markAsSelectionDependentAction
public void markAsSelectionDependentAction(String actionId, boolean mark)(Code)
Marks or unmarks the given action to be updated on text selection changes.
Parameters:
  actionId - the action id
Parameters:
  mark - true if the action is selection dependent



markAsStateDependentAction
public void markAsStateDependentAction(String actionId, boolean mark)(Code)
Marks or unmarks the given action to be updated on state changes.
Parameters:
  actionId - the action id
Parameters:
  mark - true if the action is state dependent
since:
   2.0



markInNavigationHistory
protected void markInNavigationHistory()(Code)
Writes a check mark of the given situation into the navigation history.
since:
   2.1



modelOffset2WidgetOffset
final protected static int modelOffset2WidgetOffset(ISourceViewer viewer, int modelOffset)(Code)
Returns the offset of the given source viewer's text widget that corresponds to the given model offset or -1 if there is no such offset.
Parameters:
  viewer - the source viewer
Parameters:
  modelOffset - the model offset the corresponding offset in the source viewer's text widget or -1
since:
   3.0



openSaveErrorDialog
protected void openSaveErrorDialog(String title, String message, CoreException exception)(Code)
Presents an error dialog to the user when a problem happens during save.

Subclasses can decide to override the given title and message.


Parameters:
  title - the dialog title
Parameters:
  message - the message to display
Parameters:
  exception - the exception to handle
since:
   3.3



performRevert
protected void performRevert()(Code)
Performs revert and handles errors appropriately.

Subclasses may extend.


since:
   3.0



performSave
protected void performSave(boolean overwrite, IProgressMonitor progressMonitor)(Code)
Performs the save and handles errors appropriately.
Parameters:
  overwrite - indicates whether or not overwriting is allowed
Parameters:
  progressMonitor - the monitor in which to run the operation
since:
   3.0



performSaveAs
protected void performSaveAs(IProgressMonitor progressMonitor)(Code)
Performs a save as and reports the result state back to the given progress monitor. This default implementation does nothing. Subclasses may reimplement.
Parameters:
  progressMonitor - the progress monitor for communicating result state or null



rememberSelection
protected void rememberSelection()(Code)
Remembers the current selection of this editor. This method is called when, e.g., the content of the editor is about to be reverted to the saved state. This method remembers the selection in a semantic format, i.e., in a format which allows to restore the selection even if the originally selected text is no longer part of the editor's content.

Subclasses should implement this method including all necessary state. This default implementation remembers the textual range only and is thus purely syntactic.


See Also:   AbstractTextEditor.restoreSelection()
since:
   2.0



removeActionActivationCode
public void removeActionActivationCode(String actionID)(Code)



removeRulerContextMenuListener
public void removeRulerContextMenuListener(IMenuListener listener)(Code)



resetHighlightRange
public void resetHighlightRange()(Code)



restoreSelection
protected void restoreSelection()(Code)
Restores a selection previously remembered by rememberSelection. Subclasses may reimplement this method and thereby semantically adapt the remembered selection. This default implementation just selects the remembered textual range.
See Also:   AbstractTextEditor.rememberSelection()
since:
   2.0



restoreState
public void restoreState(IMemento memento)(Code)



rulerContextMenuAboutToShow
protected void rulerContextMenuAboutToShow(IMenuManager menu)(Code)
Sets up the ruler context menu before it is made visible.

Subclasses may extend to add other actions.


Parameters:
  menu - the menu



safelySanityCheckState
protected void safelySanityCheckState(IEditorInput input)(Code)
Checks the state of the given editor input if sanity checking is enabled.
Parameters:
  input - the editor input whose state is to be checked
since:
   2.0



sanityCheckState
protected void sanityCheckState(IEditorInput input)(Code)
Checks the state of the given editor input.
Parameters:
  input - the editor input whose state is to be checked
since:
   2.0



saveState
public void saveState(IMemento memento)(Code)



selectAndReveal
public void selectAndReveal(int start, int length)(Code)



selectAndReveal
protected void selectAndReveal(int selectionStart, int selectionLength, int revealStart, int revealLength)(Code)
Selects and reveals the specified ranges in this text editor.
Parameters:
  selectionStart - the offset of the selection
Parameters:
  selectionLength - the length of the selection
Parameters:
  revealStart - the offset of the revealed range
Parameters:
  revealLength - the length of the revealed range
since:
   3.0



setAction
public void setAction(String actionID, IAction action)(Code)



setActionActivationCode
public void setActionActivationCode(String actionID, char activationCharacter, int activationKeyCode, int activationStateMask)(Code)



setCompatibilityMode
final protected void setCompatibilityMode(boolean compatible)(Code)
Sets the context menu registration 1.0 compatibility mode. (See class description for more details.)
Parameters:
  compatible - true if compatibility mode is enabled
since:
   2.0



setDocumentProvider
protected void setDocumentProvider(IDocumentProvider provider)(Code)
Sets this editor's document provider. This method must be called before the editor's control is created.
Parameters:
  provider - the document provider



setDocumentProvider
protected void setDocumentProvider(IEditorInput input)(Code)
Hook method for setting the document provider for the given input. This default implementation does nothing. Clients may reimplement.
Parameters:
  input - the input of this editor.
since:
   3.0



setEditorContextMenuId
protected void setEditorContextMenuId(String contextMenuId)(Code)
Sets this editor's context menu id.
Parameters:
  contextMenuId - the context menu id



setFocus
public void setFocus()(Code)



setHelpContextId
protected void setHelpContextId(String helpContextId)(Code)
Sets the editor's help context id.
Parameters:
  helpContextId - the help context id



setHighlightRange
public void setHighlightRange(int offset, int length, boolean moveCursor)(Code)



setInput
final public void setInput(IEditorInput input)(Code)



setInputWithNotify
final protected void setInputWithNotify(IEditorInput input)(Code)



setInsertMode
public void setInsertMode(InsertMode newMode)(Code)



setKeyBindingScopes
protected void setKeyBindingScopes(String[] scopes)(Code)
Sets the key binding scopes for this editor.
Parameters:
  scopes - a non-empty array of key binding scope identifiers
since:
   2.1



setPreferenceStore
protected void setPreferenceStore(IPreferenceStore store)(Code)
Sets this editor's preference store. This method must be called before the editor's control is created.
Parameters:
  store - the preference store or null to remove thepreference store



setRangeIndicator
protected void setRangeIndicator(Annotation rangeIndicator)(Code)
Sets the annotation which this editor uses to represent the highlight range if the editor is configured to show the entire document. If the range indicator is not set, this editor will not show a range indication.
Parameters:
  rangeIndicator - the annotation



setRulerContextMenuId
protected void setRulerContextMenuId(String contextMenuId)(Code)
Sets the ruler's context menu id.
Parameters:
  contextMenuId - the context menu id



setSourceViewerConfiguration
protected void setSourceViewerConfiguration(SourceViewerConfiguration configuration)(Code)
Sets this editor's source viewer configuration used to configure its internal source viewer. This method must be called before the editor's control is created. If not, this editor uses a SourceViewerConfiguration.
Parameters:
  configuration - the source viewer configuration object



setStatusField
public void setStatusField(IStatusField field, String category)(Code)



setStatusLineErrorMessage
protected void setStatusLineErrorMessage(String message)(Code)
Sets the given message as error message to this editor's status line.
Parameters:
  message - message to be set
since:
   3.2



setStatusLineMessage
protected void setStatusLineMessage(String message)(Code)
Sets the given message as message to this editor's status line.
Parameters:
  message - message to be set
since:
   3.2



showChangeInformation
public void showChangeInformation(boolean show)(Code)



showHighlightRangeOnly
public void showHighlightRangeOnly(boolean showHighlightRangeOnly)(Code)



showRevisionInformation
public void showRevisionInformation(RevisionInformation info, String quickDiffProviderId)(Code)



showsHighlightRangeOnly
public boolean showsHighlightRangeOnly()(Code)



uninstallTabsToSpacesConverter
protected void uninstallTabsToSpacesConverter()(Code)
Installs a tabs to spaces converter.

Subclasses may extend or override this method.


since:
   3.3



uninstallTextDragAndDrop
protected void uninstallTextDragAndDrop(ISourceViewer viewer)(Code)
Uninstalls text drag and drop from the given source viewer.
Parameters:
  viewer - the viewer
since:
   3.3



updateContentDependentActions
protected void updateContentDependentActions()(Code)
Updates all content dependent actions.



updateContributedRulerColumns
protected void updateContributedRulerColumns(CompositeRuler ruler)(Code)
Adds enabled ruler contributions to the vertical ruler.

Clients may extend or replace.


Parameters:
  ruler - the composite ruler to add contributions to
since:
   3.3



updateIndentPrefixes
final protected void updateIndentPrefixes()(Code)
Updates the source viewer's indent prefixes with the values provided by the source viewer configuration.
since:
   3.3



updatePropertyDependentActions
protected void updatePropertyDependentActions()(Code)
Updates all property dependent actions.
since:
   2.0



updateSelectionDependentActions
protected void updateSelectionDependentActions()(Code)
Updates all selection dependent actions.



updateState
protected void updateState(IEditorInput input)(Code)
Updates the state of the given editor input such as read-only flag.
Parameters:
  input - the input to be validated
since:
   2.0



updateStateDependentActions
protected void updateStateDependentActions()(Code)
Updates all state dependent actions.
since:
   2.0



updateStatusField
protected void updateStatusField(String category)(Code)
Updates the status fields for the given category.
Parameters:
  category -
since:
   2.0



updateStatusFields
protected void updateStatusFields()(Code)
Updates all status fields.
since:
   2.0



validateEditorInputState
public boolean validateEditorInputState()(Code)



validateState
protected void validateState(IEditorInput input)(Code)
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.
Parameters:
  input - the input to be validated
since:
   2.0



widgetOffset2ModelOffset
final protected static int widgetOffset2ModelOffset(ISourceViewer viewer, int widgetOffset)(Code)
Returns the offset of the given source viewer's document that corresponds to the given widget offset or -1 if there is no such offset.
Parameters:
  viewer - the source viewer
Parameters:
  widgetOffset - the widget offset the corresponding offset in the source viewer's document or -1
since:
   2.1



Methods inherited from org.eclipse.ui.part.EditorPart
final protected void checkSite(IWorkbenchPartSite site)(Code)(Java Doc)
abstract public void doSave(IProgressMonitor monitor)(Code)(Java Doc)
abstract public void doSaveAs()(Code)(Java Doc)
public IEditorInput getEditorInput()(Code)(Java Doc)
public IEditorSite getEditorSite()(Code)(Java Doc)
public String getTitleToolTip()(Code)(Java Doc)
abstract public void init(IEditorSite site, IEditorInput input) throws PartInitException(Code)(Java Doc)
abstract public boolean isDirty()(Code)(Java Doc)
abstract public boolean isSaveAsAllowed()(Code)(Java Doc)
public boolean isSaveOnCloseNeeded()(Code)(Java Doc)
protected void setContentDescription(String description)(Code)(Java Doc)
public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data)(Code)(Java Doc)
protected void setInput(IEditorInput input)(Code)(Java Doc)
protected void setInputWithNotify(IEditorInput input)(Code)(Java Doc)
protected void setPartName(String partName)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.