| Summary: | Setting validators to manual will not fire them during incremental build | ||
|---|---|---|---|
| Product: | [WebTools] WTP Common Tools | Reporter: | Patric Rufflar <patric> |
| Component: | wst.validation | Assignee: | wst.validation <wst.validation-inbox> |
| Status: | RESOLVED INVALID | QA Contact: | Chuck Bridgham <cbridgha> |
| Severity: | major | ||
| Priority: | P3 | CC: | karasiuk, thatnitind |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
|
Description
Patric Rufflar
Patric, The build preference controls whether the validator runs a build time, including incremental build. By disabling that preference you are instructing the validator NOT to run at build time. Gary, can you please tell me how to configure WTP that a jsp will only be validated on save (AUTO_BUILD), but not on a full build (because this would take more than 10 minutes)? This was possible in WTP 3.0. Patric, I don't think that the validation framework ever worked the way that you are suggesting. I added the new validation framework to WTP in 3.0, and it hasn't changed much since then. I did a quick test on WTP 1.5.5, and it also needs the build preference turned on for validators to be called as part of incremental build. But to answer your question, no, the validation framework does not provide a way for validators to distinguish between clean builds, full builds and incrementation builds. If a resource is built by the platform, then the build validators are also run. If this is a concern, one approach would be to manually suspend all the validation before doing a clean build, do the clean build and then unsuspend validation. (You can suspend all validation with one checkbox). Hopefully, you rarely need to do clean builds. Gary, did you check the "JSP Syntax Validator" on "Manual" in your preferences? I retested it with Eclipse 3.4.2 and WTP 3.0.4, it definitely works there. My validation preferences are: All validators are unchecked, except "JSP Syntax Validator" which is checked at "Manual". A full build does not trigger validation, however, auto/incremental build does. I tried on it's cousin validator, the "HTML syntax validator", since I wasn't sure how to trigger a JSP syntax error. What is an example error that I could try? (In reply to comment #4) > A full build does not trigger validation, however, auto/incremental build does. This is verified by changes in the Markers/Problems view and activity in the Progress view? I installed Eclipse 3.4.2 and WTP 3.0.4, and I am not seeing the behavior that you described. 1) I disabled all the validators, except the JSP Syntax Validator. 2) I created a web project with a single JSP file I had auto build on. I had the build preference on for the JSP Syntax Validator. If I introduced an error, it would show up when I saved the file. As expected. If I did a clean build the error would remain. As expected. When I removed the error, the marker disappeared when I saved the file. As expected. When I turned the build preference off, the error would not show up unless I did a manual validation. Nor would fixing the error show up unless I did a manual validation. As near as I can tell, this is all working as designed. Perhaps you have project level validators set? Or maybe you are seeing as-you-type validation, which is different then build based validation. Gary, Nitin, thank both of you for your comments, I think we're getting closer. >What is an example error that I could try? For example: Create an empty jsp file and paste: <html> <body> <% bla %> </body> </html> >This is verified by changes in the Markers/Problems view and activity in the >Progress view? No, the error doesn't show up here. >Or maybe you are seeing >as-you-type validation, which is different then build based validation. Ah yes, that might be the case! (although the as-you-type validation seems be triggered on a save action only, not "as I type") This results in a slightly change of my bug report: "As-you-type-validation seems not be triggered anymore in all cases". Try the above error example in the most recent WTP and you will see that the as-you-type-validation-on-save will not mark an error in the above example while WTP 3.0 did. (validators configured as described in comment 4) Gary, Nitin, did you have any changes to test the situation described in my previous comment 8? Thank you (In reply to comment #9) > Gary, Nitin, > > did you have any changes to test the situation described in my previous comment > 8? Only whether enabling that validator for the Automatic case makes a difference. |