| Summary: | [validation] JSP source validators still sometimes running even when respective batch validators have been turned off | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Ian Tewksbury <itewksbu> | ||||||||
| Component: | wst.sse | Assignee: | Ian Tewksbury <itewksbu> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | Nitin Dahyabhai <thatnitind> | ||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | ccc, keith.chong.ca, nsand.dev | ||||||||
| Version: | 3.0.5 | Flags: | nsand.dev:
review+
thatnitind: review+ |
||||||||
| Target Milestone: | 3.0.5 P | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Ian Tewksbury
Created attachment 181665 [details]
Fix Patch
Patch to fix the issues mentioned in the description.
Ian, the thing that concerns me is that this blows away all annotations. So, for example, you'll lose spelling annotations. Spelling might be small, but there may be other--more important--annotations added by contributors to the editor. Created attachment 181715 [details]
Fix Patch - Update 1
Bummer, didn't realize it was a shared model like that.
This new patch iterates over all of the existing annotations and removes only those of type:
TemporaryAnnotation.ANNOT_ERROR
TemporaryAnnotation.ANNOT_WARNING
TemporaryAnnotation.ANNOT_INFO
Where TemporaryAnnotation is an SSE class. In this way I hope I am only removing the annotations that will be added back if the validator is turned back on. I tested this and at least spelling markers now stay.
My only worry is if these TemporaryAnnotation are used for something else that this will now blow away. Though if that is the case I don't see any other identifying information on the TemporaryAnnotation that ValidatorStrategy could use to know which ones to remove. Not saying such info doesnt exist, or that such info couldn't be added, I just don't see anything else.
Ian, there were several cases where I disabled all validators, globally or at the project level, where annotations were being generated after typing in the editor. I didn't notice this problem before the patch. Can you investigate if this is a result of the changes? Also, I don't think you need to clean up the ANNOT_INFO markers. Created attachment 181738 [details] Fix Patch - Update 2 (In reply to comment #4) > Ian, there were several cases where I disabled all validators, globally or at > the project level, where annotations were being generated after typing in the > editor. I didn't notice this problem before the patch. Can you investigate if > this is a result of the changes? That is caused by issues in the Val framework. The Val framework team is currently working on a patch to fix that up. > Also, I don't think you need to clean up the ANNOT_INFO markers. I did this by taking it a step further. As we discussed only the annotations for the disabled validators used by the ValStrat should be removed. To this end I updated the patch to determine which validators are disabled and associated with the ValStrat and then only remove the annotations associated with those validators. (In reply to comment #5) > Created an attachment (id=181738) [details] > Fix Patch - Update 2 > (In reply to comment #4) > > Ian, there were several cases where I disabled all validators, globally or at > > the project level, where annotations were being generated after typing in the > > editor. I didn't notice this problem before the patch. Can you investigate if > > this is a result of the changes? > That is caused by issues in the Val framework. The Val framework team is > currently working on a patch to fix that up. > > Also, I don't think you need to clean up the ANNOT_INFO markers. > I did this by taking it a step further. As we discussed only the annotations > for the disabled validators used by the ValStrat should be removed. To this > end I updated the patch to determine which validators are disabled and > associated with the ValStrat and then only remove the annotations associated > with those validators. See bug 329997, against the VF. Patch looks good. Thanks, Ian. Committed to R3_0_5_patches |