Introduction
This document lists changes made to the Editor Indent 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.
- (Sep 2 '14) Indentation Support module created
- (Oct 29 '07) API/SPI repackaged to remove it from the official NetBeans API packages
- (Oct 13 '07) Added several methods to Context class
All changes by date
- (Jun 16 '19) Indent can be given as a string
- (Sep 2 '14) Indentation Support module created
- (Dec 3 '10) Adding org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString
- (Feb 17 '10) Adding CodeStylePreferences.Provider
- (Mar 3 '09) Enhance Context class with Lookup so that indenters can communicate with each other.
- (Oct 23 '08) Adding org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
- (Oct 15 '08) Adding org.netbeans.modules.editor.indent.api.Indent.indentNewLine
- (Aug 13 '08) Adding org.netbeans.modules.editor.indent.spi.CodeStylePreferences
- (Feb 5 '08) Adding CodeStylePreferences.get(Document doc, String mimeType) and CodeStylePreferences.get(FileObject file, String mimeType).
- (Oct 29 '07) API/SPI repackaged to remove it from the official NetBeans API packages
- (Oct 13 '07) Added several methods to Context class
- (Jul 17 '07) Added Context.mimePath()
- (Jun 14 '07) editor/indent module was created.
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.indent/1 > 1.20
- (1.49) Indent can be given as a string
- (1.39) Indentation Support module created
- (1.22) Adding org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString
- (1.20) Adding org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
- (1.19) Adding org.netbeans.modules.editor.indent.api.Indent.indentNewLine
- (1.18) Adding CodeStylePreferences.Provider
- (1.12) Enhance Context class with Lookup so that indenters can communicate with each other.
- (1.11) Adding CodeStylePreferences.get(Document doc, String mimeType) and CodeStylePreferences.get(FileObject file, String mimeType).
- (1.9) Adding org.netbeans.modules.editor.indent.spi.CodeStylePreferences
- (1.5) API/SPI repackaged to remove it from the official NetBeans API packages
- (1.2) Added several methods to Context class
- (1.1) Added Context.mimePath()
- (1.0) editor/indent module was created.
Changes by affected class
org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
- (Sep 2 '14) Indentation Support module created
- (Oct 23 '08) Adding org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
org.netbeans.modules.editor.indent.spi.CodeStylePreferences
- (Feb 17 '10) Adding CodeStylePreferences.Provider
- (Aug 13 '08) Adding org.netbeans.modules.editor.indent.spi.CodeStylePreferences
org.netbeans.modules.editor.indent.spi.Context
- (Jun 16 '19) Indent can be given as a string
- (Mar 3 '09) Enhance Context class with Lookup so that indenters can communicate with each other.
org.netbeans.modules.editor.indent.api.Indent
org.netbeans.modules.editor.indent.api.IndentUtils
Details of all changes by API and date
Uncategorized changes
Indent can be given as a string
Jun 16 '19; API spec. version: 1.49; affected top-level classes:Context
; made by: jlahoda
Added method org.netbeans.modules.editor.indent.spi.Context.modifyIndent(int, int, String), which allows to set indent by specifying particular indent string.
Indentation Support module created
Sep 2 '14; API spec. version: 1.39; affected top-level classes:org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
; made by: dbalek
Implementation of indentation which depends on typing hooks moved to a separate module, see its javadoc for more info.
Binary-compatible
Adding org.netbeans.modules.editor.indent.api.IndentUtils.createIndentString
Dec 3 '10; API spec. version: 1.22; affected top-level classes:IndentUtils
; made by: mmetelka; issues:
#192289
Method IndentUtils.createIndentString(int indent, boolean expandTabs, int tabSize) added.
Adding CodeStylePreferences.Provider
Feb 17 '10; API spec. version: 1.18; affected top-level classes:CodeStylePreferences
; made by: vstejskal; issues:
#178311
Adding
CodeStylePreferences.Provider
interface in order to allow
isolating the project-dependent code style preferences storage from the rest
of the editor infrastructure.
Enhance Context class with Lookup so that indenters can communicate with each other.
Mar 3 '09; API spec. version: 1.12; affected top-level classes:Context
; made by: dkonecny; issues:
#159479
Let IndentTask and/or ReformatTask implement Lookup.Provider and before executing indentation/reformat call these providers and provide merged result via getLookup() method in Context. Individual formatters check lookup for presence of other formatters and communicate with them via domain specific APIs.
Adding org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
Oct 23 '08; API spec. version: 1.20; affected top-level classes:org.netbeans.modules.editor.indent.spi.support.AutomatedIndenting
; made by: vstejskal; issues:
#120357
The
AutomatedIndenting
support class provides regex-based
automatic re-indentation of lines as user types. This is a replacement for
the deprecated ExtFormatter.getReformatBlock
and INDENT_HOT_CHARS_ACCEPTOR
setting.
Adding org.netbeans.modules.editor.indent.api.Indent.indentNewLine
Oct 15 '08; API spec. version: 1.19; affected top-level classes:Indent
; made by: vstejskal; issues:
#120357
The new method
int Indent.indentNewLine(int)
was added as
a replacement for the old int Formatter.indentNewLine(BaseDocument, int)
.
Adding org.netbeans.modules.editor.indent.spi.CodeStylePreferences
Aug 13 '08; API spec. version: 1.9; affected top-level classes:CodeStylePreferences
; made by: vstejskal; issues:
#141974
The new
CodeStylePreferences
class was added in order to
unify access to editor formatting/indentation preferences (ie. code style).
Adding CodeStylePreferences.get(Document doc, String mimeType) and CodeStylePreferences.get(FileObject file, String mimeType).
Feb 5 '08; API spec. version: 1.11; made by: dbalek; issues: #153957The new methods were added to allow for getting the formatting/indentation preferences of embedded mimeTypes.
API/SPI repackaged to remove it from the official NetBeans API packages
Oct 29 '07; API spec. version: 1.5; made by: vstejskal; issues: #116022
The API/SPI classes were moved from the official org.netbeans.api
and org.netbeans.spi
packages and the stability level
of the API was set to devel
to indicate that the module
and its API is still under development. The major version of the
module was set to 2
to mark the incompatible change.
There was not enough time in the Netbeans 6.0 release timeframe for us to fully stabilize the APIs offered by this module. Therefore we decided to release the development version of the APIs and do a full API review in the next release cycle.
Added several methods to Context class
Oct 13 '07; API spec. version: 1.2; made by: mmetelka; issues: #116022
Added Context.lineIndent()
, Context.lineStartOffset()
,
Context.caretOffset()
, Context.setCaretOffset()
and Context.indentRegions()
methods (including Context.Region class).
Fixed Context.modifyIndent()
signature and implementation.
Binary-compatible
Added Context.mimePath()
Jul 17 '07; API spec. version: 1.1; made by: mmetelka; issues: #110129
Added Context.mimePath()
method.
editor/indent module was created.
Jun 14 '07; API spec. version: 1.0; made by: mmetelkaThe module was created.