Lines 47-53
Link Here
|
47 |
import java.net.MalformedURLException; |
47 |
import java.net.MalformedURLException; |
48 |
import java.net.URL; |
48 |
import java.net.URL; |
49 |
import java.util.Arrays; |
49 |
import java.util.Arrays; |
|
|
50 |
import java.util.Collections; |
50 |
import java.util.HashSet; |
51 |
import java.util.HashSet; |
|
|
52 |
import java.util.LinkedHashMap; |
53 |
import java.util.Map; |
51 |
import java.util.Set; |
54 |
import java.util.Set; |
52 |
import java.util.logging.Level; |
55 |
import java.util.logging.Level; |
53 |
import java.util.logging.Logger; |
56 |
import java.util.logging.Logger; |
Lines 74-89
Link Here
|
74 |
private final String annotationProcessorsProperty; |
77 |
private final String annotationProcessorsProperty; |
75 |
private final Set<String> properties; |
78 |
private final Set<String> properties; |
76 |
private final String sourceOutputProperty; |
79 |
private final String sourceOutputProperty; |
|
|
80 |
private final String processorOptionsProperty; |
77 |
|
81 |
|
78 |
public AnnotationProcessingQueryImpl(AntProjectHelper helper, PropertyEvaluator evaluator, String annotationProcessingEnabledProperty, String annotationProcessingEnabledInEditorProperty, String runAllAnnotationProcessorsProperty, String annotationProcessorsProperty, String sourceOutputProperty) { |
82 |
public AnnotationProcessingQueryImpl(AntProjectHelper helper, PropertyEvaluator evaluator, String annotationProcessingEnabledProperty, String annotationProcessingEnabledInEditorProperty, String runAllAnnotationProcessorsProperty, String annotationProcessorsProperty, String sourceOutputProperty, String processorOptionsProperty) { |
79 |
this.helper = helper; |
83 |
this.helper = helper; |
80 |
this.evaluator = evaluator; |
84 |
this.evaluator = evaluator; |
81 |
this.annotationProcessingEnabledProperty = annotationProcessingEnabledProperty; |
85 |
this.annotationProcessingEnabledProperty = annotationProcessingEnabledProperty; |
82 |
this.annotationProcessingEnabledInEditorProperty = annotationProcessingEnabledInEditorProperty; |
86 |
this.annotationProcessingEnabledInEditorProperty = annotationProcessingEnabledInEditorProperty; |
83 |
this.runAllAnnotationProcessorsProperty = runAllAnnotationProcessorsProperty; |
87 |
this.runAllAnnotationProcessorsProperty = runAllAnnotationProcessorsProperty; |
84 |
this.annotationProcessorsProperty = annotationProcessorsProperty; |
88 |
this.annotationProcessorsProperty = annotationProcessorsProperty; |
85 |
this.properties = new HashSet<String>(Arrays.asList(annotationProcessingEnabledProperty, annotationProcessingEnabledInEditorProperty, runAllAnnotationProcessorsProperty, annotationProcessorsProperty, sourceOutputProperty)); |
89 |
this.properties = new HashSet<String>(Arrays.asList(annotationProcessingEnabledProperty, annotationProcessingEnabledInEditorProperty, runAllAnnotationProcessorsProperty, annotationProcessorsProperty, sourceOutputProperty, processorOptionsProperty)); |
86 |
this.sourceOutputProperty = sourceOutputProperty; |
90 |
this.sourceOutputProperty = sourceOutputProperty; |
|
|
91 |
this.processorOptionsProperty = processorOptionsProperty; |
87 |
} |
92 |
} |
88 |
|
93 |
|
89 |
private Reference<Result> cache; |
94 |
private Reference<Result> cache; |
Lines 146-151
Link Here
|
146 |
return null; |
151 |
return null; |
147 |
} |
152 |
} |
148 |
|
153 |
|
|
|
154 |
@Override |
155 |
public Map<? extends String, ? extends String> processorOptions() { |
156 |
Map<String, String> options = new LinkedHashMap<String, String>(); |
157 |
String prop = evaluator.getProperty(processorOptionsProperty); |
158 |
if (prop != null) { |
159 |
for (String option : prop.split("\\s")) { //NOI18N |
160 |
if (option.startsWith("-A") && option.length() > 2) { //NOI18N |
161 |
int sepIndex = option.indexOf('='); //NOI18N |
162 |
String key = null; |
163 |
String value = null; |
164 |
if (sepIndex == -1) |
165 |
key = option.substring(2); |
166 |
else if (sepIndex >= 3) { |
167 |
key = option.substring(2, sepIndex); |
168 |
value = (sepIndex < option.length() - 1) ? option.substring(sepIndex + 1) : null; |
169 |
} |
170 |
options.put(key, value); |
171 |
} |
172 |
} |
173 |
} |
174 |
return options; |
175 |
} |
176 |
|
149 |
public void addChangeListener(ChangeListener l) { |
177 |
public void addChangeListener(ChangeListener l) { |
150 |
cs.addChangeListener(l); |
178 |
cs.addChangeListener(l); |
151 |
} |
179 |
} |