This document lists changes made to the Editor 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.
text/base
was removed
SideBar
instances to location
text/base
was removed
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: editor/1 > 1.20
SideBar
instances to location
text/base
was removed
The old formatting API (org.netbeans.editor.Formatter
& co.)
has been deprecated and moved to editor.deprecated.pre65formatting
module.
The exact API changes are listed in the sigtest report below.
-sigtest-init: [echo] sigtest check: editor; cnb: org-netbeans-modules-editor; email: api-changes@netbeans.org; type: check check-sigtest: [mkdir] Created dir: /work/netbeans/main2m/editor/build/test/sigtest/results [sigtest] /work/netbeans/main2m/editor/build/test/sigtest/results/org.netbeans.modules.editor [sigtest] Packages: org.netbeans.modules.editor.*, org.netbeans.modules.editor.options.* [sigtest] Missing /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/rt.jar [sigtest] [sigtest] email: api-changes@netbeans.org [sigtest] SignatureTest report [sigtest] Base version: 1.51.0 [sigtest] Tested version: 1.51.0 [sigtest] Check mode: bin [throws removed] [sigtest] Constant checking: on [sigtest] [sigtest] [sigtest] Class org.netbeans.modules.editor.FormatterIndentEngine [sigtest] "E1.2 - API type removed" : CLASS public abstract org.netbeans.modules.editor.FormatterIndentEngine [sigtest] [sigtest] Class org.netbeans.modules.editor.FormatterIndentEngineBeanInfo [sigtest] "E1.2 - API type removed" : CLASS public abstract org.netbeans.modules.editor.FormatterIndentEngineBeanInfo [sigtest] [sigtest] Class org.netbeans.modules.editor.IndentEngineFormatter [sigtest] "E1.2 - API type removed" : CLASS public org.netbeans.modules.editor.IndentEngineFormatter [sigtest] [sigtest] Class org.netbeans.modules.editor.NbEditorDocument [sigtest] "E1.2 - API type removed" : method public org.netbeans.editor.Formatter org.netbeans.editor.BaseDocument.getFormatter() [sigtest] "E1.2 - API type removed" : method public org.netbeans.editor.Formatter org.netbeans.editor.BaseDocument.getLegacyFormatter() [sigtest] [sigtest] Class org.netbeans.modules.editor.NbEditorKit [sigtest] "E1.2 - API type removed" : method public org.netbeans.editor.Formatter org.netbeans.editor.BaseKit.createFormatter() [sigtest] [sigtest] Class org.netbeans.modules.editor.SimpleIndentEngine [sigtest] "E1.2 - API type removed" : CLASS public org.netbeans.modules.editor.SimpleIndentEngine [sigtest] [sigtest] Class org.netbeans.modules.editor.SimpleIndentEngineBeanInfo [sigtest] "E1.2 - API type removed" : CLASS public org.netbeans.modules.editor.SimpleIndentEngineBeanInfo [sigtest] [sigtest] /work/netbeans/main2m/editor/build/test/sigtest/results/org-netbeans-modules-editor.xml: 1 failures in /work/netbeans/main2m/editor/nbproject/org-netbeans-modules-editor.sig BUILD FAILED Signature tests return code is wrong (1), check the messages above
The old settings API (org.netbeans.modules.editor.options.BaseOptions
& co.)
has been deprecated and moved to editor.deprecated.pre61settings
module.
The exact API changes are listed in the sigtest report below.
SignatureTest report Base version: 1.39.0 Tested version: 1.41.0 Check mode: src [throws normalized] Constant checking: on Missing Classes --------------- org.netbeans.modules.editor.NbEditorSettingsInitializer org.netbeans.modules.editor.options.AbbrevInputPanel org.netbeans.modules.editor.options.AbbrevsEditor org.netbeans.modules.editor.options.AbbrevsEditorPanel org.netbeans.modules.editor.options.AbbrevsMIMEOptionFile org.netbeans.modules.editor.options.AbbrevsMIMEProcessor org.netbeans.modules.editor.options.AllOptions org.netbeans.modules.editor.options.AllOptionsBeanInfo org.netbeans.modules.editor.options.AllOptionsFolder org.netbeans.modules.editor.options.AllOptionsFolderBeanInfo org.netbeans.modules.editor.options.AllOptionsNode org.netbeans.modules.editor.options.BaseOptions org.netbeans.modules.editor.options.BaseOptionsBeanInfo org.netbeans.modules.editor.options.BaseOptionsBeanInfo$CaretTypeEditor org.netbeans.modules.editor.options.BasePrintOptions org.netbeans.modules.editor.options.BasePrintOptionsBeanInfo org.netbeans.modules.editor.options.ColoringArrayEditor org.netbeans.modules.editor.options.ColoringArrayEditorPanel org.netbeans.modules.editor.options.ColoringBean org.netbeans.modules.editor.options.ColoringBeanBeanInfo org.netbeans.modules.editor.options.ColoringEditor org.netbeans.modules.editor.options.ColoringEditorPanel org.netbeans.modules.editor.options.FontsColorsMIMEOptionFile org.netbeans.modules.editor.options.FontsColorsMIMEProcessor org.netbeans.modules.editor.options.InstalledOptionsFolder org.netbeans.modules.editor.options.KeyBindingsEditor org.netbeans.modules.editor.options.KeyBindingsEditorPanel org.netbeans.modules.editor.options.KeyBindingsMIMEOptionFile org.netbeans.modules.editor.options.KeyBindingsMIMEProcessor org.netbeans.modules.editor.options.MIMEOptionFile org.netbeans.modules.editor.options.MIMEOptionFolder org.netbeans.modules.editor.options.MIMEOptionNode org.netbeans.modules.editor.options.MIMEProcessor org.netbeans.modules.editor.options.MacroInputPanel org.netbeans.modules.editor.options.MacrosEditor org.netbeans.modules.editor.options.MacrosEditorPanel org.netbeans.modules.editor.options.MacrosMIMEOptionFile org.netbeans.modules.editor.options.MacrosMIMEProcessor org.netbeans.modules.editor.options.MultiPropertyFolder org.netbeans.modules.editor.options.OptionSupport org.netbeans.modules.editor.options.OptionUtilities org.netbeans.modules.editor.options.PopupMultiPropertyFolder org.netbeans.modules.editor.options.PropertiesMIMEOptionFile org.netbeans.modules.editor.options.PropertiesMIMEProcessor org.netbeans.modules.editor.options.ScrollInsetsCustomEditor org.netbeans.modules.editor.options.ScrollInsetsEditor Missing Superclasses or Superinterfaces --------------------------------------- org.netbeans.modules.editor.IndentEngineFormatter: interface java.util.EventListener org.netbeans.modules.editor.IndentEngineFormatter: interface org.netbeans.editor.SettingsChangeListener org.netbeans.modules.editor.NbEditorDocument: interface java.util.EventListener org.netbeans.modules.editor.NbEditorDocument: interface org.netbeans.editor.SettingsChangeListener org.netbeans.modules.editor.NbEditorUI: interface org.netbeans.editor.SettingsChangeListener org.netbeans.modules.editor.NbEditorUI: superclass org.netbeans.editor.ext.ExtEditorUI Missing Methods --------------- org.netbeans.modules.editor.IndentEngineFormatter: method public void org.netbeans.editor.Formatter.settingsChange(org.netbeans.editor.SettingsChangeEvent) org.netbeans.modules.editor.NbEditorDocument: method public void org.netbeans.modules.editor.NbEditorDocument.settingsChange(org.netbeans.editor.SettingsChangeEvent) org.netbeans.modules.editor.NbEditorKit:method public java.util.List org.netbeans.editor.BaseKit.translateActionNameList(java.util.List) org.netbeans.modules.editor.NbEditorKit:method public org.netbeans.editor.ext.Completion org.netbeans.editor.ext.ExtKit.createCompletion(org.netbeans.editor.ext.ExtEditorUI) org.netbeans.modules.editor.NbEditorKit:method public org.netbeans.editor.ext.CompletionJavaDoc org.netbeans.editor.ext.ExtKit.createCompletionJavaDoc(org.netbeans.editor.ext.ExtEditorUI) org.netbeans.modules.editor.NbEditorKit$GenerateFoldPopupAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbBuildPopupMenuAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbBuildToolTipAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbGenerateGoToPopupAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbRedoAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbStopMacroRecordingAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbToggleLineNumbersAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$NbUndoAction: method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorKit$ToggleToolbarAction:method protected void org.netbeans.editor.BaseAction.settingsChange(org.netbeans.editor.SettingsChangeEvent,java.lang.Class) org.netbeans.modules.editor.NbEditorUI: method public org.netbeans.editor.ext.Completion org.netbeans.editor.ext.ExtEditorUI.getCompletion() org.netbeans.modules.editor.NbEditorUI: method public org.netbeans.editor.ext.CompletionJavaDoc org.netbeans.editor.ext.ExtEditorUI.getCompletionJavaDoc() org.netbeans.modules.editor.NbEditorUI: method public void org.netbeans.editor.EditorUI.settingsChange(org.netbeans.editor.SettingsChangeEvent) Added Superclasses or Superinterfaces ------------------------------------- org.netbeans.modules.editor.NbEditorUI: superclass org.netbeans.editor.EditorUI Added Constructors ------------------ org.netbeans.modules.editor.NbEditorDocument: constructor public org.netbeans.modules.editor.NbEditorDocument.NbEditorDocument(java.lang.String) Added Methods ------------- org.netbeans.modules.editor.IndentEngineFormatter: method public static org.netbeans.editor.Formatter org.netbeans.editor.Formatter.getFormatter(java.lang.String) org.netbeans.modules.editor.NbEditorKit:method public java.util.List<javax.swing.Action> org.netbeans.editor.BaseKit.translateActionNameList(java.util.List<java.lang.String>)
The use of editor kit implementation class for identifying
the type of a document has been deprecated in favor of mime
types and MimeLookup
. This change deprecates API
methods and construction in BaseDocument
that
accept editor kit implementation class and adds their equivalents
accepting EditorKit
.
Deprecated:
NbEditorDocument(Class)
Added:
NbEditorDocument(EditorKit)
The editor actions (ie. actions that are installed in JEditorPane
s
for Netbeans editors) can now be registered in XML layers under
the Actions
subfolder. For example adding an action to the java editor
can be achieved by adding .instance
file to
Editors/text/x-java/Actions
folder.
SideBar
instances to location
The position of SideBar
instances (East
etc.)
used to be given by the position
attribute.
Since that clashes with folder ordering, this attribute was deprecated
in favor of location
. The old attribute is still read as a backup.
The Editors/text/base/Toolbars/Default
folder has
been deprecated in favor of Editors/Toolbars/Default
.
The artificial mime type text/base
should not be used
for registering toolbar actions that apply to all editors anymore,
instead use the root of the folders hierarchy.
The CustomizableSideBar
and CustomizableSideBarClass2LayerFolder
classes were accidentaly exposed in an API visible package. We
moved them to a private package, because they have no API use.
They implement support for editor side bars, which can be registered
using the SideBar
subfolders in MimeLookup
.
The PopupActions
and PopupInitializer
classes were accidentaly exposed in an API visible package. We
moved them to a private package, because they have no API use.
They implement support for editor popup menu, which can be registered
using the Popup
subfolders in MimeLookup
.
Adding NbEditorUtilities.getMimeType(JTextComponent)
as a standard way of determining a mime type of a Netbeans
document loaded in JTextComponent
. It complements
the NbEditorUtilities.getMimeType(Document)
method.
Deprecating AllOptionsFolder.loadMimeOption(Class kitClass)
and AllOptionsFolder.loadMimeOption(Class kitClass, boolean processOldTypeOption)
.
There is no reason anybody should need to call these methods.
MimeLookup
should be used for accessing editor settings
including BaseOptions
.
text/base
was removed
Editors/text/base/
formerly used for global objects common for all MIME types, was removed.
Now all common objects can be placed into the Editors/
folder directly.
Modules formerly registering objects in this layer location will need to move their registrations for them to continue working.