This document lists changes made to the Editor Settings Storage 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.settings.storage/1 > 1.20
org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage
org.netbeans.modules.editor.settings.storage.api.MemoryPreferences
org.netbeans.modules.editor.settings.storage.api.OverridePreferences
org.netbeans.modules.editor.settings.storage.spi.StorageDescription
org.netbeans.modules.editor.settings.storage.spi.StorageFilter
org.netbeans.modules.editor.settings.storage.spi.StorageReader
org.netbeans.modules.editor.settings.storage.spi.StorageWriter
org.netbeans.modules.editor.settings.storage.spi.TypedValue
Adding new element <colordef name="" color="" /> to fontcolors XML schema, which makes possible custom string to color mapping. It allows to define a color palette, then lookup colors from that palette, making porting color schemas easier.
org.netbeans.modules.editor.settings.storage.api.OverridePreferences
org.netbeans.modules.editor.settings.storage.api.MemoryPreferences
org.netbeans.modules.editor.settings.storage.api.EditorSettingsStorage
org.netbeans.modules.editor.settings.storage.spi.StorageDescription
org.netbeans.modules.editor.settings.storage.spi.StorageFilter
org.netbeans.modules.editor.settings.storage.spi.StorageReader
org.netbeans.modules.editor.settings.storage.spi.StorageWriter
org.netbeans.modules.editor.settings.storage.spi.TypedValue
; made by: sdedic
EditorSettings
is extended to handle saving and loading annotations colorings for any profile.
Class org.netbeans.modules.editor.settings.storage.api.EditorSettings [sigtest] "E5.2 - Adding abstract methods" : method public abstract void org.netbeans.modules.editor.settings.storage.api.EditorSettings.setAnnotations(java.lang.String,java.util.Map) [sigtest] "E5.2 - Adding abstract methods" : method public abstract java.util.Map org.netbeans.modules.editor.settings.storage.api.EditorSettings.getAnnotations(java.lang.String) [sigtest] "E5.2 - Adding abstract methods" : method public abstract java.util.Map org.netbeans.modules.editor.settings.storage.api.EditorSettings.getAnnotationDefaults(java.lang.String) [sigtest]
org.netbeans.modules.editor.settings.storage.api.OverridePreferences
org.netbeans.modules.editor.settings.storage.api.MemoryPreferences
; made by: sdedic; issues:
#226111
OverridePreferences
can be used to detect whether the setting is defined for
the specific MIME type, or inherited from default ('all languages') settings.
During options editing, MemoryPreferences
can be used to create Preferences
object, that propagates changes to its (persistent) delegate upon flush().
Adding EditorSettings.PROP_MIME_TYPES
to notify about changes in mimetypes returned
from EditorSettings.getAllMimeTypes()
and EditorSettings.getMimeTypes()
.
The createReader
and createWriter
methods
of StorageDescription
now have second parameter, which
is a mime path string of the file being read or writter respectively.
The StorageReader.getMimePath
method was added alongside
with a new constructor that takse two parameters FileObject
that the reader is dealing with and the mime path String
of
that file.
Two methods were added for the benefit of keymaps and macros
storage implementations. The added methods are -
StorageSupport.stringToKeyStrokes
and
StorageSupport.keyStrokesToString
.
The classes related to the code templates storage were moved to the editor/codetemplates module, which is no using the new SPI to plugin its own storage files reader/writer.
The phase 1 of the editor settings enhancements, please see issue 90403 for details. Briefly, the changes involve introducing a special folder for each setting type, profiles are always stored in their own folder, modules are allowed to register multiple settings files, platform specific settings, the use of 'text/base' for all-editors settings has been deprecated in favor of the hierarchy root (ie. 'Editors' folder), etc.
The changes are documented in the Architecture Description document and marked with the module version.
Adding EditorSettings.getAllMimeTypes()
method, which
lists all top-level mime types registered in MimeLookup
.
The getDefaultFontColors
, getDefaultFontColorDefaults
and setDefaultFontColors
methods in the EditorSettings
classe were deprecated in favor of using EditorSettings.getFontColorSettings(String[])
with an empty mime path, which is the standard way of getting defaults
for all document types.
The PROP_DEFAULT_FONT_COLORS
and PROP_EDITOR_FONT_COLORS
should have never been made public. They are only used internally.
The module is now 'eager' and it provides the org.netbeans.api.editor.settings.implementation
token required by the editor/settings
module. Also
the API was properly marked as for-friends-only.