See: Description
Package | Description |
---|---|
org.netbeans.api.project |
General API for finding and manipulating all kinds of projects.
|
org.netbeans.spi.project |
Support for defining project types.
|
org.netbeans.spi.project.support |
ProjectAPI
The Project API defines abstract projects. These are groupings of files built and
manipulated as units. It is used for Ant-based projects but could support
other scenarios such as makefiles. Modules can plug in project types which can
recognize certain folders as being projects, and define their behaviors.
Besides the visible Javadoc, this module permits a project to add implementations
of org.netbeans.spi.queries.FileBuiltQueryImplementation
,
org.netbeans.spi.queries.SharabilityQueryImplementation
and
org.netbeans.spi.queries.FileEncodingQueryImplementation
into the project lookup (rather than global lookup).
The implementations will be consulted only in the case the relevant file
belongs to that project (according to org.netbeans.api.project.FileOwnerQuery
).
This helps avoid the need to consult irrelevant query implementations.
ProjectManager.Result
Introduced ProjectManager.Result.getDisplayName()
and ProjectManager.Result.getProjectType()
to provide more information about a potential project via ProjectManager.isProject2(FileObject)
.
Newly introduced interfaces DependencyProjectProvider
and ProjectContainerProvider
are meant as less general replacement for SubprojectProvider
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 SubprojectProvider
currently
should evaluate if DependencyProjectProvider
or 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.
Introducing method 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 LookupProvider
s.
Introducing constant 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
A new callback was added permitting the invoker of a project action to be notified when the action completes.
The SPI should be used by modules defining particular project types, e.g. the J2SE project type. The API is to be used primarily by GUI infrastructure and some queries, though other module code may on occasion need to refer to the API.
Read more about the implementation in the answers to architecture questions.
Built on August 25 2014. | Portions Copyright 1997-2014 Oracle. All rights reserved.