# Eclipse Platform Build Notes

# Text Editor Support (including JFace Text)

Eclipse SDK Build 20020601

## Breaking API changes

## Other highlights

- Introduced the concept of setRedraw(boolean) on text viewers. See ITextViewerExtension.setRedraw(boolean). This allows to avoid any UI updating while manipulating the viewer's document. While redraw == false, the viewer selection is still available, i.e. setSelectedRange and getSelectedRange can be used and always refer to the actual state of the viewer's document. However, no selection change event and no view port changes are sent out. TextEvent (See ITextListener) has been extented to carry the viewer's redraw flag.
- Introduced the concept of a "sequential rewrite mode" on documents. See IDocumentExtension. This informs a document about an upcoming sequence of non-overlapping consecutive replace commands. If capable the document can use this information to operate on an optimized text store. In JFace Text, Document operates on a SequentialRewriteTextStore during this period.
- Reworked text shifting, line delimiter conversion, and find/replace to use the newly introduced concepts.
- Reworked the reactivation behavior of text hovers.
- Pushed text hover information computation in a background thread.
- Reactivated and extended the concept of widget token management. See IWidgetTokenOwner, IWidgetTokenKeeper.
- Extended text operations so that they can externally be enabled/disabled. See ITextOperationTargetExtension. Currently, this is only used for content assist in the source viewer. All other text operations ignore the enable flag.
- Improved incremental search behavior.
- Further code cleanup.

## Known deficiencies

## Problem reports closed

See bugzilla.

Eclipse SDK Build 20020517

## Breaking API changes

## Other highlights

- The ruler context menu action are initialized correctly when invoked over keyboard shortcut. (Ctrl+W)
- Added delete line actions ([Esc 0] Ctrl+K with emacs key bindings) to text editor
- Added support for setting/clearing/swapping a mark (emacs style selection)
- Code Cleanup

## Known deficiencies

## Problem reports closed

See bugzilla.

Eclipse SDK Build 20020514

## Breaking API changes

IVerticalRulerInfo.addMouseListener/removeMouseListener have been removed again. The vertical ruler now provides a control that shares its listeners with its children.

IDocumentProviderExtension.getStatus(Object element) returns an IStatus connected with the given element. The status can be used to relate any relevant kind of status information with an element for which a provider manages a document.

## Other highlights

Introduced a StatusTextEditor. The status text editor checks the status flag managed for its input element by the editor' document provider. If the status is not-OK, a different control is shown. By default an InfoForm is shown. Subclasses can change what is shown or subclass InfoForm.

StorageDocumentProvider and FileDocumentProvider honor the workbench's encoding settings. In addition, encoding support is provided by standard text editor. File can be viewed using different encodings. Save always uses the workbench's encoding setting. Custom editors can leverage the support by including the EncodingActionGroup into their menus. The encoding support uses the newly introduced status text editor.

Text hover timeout when typing has been improved. It's now always 1500ms.

## Known deficiencies

## Problem reports closed

See bugzilla.

Eclipse SDK Build 20020508

## Breaking API changes

## Other highlights

- The context menu of the vertical ruler can be opened with Ctrl+W when using the default key binding. Accelerator for the emac's key binding is still to be defined.
- Added support for composite vertical ruler. See CompositeVerticalRuler. A composite vertical ruler is configured with ruler columns. Two ruler columns are provided by default: AnnotationRulerColumn and LineNumberRulerColumn.
- Performance changes to the reconciling mechanism in JFace Text.
- Changes in handling read only files: All modifying text actions are disabled by default.

## Known deficiencies

## Problem reports closed

#15071 convert line delimiters - one os missing

Eclipse SDK Build 20020430

## Breaking API changes

## Other highlights

- Introduced the concepts of state dependent actions, i.e. actions which change their enabling state depending on whether the editor's input is read only or not.
- Added line delimiter conversion actions for DOS, UNIX and Mac.

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20020423

## Breaking API changes

## Other highlights

- Viewport clipping in the vertical ruler
- Improved painting of range indicator
- Fixed problem in position handling in AbstractDocument
- Improved handling of delete in GapTextStore
- Changes in partition parsing: Introduced the concept of a partition token scanner which can resume scanning in the middle of token range. The basic assumption is that partition delimiters don't contain line delimiters. Partition token scanners can be built with rules implementing IPredicateRule. A predicate rule can start evaluation between their start and end sequence. PatternRule has been adapted.

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20020418

## Breaking API changes

## Other highlights

- Added method undelete to Position.
- AbstractMarkerAnnotationModel better supports heterogenous sets of annotations.
- DefaultUndoManager causes selection changes when executing undo/redo to ensure correct enabling/disabling of selection dependent actions.

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20020411

## Breaking API changes

## Other highlights

