| Summary: | Exploit New Validation Framework | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Gary Karasiuk <karasiuk> | ||||
| Component: | wst.xml | Assignee: | Lawrence Mandel <lmandel> | ||||
| Status: | CLOSED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | b.eckenfels, csalter, lmandel | ||||
| Version: | 1.5 | ||||||
| Target Milestone: | 1.5 M6 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Gary Karasiuk
Created attachment 35539 [details]
Patch to exploit the new validation framework
To test the new framework, I patched the XML validator.
One thing that still needs to be changed, is converting or removing the new message that I added. (I didn't add it to the resource bundle, but just added it as a literal).
Gary, I just tested out your patch and it appears to work fine for simple files. I see that you removed the IWorkspaceRunnable operation from ValidateAction. That operation was in place to encapsulate adding markers to the workspace in a single operation. This was a performance fix for XML files that contain many errors. When running as part of the validation framework this should no longer be needed but I'd assume it's still needed when running the validator with the Validate XML File context menu action. Did you test out this case? Can you confirm that the IWorkspaceRunnable operation is no longer needed in ValidateAction? (In reply to comment #2) Because the validator now runs as a job, you can not use the IWorkspaceRunnable operation. It will throw an exception if you try. I didn’t do much complicated testing either, but I did use the “Run Validation” menu item, to have it run against some files, and for my tests it worked fine. OK. Because the Validate XML File menu action hasn't been tested I'd feel more comfortable making this move in 1.5M6. I will also refactor the validator so the ValidateAction depends on the ValidatorJob and not the other way around (as it is currently). This will allow the ValidateAction to still use the IWorkspaceRunnable without causing problems when integrating with the validation framework. I will also do this work for the DTD, WSDL, and XSD validators. Will the M6 timeline work for you Gary? (In reply to comment #4) I have been testing my patch with the Validate XML file menu option, seems to work fine. Why do we need yet another menu item, why isn't the Run Validation menu item "good enough"? Gary, I have bug 112037 open to decide whether these actions are necessary. There are currently some benefits realized by these actions that are not available through the generic Run Validation menu item. (In reply to comment #4) > This will allow the ValidateAction to still use the > IWorkspaceRunnable without causing problems when integrating with the > validation framework. Given that the validator doesn’t (in fact can’t) change any resources why does the action need to run in an IWorkspaceRunnable ? Or if it does need to run in an IWorkspaceRunnable, can you use an Empty scheduling rule? (instead of the default … which is lock the root). >Given that the validator doesn’t (in fact can’t) change any resources why does >the action need to run in an IWorkspaceRunnable ? As I said in comment #2, although the validator isn't changing any resources it is adding markers to the resources. Adding markers individually is a slow process. Adding them in an IWorkspaceRunnable allows them to be added in a batch. This was introduced as a performance fix for XML files with many errors. >Or if it does need to run in an IWorkspaceRunnable, can you use an Empty >scheduling rule? (instead of the default … which is lock the root). I don't think there will be a problem using an empty scheduling rule. I'll look into this in M6 when I perform the refactoring of the validators and actions. *** Bug 114942 has been marked as a duplicate of this bug. *** The DTD, WSDL, XML, and XSD validators have been updated to make use of the validator jobs API. I've released the changes to the 1.5 stream. The changes should be in builds from 20060328 and later. *** Bug 132559 has been marked as a duplicate of this bug. *** Thanks for verifying. Closing bug. |