This document lists changes made to the Project 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.
SourceGroup.containsno longer throws
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.projectapi/1 > 1.20
SourceGroup.containsno longer throws
ProjectManager; made by: tstupka; issues: #244126
to provide more information about a potential project via
ProjectManager; made by: tzezula; issues: #210465
Added a SPI internface for
different implementations of
ProjectUtils; made by: mkleint; issues: #210465
Newly introduced interfaces
ProjectContainerProvider are meant as less general replacement for
as they explicitly declaring their contract
DependencyProjectProvider the project's dependency projects and
ProjectContainerProvider projects that are build as part of this project). Code using
should evaluate if
ProjectContainerProvider contracts suit their usage better. Please note that the new interfaces are not
mandatory for project types to implement and if it's missing,
SubprojectProvider should be used.
LookupProviderSupport; made by: mkleint; issues: #200711
LookupProviderSupport.createCompositeLookup(Lookup, Lookup) which is a more freeform variant of
already existing method. The first parameter is expected to be the base lookup containing instances to be found in project lookup,
the second parameter is a lookup containing just
FileOwnerQuery; made by: mkleint; issues: #212015
FileOwnerQuery.UNOWNED, a pseudoproject indicating just that a directory is definitely unowned. May
be returned by either
FileOwnerQueryImplementation.getOwner, in which case null is returned from
FileOwnerQuery.getOwner. May also be passed to either
FileOwnerQuery.markExternalOwner overload, in which case the standard directory search will be pruned at this point with no result.
ActionProgress; made by: jglick; issues: #71515
A new callback was added permitting the invoker of a project action to be notified when the action completes.
ActionProvider implementations should call the
new progress listener if possible.
SourceGroup.containsno longer throws
SourceGroup; made by: jglick; issues: #204271
For convenience and safety, the
contains method no longer throws an unchecked exception;
it proved infeasible to ensure the precondition even in the face of projects
being renamed or deleted or similar dynamic changes to directory structure.
Implementations previously throwing this exception should just return false now instead. Callers previously catching the exception, or making a special effort to ensure the precondition, no longer need do so.
LookupProviderSupport; made by: tzezula; issues: #201737
LookupProviderSupport.createActionProviderMerger factory method to
LookupMerger for merging multiple instances of
in the project's
ActionProvider; made by: yardus; issues: #203519
In order to be able to fully integrate the profiler with the project infrastructure
it is necessary to add three new constants to
ActionProvider SPI for profiling a project, profiling a single file and
profiling a test for single file.
ProjectIconAnnotator; made by: jbecicka; issues: #171516
A mechanism for changing the project node icon. You can use it for example to add a badge to the project's icon.
MoveOrRenameOperationImplementation; made by: jglick; issues: #183680
Extended interface giving projects the ability to implement a simple display name change more safely and efficiently.
Existing implementations of
should be revised to implement the extended interface.
ProjectUtils; made by: jglick; issues: #168414
ProjectUtils.getCacheDirectory to complement
the SPI interface
SourceGroupModifierImplementation; made by: mkleint; issues: #102711
SourceGroupModifier provides ways of create specific folders (
SourceGroup root folders)
in case they don't exist, eg. cannot be retrieved from
The project supporting automated creation of SourceGroup root folders needs to
SourceGroupModifierImplementation in the project's lookup.
LookupMerger; made by: jglick; issues: #150194
Added annotations to register entries to project lookup individually.
These can be used instead of implementing a
Since the entries are loaded on demand, this can help avoid needless class loading.
LookupProvider should be converted wherever possible.
ProjectFactory2; made by: mkleint; issues: #153923
ProjectFactory2 that extends
ProjectManager.Result instead of a simple boolean value.
ProjectManager.isProject2(FileObject) method that can be used by
3rd party modules that need a fast (yet not 100% reliable) way of finding the project icon for a folder.
LookupProvider; made by: mkleint; issues: #152392
Add annotation @LookupProvider.Registration to replace registration in layer files.
SingleMethod; made by: mpetras; issues: #137191
which represents identification of a single method/function
in a file. The new class also contains new constants
to commands for running debugging test methods.
ProjectUtils; made by: jglick; issues: #136333
A new API method was introduced to match the
SPI interface. The change simplifies caller code, provides a path for future
changes in the SPI, and allows project types to avoid providing an explicit
implementation of this SPI if the fallback implementation suffices for their needs.
Modules which formerly looked for
directly in project lookup are strongly encouraged to migrate to the
new method instead.
AuxiliaryProperties; made by: jlahoda; issues: #134580
Added new API method
ProjectUtils.getPreferences and new SPI interface
LookupProviderSupport; made by: mkleint; issues: #83343
Added interfaces and support classes that can be used to compose the project's lookup
from multiple 3rd party sources. Framework for creating merged instances included.
LookupMerger implementation for
ProjectConfigurationProvider; made by: jglick; issues: #49652
Added an interface
which can be included in a project's lookup to support
switchable configurations / profiles.
notifyDeleted added to
Interfaces DataFilesProviderImplementation, DeleteOperationImplementation, CopyOperationImplementation, MoveOperationImplementation has
been added to support project delete/copy/rename/move.
Support class ProjectOperations has been added to simplify operations on compound projects.
It is possible to register owner of an individual file using
It is possible to register owner of a folder or file using URI, so the folder or file does not
have to exist at the time of registration.
This changes add a new method
FileOwnerQuery.markExternalOwner(URI, FileObject, int),
and also extends sematics of the existing
FileOwnerQuery.markExternalOwner(FileObject, FileObject, int) method to allow registration
of individual files.
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 4 2015. | Portions Copyright 1997-2015 Oracle. All rights reserved.