- Enabled annotation models for more fine grained change notification

## Known deficiencies

## Problem reports closed

#13358 incremental find: displays little squares after you press 'delete'
#13283 Find/Replace: Close button too small
#13459 Typing tab with selection in middle of line shifts right

Eclipse SDK Build 20020409

## Breaking API changes

## Other highlights

- Added support for external contribution of ruler actions. I.e. plugins can contribute actions to the context menu of an editor's vertical ruler by specifying those actions in their plugin.xml file.
- In the default key binding Ctrl+ArrowUp and Ctrl+ArrowDown are bound to scroll a single line without moving the cursor.
- AnnotationModel is be used from several threads.
- TextViewer implements ITextViewerExtensions which supports the stacking of VerifyKeyListeners. A listener that is prepended to the list of verify key listeners can take over the control over all key strokes not bound as menu item accelerators.
- The scheme according to which an editor calls Workspace.validateEdit has been reworked.
- The editor hooks to the Revert action in the File menu.
- AbstractTextEditor supports property dependent actions similar to selection or content dependent actions.

## Known deficiencies

## Problem reports closed

#11215 Editor task creation actions should use TaskPropertiesDialog
# 9761 Line has to be selected from beginning when using the 'Tab'
#10806 call validateEdit() again before any further changes
#11480 READ/WRITE not updated on focus change
#12901 P2 Find/Replace should keep last selection highlighted

Eclipse SDK Build 20020402

## Breaking API changes

## Other highlights

- fixed a problem in the TextViewer's handleDipose method
- AbstractMarkerAnnotationModel can now deal with a heterogenous set of annotations

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20020326

## Breaking API changes

## Other highlights

- Enabled key binding support
- dialog-less incremental search (improvements)

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20020318

## Breaking API changes

## Other highlights

- All find operations can be limited to a scope using the find replace dialog. Multi-line selections serve as scope.
- Emacs-like incremental search (Ctrl-J) is now part of AbstractTextEditor.
- Preparations for key binding support

## Known deficiencies

## Problem reports closed

#2280 Undo does not jump to undone location (1GEK1G5)
#7381 Search results block hover help for problems
#7954 Content assist off the edge of the display
#10141 Shift Left/Right disabled unless selection is "full lines".
#11047 Index out of bounds on text hover
#11148 Syntax coloring lost on revert
#11377 Code assist leaks threads
#11433 NPE opening editor when some plugins disabled

Eclipse SDK Build 20020312

## Breaking API changes

## Other highlights

- All editors based on AbstractTextEditor now support Find Next and Find Previous. Both actions are selection aware, i.e. having a word selected when invoking Find Next searches for the next appearance of the selected word.
- A first cut of incremental search is implemented accessible via the Find/Replace dialog.

## Known deficiencies

## Problem reports closed

#5191 EC DCR: Add keyboard accelerator for "Find Next"
#5710 Emacs-like isearch (aka "incremental search")
#10489 Indention a template results in NPE
#2698 Opening Default Text Editor not showing right icon in the file tab (1GI7GK2)
#7954 Content assist off the edge of the display
#9964 nor P3 Syntax highlight and comments bug
#11047 nor P2 Index out of bounds on text hover

Eclipse SDK Build 20020305

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#8652 ctl-space doesn't wrk for content assist in Java editor when
#8910 @link-tag in Javadoc display broken
#9576 Method argument hints not as smart as code assist
#10315 Syntax highlighting glitch
#10422 Incorrect syntax highlighting for comments
#10721 Syntax highlighting lost in Java editor after replace with r

Eclipse SDK Build 20020212

## Breaking API changes

## Other highlights

