diff --git a/api.java.classpath/src/org/netbeans/api/java/classpath/ClassPath.java b/api.java.classpath/src/org/netbeans/api/java/classpath/ClassPath.java --- a/api.java.classpath/src/org/netbeans/api/java/classpath/ClassPath.java +++ b/api.java.classpath/src/org/netbeans/api/java/classpath/ClassPath.java @@ -129,7 +129,9 @@ * URLClassLoader (plus URLs present in parent class loaders * but excluding the bootstrap and extension class loaders). *

+ * @deprecated Use {@link org.netbeans.api.java.classpath.JavaClassPathConstants.SOURCE} */ + @Deprecated public static final String EXECUTE = "classpath/execute"; /** @@ -147,7 +149,9 @@ * i.e. already-compiled classes which some new sources need to compile against, * besides what is already in the JRE. *

+ * @deprecated Use {@link org.netbeans.api.java.classpath.JavaClassPathConstants.COMPILE} */ + @Deprecated public static final String COMPILE = "classpath/compile"; /** @@ -169,7 +173,9 @@ *

* * @since org.netbeans.api.java/1 1.4 + * @deprecated Use {@link org.netbeans.api.java.classpath.JavaClassPathConstants.SOURCE} */ + @Deprecated public static final String SOURCE = "classpath/source"; /** @@ -187,7 +193,9 @@ * application. *

* @since org.netbeans.api.java/1 1.4 + * @deprecated Use {@link org.netbeans.api.java.classpath.JavaClassPathConstants.BOOT} */ + @Deprecated public static final String BOOT = "classpath/boot"; /** diff --git a/api.java/apichanges.xml b/api.java/apichanges.xml --- a/api.java/apichanges.xml +++ b/api.java/apichanges.xml @@ -73,6 +73,19 @@ + + + ClassPath types consolidated into a single place + + + + + +

Moved all java related ClassPath types into a single class rahter than having them in three different modules.

+
+ + +
Introducing AnnotationProcessingQuery diff --git a/api.java/manifest.mf b/api.java/manifest.mf --- a/api.java/manifest.mf +++ b/api.java/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.api.java/1 -OpenIDE-Module-Specification-Version: 1.25 +OpenIDE-Module-Specification-Version: 1.26 OpenIDE-Module-Localizing-Bundle: org/netbeans/api/java/queries/Bundle.properties AutoUpdate-Show-In-Client: false diff --git a/api.java/src/org/netbeans/api/java/classpath/JavaClassPathConstants.java b/api.java/src/org/netbeans/api/java/classpath/JavaClassPathConstants.java --- a/api.java/src/org/netbeans/api/java/classpath/JavaClassPathConstants.java +++ b/api.java/src/org/netbeans/api/java/classpath/JavaClassPathConstants.java @@ -41,11 +41,83 @@ /** * Java related classpath constants. - * + * * @author Jan Lahoda + * @author Tomas Zezula * @since 1.22 */ public class JavaClassPathConstants { + + /** + * Classpath setting for executing things. This type can be used to learn + * runtime time classpath for execution of the file in question. + *

+ * It corresponds to the -classpath option to java + * (the Java launcher): i.e. all compiled classes outside the JRE that + * will be needed to run the program, or at least to load a certain class. + * It may also be thought of as corresponding to the list of URLs in a + * URLClassLoader (plus URLs present in parent class loaders + * but excluding the bootstrap and extension class loaders). + *

+ * @since 1.26 + */ + @SuppressWarnings("deprecation") //NOI18N + public static final String EXECUTE = ClassPath.EXECUTE; + + /** + * ClassPath for compiling things. This type can be used to learn + * compilation time classpath for the file in question. + *

+ * It corresponds to the -classpath option to javac: + * i.e. already-compiled classes which some new sources need to compile against, + * besides what is already in the JRE. + *

+ * @since 1.26 + */ + @SuppressWarnings("deprecation") //NOI18N + public static final String COMPILE = ClassPath.COMPILE; + + /** + * ClassPath for project sources. This type can be used to learn + * package root of the file in question. + *
+ *

+ * It is similar to the -sourcepath option of javac. + *

+ *

+ * For typical source files, the sourcepath will consist of one element: + * the package root of the source file. If more than one package root is + * to be compiled together, all the sources should share a sourcepath + * with multiple roots. + *

+ *

+ * Note that each source file for which editor code completion (and similar + * actions) should work should have a classpath of this type. + *

+ *
+ * @since 1.26 + */ + @SuppressWarnings("deprecation") //NOI18N + public static final String SOURCE = ClassPath.SOURCE; + + /** + * Boot ClassPath of the JDK. This type can be used to learn boot classpath + * which should be used for the file in question. + *

+ * It corresponds to the -Xbootclasspath and -Xext + * options to java (the Java launcher): i.e. all compiled + * classes in the JRE that will be needed to run the program. + * It may also be thought of as corresponding to the classes loadable + * by the primordial bootstrap class loader plus the standard + * extension and endorsed-library class loaders; i.e. class loaders lying + * below the regular application startup loader and any custom loaders. + * Generally there ought to be a single boot classpath for the entire + * application. + *

+ * @since 1.26 + */ + @SuppressWarnings("deprecation") //NOI18N + public static final String BOOT = ClassPath.BOOT; /** * ClassPath for annotation processors. If undefined, {@link ClassPath#COMPILE} @@ -56,6 +128,12 @@ * * @since 1.22 */ - public static final String PROCESSOR_PATH = "classpath/processor"; - + public static final String PROCESSOR_PATH = "classpath/processor"; //NOI18N + + /** + * Classpath for endorsed libraries. See {@link ClassPath} for other classpath + * types. + * @since 1.26 + */ + public static final String ENDORSED = "classpath/endorsed"; //NOI18N } diff --git a/java.api.common/nbproject/project.xml b/java.api.common/nbproject/project.xml --- a/java.api.common/nbproject/project.xml +++ b/java.api.common/nbproject/project.xml @@ -20,7 +20,7 @@ 1 - 1.18 + 1.26 diff --git a/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ClassPathSupport.java b/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ClassPathSupport.java --- a/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ClassPathSupport.java +++ b/java.api.common/src/org/netbeans/modules/java/api/common/classpath/ClassPathSupport.java @@ -56,6 +56,7 @@ import java.util.regex.Pattern; import org.netbeans.api.java.classpath.ClassPath; +import org.netbeans.api.java.classpath.JavaClassPathConstants; import org.netbeans.api.project.ant.AntArtifact; import org.netbeans.api.project.libraries.Library; import org.netbeans.api.project.libraries.LibraryManager; @@ -82,8 +83,10 @@ * Classpath for endorsed libraries. See {@link ClassPath} for other classpath * types. * @since org.netbeans.modules.java.api.common/0 1.11 + * @deprecated Use {@link org.netbeans.api.java.classpath.JavaClassPathConstants.ENDORSED} */ - public static final String ENDORSED = "classpath/endorsed"; + @Deprecated + public static final String ENDORSED = JavaClassPathConstants.ENDORSED; // Prefixes and suffixes of classpath private static final String LIBRARY_PREFIX = "${libs."; // NOI18N