This document lists changes made to the Editor Library 2 API.
Fuller descriptions of all changes can be found below (follow links).
Not all deprecations are listed here, assuming that the deprecated APIs continue to essentially work. For a full deprecation list, please consult the Javadoc.
These API specification versions may be used to indicate that a module requires a certain API feature in order to function. For example, if you see here a feature you need which is labelled 1.20, your manifest should contain in its main attributes the line:
OpenIDE-Module-Module-Dependencies: org.netbeans.modules.editor.lib2/1 > 1.20
Document data handling and implementation was separated into
SideBarFactory; made by: sdedic; issues: #226877
adopted from the legacy
editor.lib module, with unchanged semantic.
The original interface was deprecated.
AbstractEditorAction made part of editor SPI by making org.netbeans.spi.editor a public package.
Added EditorActionRegistration.noKeyBinding and EditorActionRegistration.noIconInMenu fields into EditorActionRegistration annotation.
Added NavigationHistory and NavigationHistory.Waypoint classes. It enables to add position to edit history. It also enables get edit history and look on last edits.
Added method getReplacedText() in TypedTextInterceptor to get replaced text after it's removed. This enables to use this text in some typing actions.
Added OnSaveTask interface which allows modules to register tasks into MimeLookup that will be performed right before document saving.
Added UndoableEditWrapper interface which allows wrapping of document-generated undoable edit by custom wrapping undoable edit(s).
Added EditorDocumentUtils.runExclusive(Runnable) method for gaining exclusive access to document without making any document mutations.
Add "weight" attribute to EditorActionRegistration annotation to allow for a clean actions overriding.
DialogBinding.bindComponentToFile(FileObject fileObject, int line, int column, int length, JTextComponent component)and
DialogBinding.bindComponentToDocument(Document document, int line, int column, int length, JTextComponent component).
DialogBinding; made by: dbalek; issues: #163769
EditorActionRegistration; made by: mmetelka; issues: #150875
CodeGeneratorimplementations registered for various mime types serve for creating code snippets and inserting them into documents on the Insert Code editor action invocation. The
CodeGeneratorContextProviderimplementations registered for the mime types could provide the respective CodeGenerators with an additional context information.
HighlightAttributeValueallows specifying highlights with attributes, which value is lazily evaluated at the time when the attrbute is used. For example when specifying tooltips.
EditorRegistryallows to get focused and last focused text component and list of all registered components and it allows to listen for currently focused component and changes of documents in it.
AttributesUtilitiesclass has been moved to
Built on April 17 2015. | Portions Copyright 1997-2015 Oracle. All rights reserved.