mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
external make: correctly initialize annotation processor path for eclipse compiler
This commit is contained in:
@@ -75,6 +75,10 @@ public class JavacMain {
|
||||
if (!classpath.isEmpty()) {
|
||||
try {
|
||||
fileManager.setLocation(StandardLocation.CLASS_PATH, classpath);
|
||||
if (!nowUsingJavac && !isOptionSet(options, "-processorpath")) {
|
||||
// for non-javac file manager ensure annotation processor path defaults to classpath
|
||||
fileManager.setLocation(StandardLocation.ANNOTATION_PROCESSOR_PATH, classpath);
|
||||
}
|
||||
}
|
||||
catch (IOException e) {
|
||||
fileManager.getContext().reportMessage(Diagnostic.Kind.ERROR, e.getMessage());
|
||||
@@ -148,6 +152,15 @@ public class JavacMain {
|
||||
return true;
|
||||
}
|
||||
|
||||
private static boolean isOptionSet(final Collection<String> options, String option) {
|
||||
for (String opt : options) {
|
||||
if (option.equals(opt)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private static Collection<String> prepareOptions(final Collection<String> options, boolean usingJavac) {
|
||||
final List<String> result = new ArrayList<String>();
|
||||
if (usingJavac) {
|
||||
|
||||
Reference in New Issue
Block a user