This document lists changes made to the Java Source 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
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.source > 1.20
Aug 13 '08; API spec. version: 0.39; affected top-level classes:
CodeStyle; made by: vstejskal
Jul 7 '08; API spec. version: 0.38; affected top-level classes:
BuildArtifactMapper; made by: jlahoda
Jun 25 '08; API spec. version: 0.37; made by: msauer
Added Methods allowing tagging of trees and getting their span inside modified document.
May 6 '08; API spec. version: 0.36; affected top-level classes:
TypeUtilities; made by: jlahoda
Mar 25 '08; API spec. version: 0.34; made by: jlahoda; issues:
Added method to create a new method tree for given method element.
Mar 15 '08; API spec. version: 0.33; made by: jpokorsky
Added methods to allow ModificationResult to write changes into guarded sections of a document in case the API client
is aware of what he does.
Jan 25 '08; API spec. version: 0.31; made by: tzezula
Added method to return the reparsed subtree of the CompilationUnit tree, the result of this method should be used as a hint
for the registered tasks to update model only for the changed subtree rather than for the whole CompilationUnit tree.
Dec 21 '07; API spec. version: 0.30; made by: jlahoda; issues:
Added constructors taking AtomicBoolean to the CancellableTreePathScanner and CancellableTreeScanner.
Dec 14 '07; API spec. version: 0.29; made by: dbalek; issues:
Added a method to obtain ElementHandles from TypeMirrorHandles representing DeclaredTypes.
Nov 26 '07; API spec. version: 0.28; made by: tzezula; issues:
Added ClassIndex.NameKind.CAMEL_CASE_INSENSITIVE used by code completion for getting camel case names.
Jun 15 '07; API spec. version: 0.21; made by: jlahoda; issues:
Adding ability to use Java infrastructure for non-Java file (eg. JSP files) and inside dialogs.
Jun 15 '07; API spec. version: 0.20; made by: jlahoda; issues:
A utility class, org.netbeans.api.java.source.GeneratorUtilities has been added.
Jun 15 '07; API spec. version: 0.19; made by: jlahoda; issues:
Removal of a few obsolete, duplicated and deprecated methods from java/source.
Jun 15 '07; API spec. version: 0.18; made by: tzezula
The JavaSource.runModificationTask(), runWhenScanFinished() and runUserActionTask() never call the cancel method of the
CancellableTask, the implementor of such a CancellableTask just writes an empty cancel method. The compatible API
change splits the CancellableTask into Task with run method and CancellableTask which extends the Task by cancel method.
The JavaSource methods mentioned above take Task rather than CancellableTask. The CancellableTask is used only for tasks
registered by factories.
Jun 13 '07; API spec. version: 0.16; made by: tzezula
The ClassIndex methods called from the CancellableTask are cancellable. In case when they are cancelled by the JavaSource infrastructure
they return null instead of the Set to allow client to determine this state. The incompatible semantic change is that tasks registered by
factories have to check if the value returned from class index is null.
Jun 5 '07; API spec. version: 0.14; made by: tzezula; issues:
Added a method to obtain top level elements defined in the given source or class file.
Apr 24 '07; API spec. version: 0.13; made by: jbecicka; issues:
There is no simple way how to weakly reference all elements from javac. For instance local variables cannot be referenced by
ElementHandles while source-less Elements cannot be referenced by TreePathHandles. This fix allows to create TreePathHandles
for any javac Element (both local and source less).
Apr 19 '07; API spec. version: 0.12; made by: tzezula; issues:
The JavaSource.runWhenScanFinished performs the given task either synchronously when no background scan is running. When the background
scan is running the task is performed asynchronously when the scan completes.
Apr 13 '07; API spec. version: 0.10; made by: tzezula; issues:
The refactoring and find usages need to find the dependent roots of a project root in which the refactored type
is declared, but finding such an information using the project API may be very expensive especially when lots of
projects is opened. The goal of this API is to provide and cache this information.
Apr 4 '07; API spec. version: 0.8; made by: tzezula; issues:
The listener for listening on changes in the
ClassIndex was added. The listener fires
events when a declared type was removed, added, changed in the
ClassIndex oe when the underlaying
ClassPath was changed.
Mar 26 '07; API spec. version: 0.7; made by: jpokorsky; issues:
Added the template attribute
package for templates using scripting language.
Mar 18 '07; API spec. version: 0.6; affected top-level classes:
TypeUtilities; made by: jlahoda; issues:
- removed org.netbeans.api.java.source.CommentUtilities
- removed org.netbeans.api.java.source.TreeMaker.Variable(..., TypeElement)
- removed org.netbeans.api.java.source.TreeMaker.Method(..., TypeElement)
- added org.netbeans.api.java.source.TypeUtilities