- Added IContextInformationExtension to support context information positions not equal to completion position (related to #4366).
- Added preference store keys for system default background/foreground colors (related to #5811).
- Reworked handling of read-only resources and state changes of resources.

## Known deficiencies

## Problem reports closed

#2635 Find should remember last string if selection empty (1GHFMYL
#5380 Error hover doesn't appear
#7483 NPE during revert in Java editor
#2575 [JFace Text] BUG - org.eclipse.ui.texteditor inconsistency (1GGLRU6)
#5969 Find dialog placement needs improvement
#5811 Pref to set editor background color
#5819 Code formatter doesn't work well with else if on next line

Eclipse SDK Build 20020129

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#5819 Code formatter doesn't work well with else if on next line

Eclipse SDK Build 20020122

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#4324 EC: Find/replace gets stuck in infinite loop (1GLCBZE)
#3736 DCR: Go to line - would be nice to show valid range (1GEHSDX)

Eclipse SDK Build 20020115

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#4335 Find/Replace should come up with first history entry (1GEL5NS)
#4338 Find/change history is never pruned (1GHDUJW)
#4342 TextViewer.setTopIndex doesn't take horizontal scrollbar into account (1GIFYC7)
#4343 Text hidden inserted by code assist (1GJ9PGK)
#6701 Code assist: java hint not properly aligned
#6379 StatusLine 'Writeable' is not readable

Eclipse SDK Build 20020108

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#3833 Javadoc hover appears under code assist window (1GF0K3T)
#4363 Two Java Doc hovers

Eclipse SDK Build 20011218

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#1614 Current line in Debugger should start at center of source ed
#5000 Context menu IDs not fully qualified
#5959 Text editor: SEVERE - Revert should be undoable
#6075 NPE while editing in compare view
#6318 F2 window accessability issues
#4367 Argument hover doesn't work for nested method call
#4964 Automatic Code Assist needs to be smarter
#4966 Automatic Code Assist needs to be smarter #2
#4967 Automatic Code Assist needs to be smarter #3
#4968 Automatic Code Assist needs to be smarter #4
#4969 Automatic Code Assist needs to be smarter #5
#4999 Automatic Code Assist needs to be smarter #7
#6589 ctrl+insert, shift+insert incorrectly flips the insert/overw
#3467 Horizontal scrolling when stepping through errors (1GE6AF1)
#4041 out of sync error message after copying resources (1GGR6VZ)
#6699 Save should not flush undo stack
#4071 Format option loses place in editor (1GHQFU6)

Eclipse SDK Build 20011211

## Breaking API changes

## Other highlights

## Known deficiencies

## Problem reports closed

#1614 Current line in Debugger should start at center of source editor (1GETH7J)
#3467 Horizontal scrolling when stepping through errors (1GE6AF1)

Eclipse SDK Build 20011206

## Breaking API changes

## Other highlights

Support for read-only but modifiable resources in editors. For this reason AbstractTextEditor now calls validateState if its document provider also implement IDocumentProviderExtension. The calls are issued:

- when an editor is marked dirty
- when an editor saves its document to its input
- when a dirty resource is moved (if allowed)

Calling validateState may cause changes to the isModifiable and isReadOnly properties of the editor's input.
FileDocumentProvider implements validateState by calling IWorkspace.validateEdit on the input file.

## Known deficiencies

## Problem reports closed

Eclipse SDK Build 20011204

## Breaking API changes

## Other highlights

Perparations for supporting the concept of read-only but modifiable resources in editors.

## Known deficiencies

## Problem reports closed

#6203 SEVERE: typing in java editor causes OutOfMemoryError in JDK 1.4
#6263 Extra closing braces inserted

Eclipse SDK Build 20011127

## Breaking API changes

## Other highlights

- An BasicTextEditorActionContributor now contributes three status fields into the window's status line. Each field is dedicated to show information of a particular category. The categories are defined in ITextEditorActionConstants. A new interface ITextEditorExtension has been introduced. On activation, implementing editors of this interface are informed about the status fields they can use to publish status information. AbstractTextEditor implements ITextEditorExtension. Subclasses of AbstractTextEditor can get access to the editor's current status fields using the method getStatusField(String category). By default, AbstractTextEditor publishes the following information: cursor position, input mode, reade only state of its input. Subclasses may change this behavior by overriding updateStatusField(String category) or callers of this method.
- The default text editor uses the feature described above and now provides status information.

## Known deficiencies

## Problem reports closed

#4071 Format option loses place in editor (1GHQFU6)
#6168 code assist preference (auto complete) does not work
#6087 NPE closing content assist from DisplayView on exit
#6013 Repeatable Java editor hang in 200111115
#4947 No indication of Insert/Overwrite mode

Eclipse SDK Build 20011120

## Breaking API changes

## Other highlights

- Change to AbstractHoverInformationControlManager to reset the hover location on a time basis.
- Added configuration method to ContentAssistant to automatically insert a single proposal.
- Behavioral configuration methods such as enableAutoInsert, enableAutoActivation, and setAutoActivationDelay can now be called when after the content assistant has been installed.
- Context information popup recomputes size after style information has been applied.

## Known deficiencies

## Problem reports closed

#2569 [JFace Text] Content assist list truncated (1GG1W9B)
#2904 [JFace Text] PropagatingFontFieldEditor has moved (1GKKL13)
#1824 [JFace Text] 50 reconciling threads for 4 editors opened (1GFXMV8)

Eclipse SDK Build 20011101

## Breaking API changes

## Other highlights

- introduction of setDocumentContent(IDocument, IEditorInput) on StorageDocumentProvider.
- introduction of IDocumentExtension (see JavaDoc)
- AbstractDocument implements IDocumentExtension

## Known deficiencies

Instances of DefaultInformationControl are wider than necessary.

## Problem reports fixed

Eclipse SDK Build 206

## Breaking API changes

Corrected spelling of "anchor" in AbstractInformationControlManager and its subclasses.

## Other highlights

## Known deficiencies

Instances of DefaultInformationControl are wider than necessary.

## Problem reports fixed

#5066 Code Assist: Thread created / not removed
#5120 Empty popup doc in java editor
#3473 mnemonics (1GF25DN)

Eclipse SDK Build 204

## Breaking API changes

## Other highlights

For more information about the following issue please see JavaDoc of the classes

- Several improvements of the new hover infrastructure, such as customizable SWT styles.
- Improved look of the content assist window.
- Content assist supports customizable completion characters, i.e. each completion proposal can specify which characters trigger its insertion.

## Known deficiencies

Instances of DefaultInformationControl are wider than necessary.

## Problem reports fixed

Eclipse SDK Build 203

## Breaking API changes

package: org.eclipse.jface.text
interface: IHoverInfoPresenter
change: removed interface
change type: breaking API change for implementers of IHoverInfoPresenter

## Other highlights

For more information about the following issue please see JavaDoc of the classes

- Complete rework of hover popups (previously a package private mechanism hidden from clients). There is now the concept of an IInformationControl and an IInformationControlCreator. Everywhere where floating windows are used to present some kind of information, now IInformationControl is used. More precise, the according component is equiped with an IInformationControlCreator and creates the IInformationControl instance when needed. So clients can set an IInformationControlCreator on a TextViewer and a SourceViewer. They use it to create the text hover window and the annotation bar hover window respectively. DefaultInformationControl is a StyledText-based default implementation of IInformationControl. Clients may implement IInformationControl directly and inject their custom information control creator.
- AbstractInformationControlManager and its subclasses abstractly implement the process of providing a SWT control with support for floating information windows. This covers layout, positioning, content, and visibility of the floating window. They offer a broad customization space such as layout strategies, colors, etc.
- TextViewer hovers, annotation bar hovers, additional info on completion proposals in the content assistant, etc. benefit from the new infrastructure. UI improvements are especially visible in the layout behavior.
- Introduced the concept of an information presenter. An information presenter shows information on a context derivved subject on request. See IInformationPresenter for details as well as SourceViewer and SourceViewerConfiguration for how to use it.

## Known deficiencies

Instances of DefaultInformationControl are wider than necessary.

## Problem reports fixed

Eclipse SDK Build 200

## Breaking API changes

package: org.eclipse.jface.text
interface: ITextViewer
change: added method public void invalidateTextPresentation( )
change type: breaking API change for implementers of ITextViewer

package: org.eclipse.jface.text
interface: ITextViewer
change: added method public void setDefaultPrefixes(String[] defaultPrefixes, String contentType)
change type: breaking API change for implementers of ITextViewer

package: org.eclipse.jface.text
interface: ITextViewer
change: removed method void setDefaultPrefix(String defaultPrefix, String contentType)
change type: breaking API change for implementers of ITextViewer

package: org.eclipse.jface.text.rules
class: RuleBasedDamagerRepairer
change: deprecated constructor public RuleBasedDamagerRepairer(RuleBasedScanner scanner, TextAttribute defaultTextAttribute)
change type: breaking API change for clients of RuleBasedDamagerRepairer

## Other highlights

For more information about the following issue please see JavaDoc of the classes

- IContextInformationValidator implementers may also implement IContextInformationPresenter to style context information
- ITextHover implementers may also implement IHoverInfoPresenter to style hover information
- PropagatingFontFieldEditor has been introduced
- MonoReconciler has been introduced to support partition independent reconciling
- Token has been reimplemented, supports setData method now
- RuleBasedScanner now supports public void setDefaultReturnToken(IToken defaultReturnToken). This token is returned if no rule can fire.
- TextPresentation now supports public static void applyTextPresentation(TextPresentation presentation, StyledText text)
- BasicMarkerUpdater has been marked as final
- SelectMarkerRulerAction has been introduced
- WorkbenchChainedTextFontFieldEditor has been introduced

## Known deficiencies

## Problem reports fixed

1GJ65EW: ITPSRCEDIT:WINNT - ResourceMarkerAnnotaionModel: unnecessary fireModelChange
1GIYR3X: ITPSRCEDIT:ALL - NL: word select (double click) in Java comments
1GGYYWK: ITPJUI:ALL - Dismissing editor with code assist up causes lots of Internal Errors
1GEUOZ9: ITPJUI:ALL - Confusing UI for multiline Bookmarks and Tasks
1GII2RZ: ITPJUI:WINNT - AssertionFailed Ex. in Java editor
1GIYQ9K: ITPUI:WINNT - StyledText swallows Shift+TAB
1GIJZOO: ITPSRCEDIT:ALL - Gotodialog's edit field has no initial focus