#174202: introducing JavaClassPathConstants.PROCESSOR_PATH. 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,23 @@ + + + Introducing JavaClassPathConstants.PROCESSOR_PATH + + + + + +

+ Class org.netbeans.api.java.classpath.JavaClassPathConstants is created to hold java specific classpath constants. + org.netbeans.api.java.classpath.JavaClassPathConstants.PROCESSOR_PATH constant is created as a key + for Java processor path. +

+
+ + +
Splitting the java API to independent ClassPath API and the rest of the java API 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.21 +OpenIDE-Module-Specification-Version: 1.22 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 new file mode 100644 --- /dev/null +++ b/api.java/src/org/netbeans/api/java/classpath/JavaClassPathConstants.java @@ -0,0 +1,61 @@ +/* + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. + * + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. + * + * The contents of this file are subject to the terms of either the GNU + * General Public License Version 2 only ("GPL") or the Common + * Development and Distribution License("CDDL") (collectively, the + * "License"). You may not use this file except in compliance with the + * License. You can obtain a copy of the License at + * http://www.netbeans.org/cddl-gplv2.html + * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the + * specific language governing permissions and limitations under the + * License. When distributing the software, include this License Header + * Notice in each file and include the License file at + * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this + * particular file as subject to the "Classpath" exception as provided + * by Sun in the GPL Version 2 section of the License file that + * accompanied this code. If applicable, add the following below the + * License Header, with the fields enclosed by brackets [] replaced by + * your own identifying information: + * "Portions Copyrighted [year] [name of copyright owner]" + * + * If you wish your version of this file to be governed by only the CDDL + * or only the GPL Version 2, indicate your decision by adding + * "[Contributor] elects to include this software in this distribution + * under the [CDDL or GPL Version 2] license." If you do not indicate a + * single choice of license, a recipient has the option to distribute + * your version of this file under either the CDDL, the GPL Version 2 or + * to extend the choice of license to its licensees as provided above. + * However, if you add GPL Version 2 code and therefore, elected the GPL + * Version 2 license, then the option applies only if the new code is + * made subject to such option by the copyright holder. + * + * Contributor(s): + * + * Portions Copyrighted 2009 Sun Microsystems, Inc. + */ + +package org.netbeans.api.java.classpath; + +/** + * Java related classpath constants. + * + * @author Jan Lahoda + * @since 1.22 + */ +public class JavaClassPathConstants { + + /** + * ClassPath for annotation processors. If undefined, {@link ClassPath#COMPILE} + * should be used. + *

+ * It corresponds to the -processorpath option of javac. + *

+ * + * @since 1.22 + */ + public static final String PROCESSOR_PATH = "classpath/processor"; + +} diff --git a/apisupport.project/nbproject/project.xml b/apisupport.project/nbproject/project.xml --- a/apisupport.project/nbproject/project.xml +++ b/apisupport.project/nbproject/project.xml @@ -70,7 +70,7 @@ 1 - 1.18 + 1.22 diff --git a/apisupport.project/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java b/apisupport.project/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java --- a/apisupport.project/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java +++ b/apisupport.project/src/org/netbeans/modules/apisupport/project/queries/ClassPathProviderImpl.java @@ -57,6 +57,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; import org.netbeans.api.java.classpath.ClassPath; +import org.netbeans.api.java.classpath.JavaClassPathConstants; import org.netbeans.spi.java.classpath.ClassPathFactory; import org.netbeans.spi.java.classpath.ClassPathImplementation; import org.netbeans.spi.java.classpath.ClassPathProvider; @@ -125,7 +126,7 @@ LOG.log(Level.FINE, "compile/execute-time classpath for file '" + file.getPath() + "' (prj: " + project + "): " + compile); } return compile; - } else if (type.equals(ClassPath.EXECUTE)) { + } else if (type.equals(ClassPath.EXECUTE) || type.equals(JavaClassPathConstants.PROCESSOR_PATH)) { if (execute == null) { execute = ClassPathFactory.createClassPath(createExecuteClasspath()); } @@ -145,7 +146,7 @@ LOG.log(Level.FINE, "compile-time classpath for tests for file '" + file.getPath() + "' (prj: " + project + "): " + testCompile); } return testCompile; - } else if (type.equals(ClassPath.EXECUTE)) { + } else if (type.equals(ClassPath.EXECUTE) || type.equals(JavaClassPathConstants.PROCESSOR_PATH)) { if (testExecute == null) { testExecute = ClassPathFactory.createClassPath(createTestExecuteClasspath("unit")); LOG.log(Level.FINE, "runtime classpath for tests for file '" + file.getPath() + "' (prj: " + project + "): " + testExecute); @@ -171,7 +172,7 @@ LOG.log(Level.FINE, "compile-time classpath for func tests for file '" + file.getPath() + "' (prj: " + project + "): " + funcTestCompile); } return funcTestCompile; - } else if (type.equals(ClassPath.EXECUTE)) { + } else if (type.equals(ClassPath.EXECUTE) || type.equals(JavaClassPathConstants.PROCESSOR_PATH)) { if (funcTestExecute == null) { funcTestExecute = ClassPathFactory.createClassPath(createTestExecuteClasspath("qa-functional")); }