|
15 | 15 | */ |
16 | 16 | package org.androidannotations; |
17 | 17 |
|
| 18 | +import static org.androidannotations.helper.AndroidManifestFinder.ANDROID_MANIFEST_FILE_OPTION; |
| 19 | +import static org.androidannotations.helper.ModelConstants.TRACE_OPTION; |
| 20 | + |
18 | 21 | import java.io.IOException; |
19 | 22 | import java.io.PrintWriter; |
20 | 23 | import java.io.StringWriter; |
|
24 | 27 | import javax.annotation.processing.Messager; |
25 | 28 | import javax.annotation.processing.ProcessingEnvironment; |
26 | 29 | import javax.annotation.processing.RoundEnvironment; |
| 30 | +import javax.annotation.processing.SupportedOptions; |
27 | 31 | import javax.annotation.processing.SupportedSourceVersion; |
28 | 32 | import javax.lang.model.SourceVersion; |
29 | 33 | import javax.lang.model.element.Element; |
|
327 | 331 | HierarchyViewerSupport.class // |
328 | 332 | }) |
329 | 333 | @SupportedSourceVersion(SourceVersion.RELEASE_6) |
| 334 | +@SupportedOptions({ TRACE_OPTION, ANDROID_MANIFEST_FILE_OPTION }) |
330 | 335 | public class AndroidAnnotationProcessor extends AnnotatedAbstractProcessor { |
331 | 336 |
|
332 | 337 | private final TimeStats timeStats = new TimeStats(); |
@@ -512,8 +517,8 @@ private ModelValidator buildModelValidator(IRClass rClass, AndroidSystemServices |
512 | 517 |
|
513 | 518 | private boolean traceActivated() { |
514 | 519 | Map<String, String> options = processingEnv.getOptions(); |
515 | | - if (options.containsKey("trace")) { |
516 | | - String trace = options.get("trace"); |
| 520 | + if (options.containsKey(TRACE_OPTION)) { |
| 521 | + String trace = options.get(TRACE_OPTION); |
517 | 522 | return !"false".equals(trace); |
518 | 523 | } else { |
519 | 524 | return true; |
|
0 commit comments