Skip navigation links

Introduction

This document lists changes made to the Java Project 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.java.project/1 > 1.20

Changes by affected class

org.netbeans.spi.java.project.support.ui.BrokenReferencesSupport

org.netbeans.spi.java.project.support.ui.EditJarSupport

org.netbeans.spi.java.project.support.ExtraSourceJavadocSupport

org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer

org.netbeans.spi.java.project.support.JavadocAndSourceRootDetection

org.netbeans.api.java.project.JavaProjectConstants

org.netbeans.api.java.project.runner.JavaRunner

org.netbeans.spi.java.project.runner.JavaRunnerImplementation

org.netbeans.spi.java.project.support.ui.templates.JavaTemplates

org.netbeans.spi.java.project.support.LookupMergerSupport

org.netbeans.spi.java.project.support.ui.PackageRenameHandler

org.netbeans.spi.java.project.support.ui.PackageView

org.netbeans.spi.java.project.support.PreferredProjectPlatform

org.netbeans.spi.java.project.classpath.ProjectClassPathExtender

org.netbeans.api.java.project.classpath.ProjectClassPathModifier

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


Details of all changes by API and date


Classpath Support SPI

Added ProjectClassPathModifier.extenderForModifier

Aug 22 '11; API spec. version: 1.41; affected top-level classes: ProjectClassPathModifier LookupMergerSupport; made by: jglick; issues: #196455

Added a bridge from an old SPI to the newer, preferred SPI. Also added LookupMergerSupport.createClassPathModifierMerger.


Compatibility:

Any modules still implementing ProjectClassPathExtender should cease to do so.

Create LookupMerger implementation for ClassPathProvider

May 19 '08; API spec. version: 1.18; affected top-level classes: LookupMergerSupport; made by: mkleint; issues: #134341

LookupMergerSupport.createClassPathProviderMerger(ClassPathProvider) can be used to allow composing the project's classpath from multiple sources (modules).

New ProjectClassPathModifier API/SPI for modification of project's classpath

May 15 '06; API spec. version: 1.10; affected top-level classes: ProjectClassPathModifier ProjectClassPathModifierImplementation; made by: tzezula; issues: #74356 #75469 #60852 #73197 #73198
The new SPI interface ProjectClassPathModifierImplementation was created to allow extension modules to add or remove classpath elements (archive files, folders, libraries, subprojects) from the project's classpath. The ProjectClassPathModifierImplementation is provided by the project types in the project's Lookup. The API client uses the static methods of ProjectClassPathModifier which delegate to the SPI.

Added helper method for creating ClassPathImplementation based on an Ant property

Jan 6 '05; API spec. version: 1.3; affected top-level classes: 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

Jan 5 '05; API spec. version: 1.3; affected top-level classes: 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.


Java Project API

Added support for per-project platform for projects which don't use PropertyEvaluator.

Jun 19 '19; API spec. version: 1.77; affected top-level classes: ProjectPlatform; made by: tzezula
Added support for per-project platform for projects which don't use PropertyEvaluator.

Added a SPI to manipulate with project's module-info.java declarations

Mar 16 '17; API spec. version: 1.71; affected top-level classes: ProjectModulesModifier; made by: sdedic
Added a SPI interface, which should be implemented on project to provide backwards compatibility for ProjectClassPathModifier for modular projects.

Added a LookupMerger for CompilerOptionsQueryImplementations

Oct 4 '16; API spec. version: 1.68; affected top-level classes: LookupMergerSupport; made by: tzezula
Added a factory method LookupMergerSupport.createCompilerOptionsQueryMerger to create a LookupMerger for CompilerOptionsQueryImplementations instances.

Added a support for per project JavaPlatform

Aug 17 '16; API spec. version: 1.66; affected top-level classes: 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

Desktop dependent Java Project Support UI extracted

Jun 2 '14; API spec. version: 1.62; made by: tstupka

The following packages were moved from org.netbeans.modules.java.project into the org.netbeans.modules.java.project.ui module:


Compatibility:

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.

Added more specific icons into JavaTemplates

Jul 30 '13; API spec. version: 1.60; affected top-level classes: org.netbeans.spi.java.project.support.ui.templates.JavaTemplates; made by: tzezula

Added more specific icons into JavaTemplates

Added JavadocAndSourceRootDetection.findJavadocRoots method to find out all javadoc roots under given folder

Jul 4 '13; API spec. version: 1.56; affected top-level classes: JavadocAndSourceRootDetection; made by: tzezula; issues: #232084

Added JavadocAndSourceRootDetection.findJavadocRoots method to find out all javadoc roots under given folder.

Added ProjectProblemsProvider to resolve JDK 8 Profile problems

Apr 12 '13; API spec. version: 1.53; made by: mkozeny; issues: #200833

In method getActions added package actions from Projects/package/Actions.

Added ProjectProblemsProvider to resolve JDK 8 Profile problems

Mar 28 '13; API spec. version: 1.53; affected top-level classes: 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.

Changed BrokenReferencesSupport to delegate to ProjectProblems

Jul 24 '12; API spec. version: 1.46; affected top-level classes: 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.

Added PreferredProjectPlatform

May 20 '12; API spec. version: 1.46; affected top-level classes: PreferredProjectPlatform; made by: tzezula; issues: #208528

