This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 169970
Collapse All | Expand All

(-)a/java.source/apichanges.xml (-2 / +15 lines)
Lines 105-110 Link Here
105
    <!-- ACTUAL CHANGES BEGIN HERE: -->
105
    <!-- ACTUAL CHANGES BEGIN HERE: -->
106
106
107
    <changes>
107
    <changes>
108
        <change id="CompilationInfo.getSourceVersion">
109
             <api name="general"/>
110
             <summary>Added CompilationInfo.getSourceVersion() method.</summary>
111
             <version major="0" minor="46"/>
112
             <date day="6" month="8" year="2009"/>
113
             <author login="dbalek"/>
114
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
115
             <description>
116
                 Added <code>CompilationInfo.getSourceVersion()</code> to return the SourceVersion used by the javac compiler.
117
             </description>
118
             <class package="org.netbeans.api.java.source" name="CompilationInfo"/>
119
             <issue number="169970"/>
120
        </change>
108
        <change id="TreeMaker.Method">
121
        <change id="TreeMaker.Method">
109
             <api name="general"/>
122
             <api name="general"/>
110
             <summary>Added new Method allowing creating varargs methods.</summary>
123
             <summary>Added new Method allowing creating varargs methods.</summary>
Lines 113-119 Link Here
113
             <author login="moonko"/>
126
             <author login="moonko"/>
114
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
127
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
115
             <description>
128
             <description>
116
                 Addint <code>TreeMake.Method(..., boolean isVarArg)</code> to allow creation of methods with variable lenght of arguments. 
129
                 Adding <code>TreeMake.Method(..., boolean isVarArg)</code> to allow creation of methods with variable lenght of arguments.
117
             </description>
130
             </description>
118
            <class package="org.netbeans.api.java.source" name="TreeMaker"/>
131
            <class package="org.netbeans.api.java.source" name="TreeMaker"/>
119
        </change>
132
        </change>
Lines 125-131 Link Here
125
             <author login="moonko"/>
138
             <author login="moonko"/>
126
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
139
             <compatibility addition="yes" binary="compatible" deletion="no" deprecation="no" modification="no" semantic="compatible" source="compatible"/>
127
             <description>
140
             <description>
128
                 Addint <code>Comment.create(Comment.Style, String)</code> to create new comment of any style from string. 
141
                 Adding <code>Comment.create(Comment.Style, String)</code> to create new comment of any style from string.
129
             </description>
142
             </description>
130
             <class package="org.netbeans.api.java.source" name="Comment"/>
143
             <class package="org.netbeans.api.java.source" name="Comment"/>
131
        </change>
144
        </change>
(-)a/java.source/nbproject/project.properties (-1 / +1 lines)
Lines 43-49 Link Here
43
javadoc.title=Java Source
43
javadoc.title=Java Source
44
javadoc.arch=${basedir}/arch.xml
44
javadoc.arch=${basedir}/arch.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
45
javadoc.apichanges=${basedir}/apichanges.xml
46
spec.version.base=0.45.0
46
spec.version.base=0.46.0
47
test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar
47
test.qa-functional.cp.extra=${refactoring.java.dir}/modules/ext/javac-api-nb-7.0-b07.jar
48
test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\
48
test.unit.run.cp.extra=${o.n.core.dir}/core/core.jar:\
49
    ${o.n.core.dir}/lib/boot.jar:\
49
    ${o.n.core.dir}/lib/boot.jar:\
(-)a/java.source/src/org/netbeans/api/java/source/CompilationInfo.java (-1 / +12 lines)
Lines 46-56 Link Here
46
import com.sun.source.tree.Tree;
46
import com.sun.source.tree.Tree;
47
import com.sun.source.util.TreePath;
47
import com.sun.source.util.TreePath;
48
import com.sun.source.util.Trees;
48
import com.sun.source.util.Trees;
49
import com.sun.tools.javac.code.Source;
49
import com.sun.tools.javac.model.JavacElements;
50
import com.sun.tools.javac.model.JavacElements;
50
import java.io.IOException;
51
import java.io.IOException;
51
import java.util.ArrayList;
52
import java.util.ArrayList;
52
import java.util.Collections;
53
import java.util.Collections;
53
import java.util.List;
54
import java.util.List;
55
import javax.lang.model.SourceVersion;
54
import javax.lang.model.element.Element;
56
import javax.lang.model.element.Element;
55
import javax.lang.model.element.TypeElement;
57
import javax.lang.model.element.TypeElement;
56
import javax.lang.model.util.Elements;
58
import javax.lang.model.util.Elements;
Lines 384-390 Link Here
384
        return typeUtilities;
386
        return typeUtilities;
385
    }
387
    }
386
    
388
    
387
    
389
    /**
390
     * Returns the {@link SourceVersion} used by the javac represented by this {@link CompilationInfo}.
391
     * @return SourceVersion
392
     * @since 0.46
393
     */
394
    public @NonNull SourceVersion getSourceVersion() {
395
        checkConfinement();
396
        return Source.toSourceVersion(Source.instance(impl.getJavacTask().getContext()));
397
    }
398
388
    /**
399
    /**
389
     * Marks this {@link CompilationInfo} as invalid, may be used to
400
     * Marks this {@link CompilationInfo} as invalid, may be used to
390
     * verify confinement.
401
     * verify confinement.

Return to bug 169970