This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
In Java freeform projects, in project/configuration/java-data/compilation-unit/annotation-processing, there are two supposedly independent elements, editor-trigger and scan-trigger. If scan-trigger is not present, editor-trigger gets ignored. However, it should work on its own especially since in large projects, it might make much more sense to have processors enabled only in the editor to speed up scanning time, since the processor might get run in a continuous integration server, for instance, instead of overloading the normal compilation process inside the IDE. Product Version = NetBeans IDE Dev (Build 101214-090a73ea0cba) Operating System = Windows 7 version 6.1 running on x86 Java; VM; Vendor = 1.6.0_19 Runtime = Java HotSpot(TM) Client VM 16.2-b04
The editor triggers requires scan triggers. Editor triggers slows down the editing so there is special option for it. Scan triggers is required if AP should be enabled to keep cache consistency (missing type generated by AP, missing error in task list, ...)
Tomas, Given your reasoning, which I understand, shouldn't the schema be changed to prevent editor-trigger to be present if scan-trigger isn't? For instance, editor-trigger could become a child of scan-trigger or maybe a boolean attribute.
It was done in this way to be similar to AnnotationProcessingQuery.Result for which the data are used. The APQ.Result has a method Set<? extends Trigger> annotationProcessingEnabled() returning the values. The user of this API (APTUtil) has the limitation that scan triggers has to be enabled if editor triggers is enabled. I don't want to change the schema as it cannot be changed due to compatibility. I will need to create freeform/4 schema and do the update from 3 to 4. This will introduce the shareability problems. But I can do following: 1st) I can return scan triggers from the query when there is editor trigger only in the project.xml (so it will work if the scan-trigers is forgotten). 2nd) Document it in the schema I personally prefer the first solution because no one reads the docs :-) What's your opinion?
Both would do, I guess, but in the end option B seems better because it doesn't give the user the false illusion that processors are disabled during scanning.
OK, I will add a note about the need of scan-triggers in the schema. I will probably also add the scan triggers in the Result but the documentation will say that the scan-triggers is required and I will log a warning.
Added the documentation, jet-main 8ea9be6bfe48. I will also add the auto adding + warning log as described above.
Fixed jet-main 5b004d5f328e
Integrated into 'main-golden', will be available in build *201012170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/8ea9be6bfe48 User: Tomas Zezula <tzezula@netbeans.org> Log: #193446:[70cat] editor-trigger is useless if scan-trigger is not present - documentation