Overview
Introduction
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
consult the
Javadoc.
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
Mar 2 '10; API spec. version: 0.57; affected top-level classes: SourceUtils; made by: dbalek; issues:
#111292
Added SourceUtils.getAttributeValueCompletions method, which
returns a list of completions for an annotation attribute value suggested by
annotation processors.
Feb 24 '10; API spec. version: 0.56; affected top-level classes: TreeUtilities; made by: jlahoda; issues:
#180842
Added support for encoding/decoding exotic identifiers to TreeUtilities.
Oct 27 '09; API spec. version: 0.51; affected top-level classes: GeneratorUtilities; made by: jlahoda; issues:
#175020
Added GeneratorUtilities.copyComments method, which
copies comments from one tree to another tree.
Aug 14 '09; API spec. version: 0.48; affected top-level classes: TreeUtilities; made by: msauer; issues:
#170373
Added TreeUtilities.isEnumConstant() method, which
determines whether tree represents an enum constant.
Aug 12 '09; API spec. version: 0.47; affected top-level classes: CompilationInfo; made by: dbalek; issues:
#169970
Added CompilationInfo.getSourceVersion() to return the SourceVersion used by the javac compiler.
Aug 6 '09; API spec. version: 0.46; affected top-level classes: JavaSource; made by: tzezula; issues:
#169974
The JavaSource class contains methods introduced to keep binary compatibility among milestones of NB 6.0.
These methods are not needed anymore and will be removed.
May 7 '09; API spec. version: 0.44; affected top-level classes: TreeMaker; made by: moonko
Adding TreeMake.Method(..., boolean isVarArg) to allow creation of methods with variable lenght of arguments.
Mar 31 '09; API spec. version: 0.43; affected top-level classes: Comment; made by: moonko
Adding Comment.create(Comment.Style, String) to create new comment of any style from string.
Nov 24 '08; API spec. version: 0.42; affected top-level classes: JavaParserResultTask ClasspathInfo CompilationInfo CompilationController ModificationResult WorkingCopy; made by: tzezula
The java source module migrated to use the common parsing api.
Aug 13 '08; API spec. version: 0.39; affected top-level classes: CodeStyle; made by: vstejskal
Added CodeStyle.getDefault(FileObject), CodeStyle.getDefault(Document).
Deprecated CodeStyle.getDefault(Project).
Jul 7 '08; API spec. version: 0.38; affected top-level classes: BuildArtifactMapper; made by: jlahoda
Added BuildArtifactMapper.
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
Added TypeUtilities.substitute.
Mar 25 '08; API spec. version: 0.34; made by: jlahoda; issues:
#130240
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:
#123762
Added constructors taking AtomicBoolean to the CancellableTreePathScanner and CancellableTreeScanner.
Dec 14 '07; API spec. version: 0.29; made by: dbalek; issues:
#123971
Added a method to obtain ElementHandles from TypeMirrorHandles representing DeclaredTypes.
Nov 26 '07; API spec. version: 0.28; made by: tzezula; issues:
#122864
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:
#106629
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:
#106678
A utility class, org.netbeans.api.java.source.GeneratorUtilities has been added.
Jun 15 '07; API spec. version: 0.19; made by: jlahoda; issues:
#106719
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:
#93100
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:
#102333
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:
#91117
#99923
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:
#92030
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:
#91763
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:
#95399
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:
#97542
- 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
Compatibility: