Skip navigation links

Introduction

This document lists changes made to the Editor Guarded Sections 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.guards/1 > 1.20

Changes by affected class

org.netbeans.api.editor.guards.DocumentGuards

org.netbeans.spi.editor.guards.GuardedRegionMarker

org.netbeans.api.editor.guards.GuardedSectionManager


Details of all changes by API and date


Editor Guarded Sections API

Allow to protect existing text

Feb 17 '16; API spec. version: 1.33; affected top-level classes: GuardedSectionManager; made by: sdedic
Added method to create guarded block on top of existing text.

DocumentGuards API

May 21 '14; API spec. version: 1.29; affected top-level classes: GuardedRegionMarker DocumentGuards; made by: sdedic; issues: #244679

APIs exposed and actually used on GuardedDocument in editor.lib module is now declared in Editor Guarded Sections. Clients may depend on Guarded Sections instead of on fading-away editor.lib module.

Dependency on openide.text eliminated, new SPI GuardedRegionMarker is added for Documents that are willing to style their contents according to guarded areas.

Ability run guarded readers/writers when the content of the guarded section's content is set

Nov 25 '12; API spec. version: 1.20; made by: jlahoda; issues: #221844

When this option is set, setting the content of a GuardedSection will pass the data through the given guarded writer and back through the given guarded reader, to ensure the result is the same as if it would be read from the disk.

Note that this new mode is not fully compatible with the original mode, e.g. all the set methods of all the GuardedSection classes will throw IllegalStateException if invoked inside the write&read part.

GuardedSectionsProvider supports Charset

Jun 19 '07; API spec. version: 1.0; made by: jpokorsky; issues: #99363
In order to use proper encoding by guards impl it is necessary to change GuardedSectionsProvider to accept encoding rather as java.nio.Charset instance than as a plain encoding name.