Added PreferredProjectPlatform to provide a JavaPlatform which should be used for a new project.

Added JavaTemplates.JAVA_ICON

Jul 25 '11; API spec. version: 1.40; affected top-level classes: org.netbeans.spi.java.project.support.ui.templates.JavaTemplates; made by: jglick; issues: #200175

Added a constant for a Java template icon.

Added JavaRunner.QUICK_PROFILE, JavaRunner.QUICK_TEST_PROFILE and JavaRunner.QUICK_PROFILE_APPLET constants

Mar 27 '11; API spec. version: 1.44; affected top-level classes: org.netbeans.api.java.project.runner.JavaRunner; made by: yardus; issues: #203519

Integrating profiler into the generic project infrastructure.

Added showAlert method into theBrokenReferencesSupport

Mar 7 '11; API spec. version: 1.37; affected top-level classes: 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.

Added LibraryDefiner

Feb 2 '11; API spec. version: 1.35; affected top-level classes: 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.

Added JavadocAndSourceRootDetection.findSourceRoots method to find all source roots under the given folder

Jan 15 '10; API spec. version: 1.31; affected top-level classes: 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.

Added JavaRunner.PROP_RUNTIME_ENCODING property for COS Runner

Oct 19 '09; API spec. version: 1.28; affected top-level classes: 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.

Constants for SourceGroupModifier

Feb 18 '09; API spec. version: 1.25; affected top-level classes: JavaProjectConstants; made by: mkleint; issues: #102711

Added a few constants to JavaProjectConstants for use by SourceGroupModifier with relation to java projects.

Added JavaRunner

Sep 29 '08; API spec. version: 1.22; affected top-level classes: org.netbeans.api.java.project.runner.JavaRunner org.netbeans.spi.java.project.runner.JavaRunnerImplementation; made by: jlahoda; issues: #138504

Classes JavaRunner and JavaRunnerImplementation added.

Detection of Javadoc root and source root

Jul 22 '08; API spec. version: 1.20; affected top-level classes: JavadocAndSourceRootDetection; made by: dkonecny; issues: #124779

Class JavadocAndSourceRootDetection added with couple of helper methods to detect Javadoc and/or sources root.

Support for adding/removing relative classpath entries

Mar 27 '08; API spec. version: 1.16; affected top-level classes: ProjectClassPathModifierImplementation ProjectClassPathModifier; made by: dkonecny; issues: #129628

Allow to add/remove relative classpath entries.

Addition of ProjectClassPathModifier.addProject() method

Feb 11 '08; API spec. version: 1.24; affected top-level classes: 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..

Support for project-specific libraries

Feb 7 '08; API spec. version: 1.15; affected top-level classes: 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.

Add SourceGroup type for resources that are separate from sources

Jan 30 '07; API spec. version: 1.11; affected top-level classes: JavaProjectConstants; made by: mkleint; issues: #89204
Add a new Sourcegroup type for resources, if these are not put together with Java sources. (For example Maven based projects put resource files like images, or properties files in different source structures) Useful for creating new resource files in a project from a 3rd party module.

Semantic changes in the BrokenReferencesModel.updateReference behavior

Aug 28 '05; API spec. version: 1.6; made by: tzezula; issues: #63401
The BrokenReferencesModel was changed to support better sharability of projects. The BrokenReferencesModel always stores the resolved broken reference into the private properties as absolute files and does not affect the project properties.

Added artifact type representing folder

Apr 20 '05; API spec. version: 1.4; affected top-level classes: 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.

Switched to major release version 1

Dec 22 '04; API spec. version: 1.3; made by: jglick; issues: #51468

To indicate that this is now considered a stable API, the major release version was incremented to 1 from 0.


Compatibility:

Clients should begin requesting the new version to avoid a warning at startup.


UI Support SPI (obsoleted)

Added support classes for attaching javadoc/source to jar-based classpath items

Jan 21 '08; API spec. version: 1.14; affected top-level classes: ExtraSourceJavadocSupport LookupMergerSupport org.netbeans.spi.java.project.support.ui.EditJarSupport; made by: mkleint; issues: #70497
3 new utility classes to allow attaching javadoc/source to existing jar dependencies of an Ant-based project. These classes are for use by project type owners. Specifically

Added IncludeExcludeVisualizer support class

Mar 1 '07; API spec. version: 1.12; affected top-level classes: org.netbeans.spi.java.project.support.ui.IncludeExcludeVisualizer; made by: jglick; issues: #49026
A new utility class which is handy for previewing include and exclude patterns (Ant syntax) for source groups, for example in project customizer dialogs.

Introduction of a new interface PackageRenameHandler which allows plugging into PackageViewChildren.PackageNode.setName()

May 11 '05; API spec. version: 1.5; affected top-level classes: org.netbeans.spi.java.project.support.ui.PackageRenameHandler; made by: jbecicka; issues: #53295
Refactoring needs to handle rename of Package Nodes. It is allowed through PackageRenameHandler. Any client can put it's PackageRenameHandler into Lookup (only one instance is allowed). Implementation of packageNode.setName() will use this instance to handle rename request.

Added a new factory method for creating the name/package chooser wizard panel into the templates SPI.

Mar 21 '05; API spec. version: 1.3; affected top-level classes: 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).

Display of packages in a list added

Jan 10 '05; API spec. version: 1.3; affected top-level classes: 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.