Community
Participate
Working Groups
This bug is a continuation of Bug 320322. There are still some cases that are broken. CASE 1: 0. global enable all validators 1. global preference enabled to allow project specific settings 2. project specific settings enabled for a project 3. disable validators using project specific settings 4. disabled global preference to allow project specific settings in this case ValidatorStrategy is only checking the project specific settings and does not check if the global enablement of project specific settings. CASE 2: 0. global enable all validators 1. no project specific settings 2. start causing a validation error in a file 3. do NOT save the file 4. an as you type error annotation will be added 5. still WITHOUT saving open the global validation preferences and disable all validators In this case any further typing in the unsaved document will not add further as you type validation annotations but any existing as you type validation annotations will not go away.
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