This document lists changes made to the Java 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.
module-info.java
declarations
LookupMerger
for CompilerOptionsQueryImplementation
s
JavaTemplates
JavadocAndSourceRootDetection.findJavadocRoots
method to find out all javadoc roots under given folder
ProjectProblemsProvider
to resolve JDK 8 Profile problems
ProjectProblemsProvider
to resolve JDK 8 Profile problems
BrokenReferencesSupport
to delegate to ProjectProblems
PreferredProjectPlatform
ProjectClassPathModifier.extenderForModifier
JavaTemplates.JAVA_ICON
JavaRunner.QUICK_PROFILE
,
JavaRunner.QUICK_TEST_PROFILE
and
JavaRunner.QUICK_PROFILE_APPLET
constants
showAlert
method into theBrokenReferencesSupport
LibraryDefiner
IncludeExcludeVisualizer
support class
PackageViewChildren.PackageNode.setName()
ClassPathImplementation
based on an Ant property
ProjectClassPathExtender
made public
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.java.project/1 > 1.20
module-info.java
declarations
LookupMerger
for CompilerOptionsQueryImplementation
s
JavaTemplates
JavadocAndSourceRootDetection.findJavadocRoots
method to find out all javadoc roots under given folder
ProjectProblemsProvider
to resolve JDK 8 Profile problems
ProjectProblemsProvider
to resolve JDK 8 Profile problems
BrokenReferencesSupport
to delegate to ProjectProblems
PreferredProjectPlatform
JavaRunner.QUICK_PROFILE
,
JavaRunner.QUICK_TEST_PROFILE
and
JavaRunner.QUICK_PROFILE_APPLET
constants
ProjectClassPathModifier.extenderForModifier
JavaTemplates.JAVA_ICON
showAlert
method into theBrokenReferencesSupport
LibraryDefiner
IncludeExcludeVisualizer
support class
PackageViewChildren.PackageNode.setName()
ClassPathImplementation
based on an Ant property
ProjectClassPathExtender
made public
org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport
ProjectProblemsProvider
to resolve JDK 8 Profile problems
BrokenReferencesSupport
to delegate to ProjectProblems
showAlert
method into theBrokenReferencesSupport
LibraryDefiner
org.netbeans.spi.java.project.support.ui.EditJarSupport
org.netbeans.spi.java.project.support.ExtraSourceJavadocSupport
org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer
IncludeExcludeVisualizer
support class
org.netbeans.spi.java.project.support.JavadocAndSourceRootDetection
JavadocAndSourceRootDetection.findJavadocRoots
method to find out all javadoc roots under given folder
org.netbeans.api.java.project.JavaProjectConstants
org.netbeans.api.java.project.runner.JavaRunner
JavaRunner.QUICK_PROFILE
,
JavaRunner.QUICK_TEST_PROFILE
and
JavaRunner.QUICK_PROFILE_APPLET
constants
org.netbeans.spi.java.project.runner.JavaRunnerImplementation
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates
JavaTemplates
JavaTemplates.JAVA_ICON
org.netbeans.spi.java.project.support.LookupMergerSupport
LookupMerger
for CompilerOptionsQueryImplementation
s
ProjectClassPathModifier.extenderForModifier
org.netbeans.spi.java.project.support.ui.PackageRenameHandler
org.netbeans.spi.java.project.support.ui.PackageView
org.netbeans.spi.java.project.support.PreferredProjectPlatform
PreferredProjectPlatform
org.netbeans.spi.java.project.classpath.ProjectClassPathExtender
ProjectClassPathExtender
made public
org.netbeans.api.java.project.classpath.ProjectClassPathModifier
ProjectClassPathModifier.extenderForModifier
org.netbeans.spi.java.project.classpath.ProjectClassPathModifierImplementation
org.netbeans.spi.java.project.classpath.support.ProjectClassPathSupport
org.netbeans.spi.java.project.classpath.ProjectModulesModifier
org.netbeans.spi.java.project.support.ProjectPlatform
org.netbeans.spi.java.project.support.ui.SharableLibrariesUtils
ProjectClassPathModifier.extenderForModifier
ProjectClassPathModifier
LookupMergerSupport
; made by: jglick; issues:
#196455
Added a bridge from an old SPI to the newer, preferred SPI.
Also added LookupMergerSupport.createClassPathModifierMerger
.
Any modules still implementing ProjectClassPathExtender
should cease to do so.
LookupMergerSupport
; made by: mkleint; issues:
#134341
LookupMergerSupport.createClassPathProviderMerger(ClassPathProvider)
can be used to allow composing the project's classpath from multiple sources (modules).
ProjectClassPathModifier
ProjectClassPathModifierImplementation
; made by: tzezula; issues:
#74356
#75469
#60852
#73197
#73198
ClassPathImplementation
based on an Ant property
ProjectClassPathSupport
; made by: tzezula; issues:
#42309
Added new helper class ProjectClassPathSupport
with a factory method createPropertyBasedClassPathImplementation(...)
.
This method creates a live classpath based on the list of Ant properties holding the path. The classpath
implementation listens on changes of properties, updates state and fires events to clients.
ProjectClassPathExtender
made public
ProjectClassPathExtender
; made by: tzezula; issues:
#52998
ProjectClassPathExtender
was a private contract between j2seproject
and form
which allowed the form editor to extend the compilation classpath of a project by a new classpath
element (archive file, folder, dependent project, or library).
This interface was moved into a public SPI package
to remove the need to have an implementation dependency of form
and j2seproject
on java/project
.
ProjectPlatform
; made by: tzezula
PropertyEvaluator
.
module-info.java
declarations
ProjectModulesModifier
; made by: sdedic
ProjectClassPathModifier
for modular projects.
LookupMerger
for CompilerOptionsQueryImplementation
s
LookupMergerSupport
; made by: tzezula
LookupMergerSupport.createCompilerOptionsQueryMerger
to create a LookupMerger
for CompilerOptionsQueryImplementation
s
instances.
ProjectPlatform
; made by: tzezula
Added a support for per project JavaPlatform
.
The usecase for the per project JavaPlatform is a generated
project. The project generator puts platform path into
the project properties and the generated projects have correct
JavaPlatform. There is no need to resolve broken JavaPlatform
when the projects are opened.
To use the per project JavaPlatform
set the
platform.active
property to the platform name and
add the platforms.<platform_name>.home
property
pointing to the path to the JDK home.
Example:
platforms.MyJDK.home=/Library/Java/JavaVirtualMachines/jdk1.7.0_67.jdk/Contents/Home
platform.active=MyJDK
The following packages were moved from org.netbeans.modules.java.project into the org.netbeans.modules.java.project.ui module:
Runtime compatibility remains, compile time compatibility is
mostly preserved too. It is however recommended to upgrade
dependencies of client modules. Try running
ant fix-dependencies
in your Ant module.
JavaTemplates
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates
; made by: tzezula
Added more specific icons into JavaTemplates
JavadocAndSourceRootDetection.findJavadocRoots
method to find out all javadoc roots under given folder
JavadocAndSourceRootDetection
; made by: tzezula; issues:
#232084
Added JavadocAndSourceRootDetection.findJavadocRoots
method to find out all javadoc roots under given folder.
ProjectProblemsProvider
to resolve JDK 8 Profile problems
In method getActions
added package actions from Projects/package/Actions
.
ProjectProblemsProvider
to resolve JDK 8 Profile problems
org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport
; made by: tzezula; issues:
#227831
Added a factory method createProfileProblemProvider
into BrokenReferencesSupport
creating a ProjectProblemsProvider
resolving dependencies on libraries with higher or invalid profile.
BrokenReferencesSupport
to delegate to ProjectProblems
org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport
; made by: tzezula; issues:
#215628
Added PreferredProjectPlatform
to provide a
JavaPlatform
which should be used for a new project.
PreferredProjectPlatform
PreferredProjectPlatform
; made by: tzezula; issues:
#208528
Added PreferredProjectPlatform
to provide a
JavaPlatform
which should be used for a new project.
JavaTemplates.JAVA_ICON
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates
; made by: jglick; issues:
#200175
Added a constant for a Java template icon.
JavaRunner.QUICK_PROFILE
,
JavaRunner.QUICK_TEST_PROFILE
and
JavaRunner.QUICK_PROFILE_APPLET
constants
org.netbeans.api.java.project.runner.JavaRunner
; made by: yardus; issues:
#203519
Integrating profiler into the generic project infrastructure.
showAlert
method into theBrokenReferencesSupport
org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport
; made by: tzezula; issues:
#195249
Added showAlert method having project context allowing the broken references alert to do the broken references resolution.
LibraryDefiner
org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport
; made by: jglick; issues:
#194744
Added a new SPI to permit alternate ways of resolving missing library references.
JavadocAndSourceRootDetection
; made by: tzezula; issues:
#179427
Added JavadocAndSourceRootDetection.findSourceRoots to find all source roots under the given folder. This method is used by the import source roots in the new project wizards.
org.netbeans.api.java.project.runner.JavaRunner
; made by: tzezula; issues:
#173406
Added JavaRunner.PROP_RUNTIME_ENCODING
property to allow project types
to pass the runtime encoding to jvm.
JavaProjectConstants
; made by: mkleint; issues:
#102711
Added a few constants to JavaProjectConstants
for use by SourceGroupModifier
with relation
to java projects.
org.netbeans.api.java.project.runner.JavaRunner
org.netbeans.spi.java.project.runner.JavaRunnerImplementation
; made by: jlahoda; issues:
#138504
Classes JavaRunner
and JavaRunnerImplementation
added.
JavadocAndSourceRootDetection
; made by: dkonecny; issues:
#124779
Class JavadocAndSourceRootDetection
added with couple of
helper methods to detect Javadoc and/or sources root.
ProjectClassPathModifierImplementation
ProjectClassPathModifier
; made by: dkonecny; issues:
#129628
Allow to add/remove relative classpath entries.
ProjectClassPathModifier
ProjectClassPathModifierImplementation
; made by: mkleint; issues:
#157985
ProjectClassPathModifier.addProject(Project[], FileObject, String)
is a partial replacement for
ProjectClassPathModifier.addAntArtifact()
that is capable of working with non-ant based project types as well.
It's not guaranteed that the source and target project will connect in cases when each is of different class of project. Eg.
Ant-based vs Maven project types. A way to check is to attempt to retrieve AntArtifact from the source and target projects..
org.netbeans.spi.java.project.support.ui.SharableLibrariesUtils
ProjectClassPathModifierImplementation
; made by: mkleint; issues:
#44035
A new utility class for helping project types create UI for sharable Libraries.
An additional protected method for use in ProjectClassPathModifierImplementation
subclasses named
performSharabilityHeuristics(URL,AntProjectHelper)
that takes classpath roots and tries to find the best way to reference that jar/folder.
JavaProjectConstants
; made by: mkleint; issues:
#89204
JavaProjectConstants
; made by: tzezula; issues:
#57733
The freeform project may have as its output a folder rather than a jar archive. The JavaProjectConstants was extended by the ARTIFACT_TYPE_FOLDER constant to represent such an output.
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.
ExtraSourceJavadocSupport
LookupMergerSupport
org.netbeans.spi.java.project.support.ui.EditJarSupport
; made by: mkleint; issues:
#70497
ExtraSourceJavadocSupport.createExtraSourceQueryImplementation()
and
ExtraSourceJavadocSupport.createExtraJavadocQueryImplementation()
create instances to be added to project's Lookup.LookupMergerSupport.createSFBLookupMerger()
and LookupMergerSupport.createJFBLookupMerger()
provide simple implementations of lookup mergers for respective query implementations.
A typical project implementation will put the lookup merger and the Extra*Support's instance in the project's lookup.EditJarSupport.showEditDialog()
is a facotry method for creating editing UI. To be added to Project's properties dialog
preferably the "Libraries" panel. Client code (project type owner) is assumed to write down the ant properties
source.reference.__name__ and javadoc.reference.__name__ in the same manner as file.reference.__name__ is persisted.IncludeExcludeVisualizer
support class
org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer
; made by: jglick; issues:
#49026
PackageViewChildren.PackageNode.setName()
org.netbeans.spi.java.project.support.ui.PackageRenameHandler
; made by: jbecicka; issues:
#53295
org.netbeans.spi.java.project.support.ui.templates.JavaTemplates
; made by: pjiricka; issues:
#56730
A new factory method for creating the name and package chooser panel in the Java file wizard. This method is similar to the methods that already exist in this class; it has an extra boolean parameter that allows to specify whether the entered package name is required to be valid (non-empty).
org.netbeans.spi.java.project.support.ui.PackageView
; made by: tzezula; issues:
#48618
New methods supporting creation of package lists were added to PackageView
.
createListView(SourceGroup)
creates a ComboBoxModel
containing the
packages from a given source group. listRenderer()
returns a ListCellRenderer
rendering the packages.