diff -r e041ffba849c java.source/apichanges.xml --- a/java.source/apichanges.xml Thu Aug 06 14:54:40 2009 +0200 +++ b/java.source/apichanges.xml Thu Aug 06 15:50:50 2009 +0200 @@ -105,6 +105,19 @@ + + + Added CompilationInfo.getSourceVersion() method. + + + + + + Added CompilationInfo.getSourceVersion() to return the SourceVersion used by the javac compiler. + + + + Added new Method allowing creating varargs methods. @@ -113,7 +126,7 @@ - Addint TreeMake.Method(..., boolean isVarArg) to allow creation of methods with variable lenght of arguments. + Adding TreeMake.Method(..., boolean isVarArg) to allow creation of methods with variable lenght of arguments. @@ -125,7 +138,7 @@ - Addint Comment.create(Comment.Style, String) to create new comment of any style from string. + Adding Comment.create(Comment.Style, String) to create new comment of any style from string. diff -r e041ffba849c java.source/nbproject/project.properties --- a/java.source/nbproject/project.properties Thu Aug 06 14:54:40 2009 +0200 +++ b/java.source/nbproject/project.properties Thu Aug 06 15:50:50 2009 +0200 @@ -43,7 +43,7 @@ javadoc.title=Java Source javadoc.arch=${basedir}/arch.xml javadoc.apichanges=${basedir}/apichanges.xml -spec.version.base=0.45.0 +spec.version.base=0.46.0 test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\ ${o.n.core.dir}/lib/boot.jar:\ diff -r e041ffba849c java.source/src/org/netbeans/api/java/source/CompilationInfo.java --- a/java.source/src/org/netbeans/api/java/source/CompilationInfo.java Thu Aug 06 14:54:40 2009 +0200 +++ b/java.source/src/org/netbeans/api/java/source/CompilationInfo.java Thu Aug 06 15:50:50 2009 +0200 @@ -46,11 +46,13 @@ import com.sun.source.tree.Tree; import com.sun.source.util.TreePath; import com.sun.source.util.Trees; +import com.sun.tools.javac.code.Source; import com.sun.tools.javac.model.JavacElements; import java.io.IOException; import java.util.ArrayList; import java.util.Collections; import java.util.List; +import javax.lang.model.SourceVersion; import javax.lang.model.element.Element; import javax.lang.model.element.TypeElement; import javax.lang.model.util.Elements; @@ -384,7 +386,16 @@ return typeUtilities; } - + /** + * Returns the {@link SourceVersion} used by the javac represented by this {@link CompilationInfo}. + * @return SourceVersion + * @since 0.46 + */ + public @NonNull SourceVersion getSourceVersion() { + checkConfinement(); + return Source.toSourceVersion(Source.instance(impl.getJavacTask().getContext())); + } + /** * Marks this {@link CompilationInfo} as invalid, may be used to * verify confinement.