Platform Text - Breaking API changes from R2.1 to R3.0
org.eclipse.jface.text.source.AnnotationModel.addAnnotation(Annotation, Position, boolean): changed signature to throw `org.eclipse.jface.text.BadLocationException` in order to add support for better handling of invalid document positions. Only clients which extend (i.e. call super) this method will be broken. To fix the problem either catch the exception from the super call or change the signature in the extended method. The latter is suggested since clients should decide how to handle invalid document positions. org.eclipse.ui.texteditor.TextEditorAction.canModifyEditor(): added predicate method that checks whether the action's editor can be modified. The method calls different methods on the underlying editor depending on which interfaces the editor implements. The method will call `ITextEditorExtension2.isEditorInputModifiable()` if it is available. Modifing actions can call the method when updating their enablement state. org.eclipse.ui.texteditor.TextEditorAction.validateEdit(): added predicate method that checks and updates the modifiable state of the action's editor. The method calls different methods on the underlying editor depending on which interfaces the editor implements. The method will call `ITextEditorExtension2.validateEditorInputState()` if it is available. Modifing actions can call the method before running modifing the editor's content. org.eclipse.ui.texteditor.AbstractDecoratedTextEditor: A new intermediate class layer has been added between `StatusTextEditor` and other editors, namely `TextEditor` and `JavaEditor`. The additional layer includes features found commonly in advanced editors (and especially source editors) such as: a vertical ruler to display annotations, line numbers, and quick diff information an overview ruler current line hightlighting, and print margin display Implementors of an editor may choose to extend `AbstractDecoratedTextEditor` instead of `TextEditor`.
This document lists the breaking API changes that occurred between R2.1 and R3.0 and how to migrate from the R2.1 API to the R3.0 API.