Introduction

This document lists changes made to the Editor Library 2 API.


Index of APIs

Incompatible changes by date

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.

All changes by date

Changes by version

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

Changes by affected class

org.netbeans.api.editor.DialogBinding

org.netbeans.api.editor.EditorActionRegistration

org.netbeans.spi.editor.SideBarFactory


Details of all changes by API and date


Uncategorized changes

Document handling split

May 20 '13; API spec. version: 2.0; made by: sdedic; issues: #244679

Document data handling and implementation was separated into editor.document module


Binary-compatible

Typing Hooks Camel Case SPI added

Apr 16 '13; API spec. version: 1.79; made by: mkristofic; issues: #217163
Typing Hooks Camel Case SPI is addition to Typing Hooks. it allows interception of various key events that are processed in the editor. The SPI is a replacement for subclassing editor actions such as RemoveWordNextAction, PreviousCamelCasePosition, etc.

SidebarFactory interface adopted

Mar 8 '13; API spec. version: 1.77; affected top-level classes: SideBarFactory; made by: sdedic; issues: #226877

The interface org.netbeans.spi.editor.SideBarFactory was adopted from the legacy editor.lib module, with unchanged semantic. The original interface was deprecated.

AbstractEditorAction made part of editor SPI

Mar 1 '13; API spec. version: 1.76; made by: mmetelka; issues: #225792

AbstractEditorAction made part of editor SPI by making org.netbeans.spi.editor a public package.

Added EditorActionRegistration.noKeyBinding and EditorActionRegistration.noIconInMenu

Feb 17 '13; API spec. version: 1.75; made by: mmetelka; issues: #226220

Added EditorActionRegistration.noKeyBinding and EditorActionRegistration.noIconInMenu fields into EditorActionRegistration annotation.

NavigationHistory class added

Feb 15 '13; API spec. version: 1.74; made by: mkristofic; issues: #225808

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.

OnSaveTask interface added

Jan 30 '13; API spec. version: 1.73; made by: mkristofic; issues: #225293

Added method getReplacedText() in TypedTextInterceptor to get replaced text after it's removed. This enables to use this text in some typing actions.

OnSaveTask interface added

Sep 5 '12; API spec. version: 1.66; made by: mmetelka; issues: #217904

Added OnSaveTask interface which allows modules to register tasks into MimeLookup that will be performed right before document saving.

UndoableEditWrapper interface added

Apr 24 '12; API spec. version: 1.60; made by: mmetelka; issues: #204828

Added UndoableEditWrapper interface which allows wrapping of document-generated undoable edit by custom wrapping undoable edit(s).

EditorDocumentUtils.runExclusive method added

Mar 27 '12; API spec. version: 1.58; made by: mmetelka; issues: #206907

Added EditorDocumentUtils.runExclusive(Runnable) method for gaining exclusive access to document without making any document mutations.

Add "weight" attribute to EditorActionRegistration.

Nov 14 '11; API spec. version: 1.53; made by: mmetelka; issues: #199823

Add "weight" attribute to EditorActionRegistration annotation to allow for a clean actions overriding.

Zoom text actions added

Jul 16 '11; API spec. version: 1.45; made by: mmetelka; issues: #41807
Zoom text actions allow to increase/decrease default font size by Ctrl+Wheel or by actions (defined in editor.actions module).

Typing Hooks SPI added

Aug 5 '10; API spec. version: 1.31; made by: vstejskal; issues: #152655
Typing Hooks SPI allows interception of various key typed events that are processed in the editor. The SPI is a replacement for subclassing editor actions such as DefaultKeyTypedAction, InsertBreakAction, etc.

Adding line/column based dialog bindings

Mar 26 '10; API spec. version: 1.24; made by: vstejskal; issues: #181523
Added 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).

EditorActionNames.toggleNonPrintableCharacters added.

Mar 4 '10; API spec. version: 1.20; made by: vstejskal; issues: #4619
Added EditorActionNames.toggleNonPrintableCharacters action name.

EditorRegistry.COMPONENT_REMOVED_PROPERTY added.

Jul 1 '09; API spec. version: 1.13; made by: dbalek
EditorRegistry.COMPONENT_REMOVED_PROPERTY is fired when a component is removed from component hierarchy.

DialogBinding added

May 15 '09; API spec. version: 1.11; affected top-level classes: DialogBinding; made by: dbalek; issues: #163769
DialogBinding allows for content of some text component to be virtually placed to the given offset inside of a file or document. This way, the necessary context is provided for code completion and similar features to work in any text component.

EditorActionRegistration annotation added

Apr 7 '09; API spec. version: 1.10; affected top-level classes: EditorActionRegistration; made by: mmetelka; issues: #150875
EditorActionRegistration allows to easily register an editor action into the list of actions of an editor kit. It also allows a lazy action's class loading (more details in javadoc).

Code Generation SPI added

Apr 30 '08; API spec. version: 1.8; made by: dbalek; issues: #134239
The Code Generation SPI consists of two interfaces. The CodeGenerator implementations registered for various mime types serve for creating code snippets and inserting them into documents on the Insert Code editor action invocation. The CodeGeneratorContextProvider implementations registered for the mime types could provide the respective CodeGenerators with an additional context information.

HighlightAttributeValue interface added

Sep 13 '07; API spec. version: 1.5; made by: vstejskal; issues: #107107
The HighlightAttributeValue allows specifying highlights with attributes, which value is lazily evaluated at the time when the attrbute is used. For example when specifying tooltips.

EditorRegistry added

Jun 7 '07; API spec. version: 1.4; made by: mmetelka; issues: #103235
The EditorRegistry allows 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.

AttributesUtilities removed

Jan 26 '07; API spec. version: 1.3; made by: vstejskal
The AttributesUtilities class has been moved to editor/settings module.

editor/lib2 was created.

Aug 1 '06; API spec. version: 1.0; made by: mmetelka
The module was created.

Built on November 28 2014.  |  Portions Copyright 1997-2014 Oracle. All rights reserved.