This document lists changes made to the General Queries 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.queries/1 > 1.20
VersioningQuery; made by: tstupka; issues: #229281
Added a new query
VersioningQuery which provides Versioning relevant info like
e.g. if a particular file is managed by a Versioning System.
VisibilityQueryChangeEvent; made by: mkleint; issues: #220749
Added new class
VisibilityQueryChangeEvent which extends
ChangeEvent and can be used by
to fire a change event with additional information attached.
ChangeListener implementions listening on
VisibilityQuery can then check the
event's type when it arrives and use the additional information to their advantage.
SharabilityQueryImplementation2; made by: alexvsimon; issues: #198060
Added new methods CollocationQuery.areCollocated(URI, URI) and CollocationQuery.findRoot(URI). Methods query all CollocationQueryImplementation (if possible) and CollocationQueryImplementation2 instances found in global lookup. Deprecated existing methods CollocationQuery.areCollocated(File, File) and CollocationQuery.findRoot(File). Methods query all CollocationQueryImplementation and CollocationQueryImplementation2 instances found in global lookup.
Added new methods SharabilityQuery.getSharability(URI) and SharabilityQuery.getSharability(FileObject). Methods query all SharabilityQueryImplementation (if possible) and SharabilityQueryImplementation2 instances found in global lookup. Deprecated existing method SharabilityQuery.getSharability(File). Method query all SharabilityQueryImplementation and SharabilityQueryImplementation2 instances found in global lookup.
VisibilityQueryImplementation2; made by: mkleint; issues: #95974
Added new method VisibilityQuery.isVisible(File). It queries all VisibilityQueryImplementation instances found in global lookup. If such instance implements VisibilityQueryImplementation2, it's isVisible(File) method is used directly. If not, it attempts to delegate to the isVisible(FileObject) method. That might not work for non-existing files. All implementations of VisibilityQueryImplementation are encouraged to upgrade to VisibilityQueryImplementation2.
FileEncodingQuery; made by: jtulach; issues: #94676
Whenever someone queries for encoding of a file object on default file system (e.g. the one that is provided by layers), it will get UTF-8 as the default encoding and not the system one. As a result all resources on layers should be in UTF-8 encoding.
FileEncodingQueryImplementation; made by: tzezula; issues: #42638
Added a query (
FileEncodingQuery) to find out the encoding of the file. The query
delegates to the instances of the SPI interface (
when the SPI implementations don't know anything about the file encoding it returns the encoding
corresponding to the file.encoding property. The API also provides getter and setter for default
project encoding which should be used by the project generator.
NonRecursiveFolder; made by: mentlicher; issues: #52271
fileinfo package introduced for classes providing extra
information about files or folders.
added. It marks a representation of a folder that have non-recursive
content (does not contain subfiles).
To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.
Clients should begin requesting the new version to avoid a warning at startup.
Built on July 2 2020. | Copyright © 2017-2020 Apache Software Foundation. All Rights Reserved.