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.

Bug 193446 - [70cat] editor-trigger is useless if scan-trigger is not present
Summary: [70cat] editor-trigger is useless if scan-trigger is not present
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Freeform (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-15 15:09 UTC by misterm
Modified: 2010-12-17 06:18 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description misterm 2010-12-15 15:09:30 UTC
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
Comment 1 Tomas Zezula 2010-12-15 18:01:55 UTC
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, ...)
Comment 2 misterm 2010-12-15 18:05:30 UTC
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.
Comment 3 Tomas Zezula 2010-12-15 18:24:50 UTC
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?
Comment 4 misterm 2010-12-15 18:28:14 UTC
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.
Comment 5 Tomas Zezula 2010-12-15 18:34:09 UTC
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.
Comment 6 Tomas Zezula 2010-12-16 09:45:02 UTC
Added the documentation, jet-main 8ea9be6bfe48.
I will also add the auto adding + warning log as described above.
Comment 7 Tomas Zezula 2010-12-16 13:37:17 UTC
Fixed jet-main 5b004d5f328e
Comment 8 Quality Engineering 2010-12-17 06:18:03 UTC
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