Community
Participate
Working Groups
The DTD, WSDL, XML, and XSD validators can all be run either through the validation framework or via the "Validate X file" context action. I've opened this defect to determine whether we should continue to maintain the validate actions given that other validators such as JSP, HTML, etc., which not XML file types per se, do not have these actions. David, Vijay - I'm hoping you can give a XML neutral validation perspective on this having removed the Run Validation action from the validation framework.
My thought on this is that any validator that is being run as part of the validation framework should not have its own "Validation XXX file" action. Every validator should run off the Run Validation action. If any validator is having its own validation action, we need to understand why this action is needed and what is the limitation in the framework that is forcing for any validator have its own action.
I'm not sure what a "XML neutral validation perspective" is, but I agree. There should not be seperate actions. I'd say let's approach with following steps. 1. One action, "Run Validation" ... it works on file, or project. If folder selected, runs on files in that folder? If just a file, it picks out right validator(s) based on extension/content type. 2. Ideally, using content type based object actions, action should only appear on files/projects which are "match" for covered content types. 3. Eventually, have dynamic label, so user is re-assures its doing what they want, for example, if XML slected, would say "Validate: XML", if JSP selected, "Validate: JSP", if project selected, "Validate Project". = = = Is this the feedback needed?
Yes, This is the feedback that we need. I brought this functional requirment to Chuck's attention and at this point we do not have the resources to do this for 1.0 timeframe and I would let chuck comment on the timing and priority of this function request and when it can be done.
Chuck, Can you comment on the timing and priority of these functional requiremnts in VF.
I'm picking this back up now that we're in 1.5 and changes have already been made to the validation framework. A few of the nice features we currently get from our separate Validate actions for XML, WSDL, XSD, and DTD files are: 1. the ability to report messages other than pass/fail - for example, the XML validator provides a message that states if no grammar is detected for an XML file 2. the actions give users the ability to tell that a selected file is valid or not by the dialog that appears at the end of validation. This is arguably unnecessary as errors and warning are flagged on the file itself 3. the files are checked for their 'dirty' status and if 'dirty' (changes have been made since the last save) the user is prompted to save the file before validating it Chuck/Vijay - Can we work fixes into the validation framework for at least 1 and 3?
I vote for getting rid of the extra menu item.
> 1. the ability to report messages other than pass/fail - for example, the XML > validator provides a message that states if no grammar is detected for an XML > file Possibly just handling the neither pass nor fail messages as Warnings in the Problems view (which could be disabled at the user's request). As an aside, is there a central way of displaying user settings specific to each validator?
>Possibly just handling the neither pass nor fail messages as Warnings in the >Problems view (which could be disabled at the user's request). That may work. I'll have to take a look at the messages to see if it makes sense to display them in the Problems view. >As an aside, is there a central way of displaying user settings specific to each >validator? Not currently but Craig's team recently started investigating this. Craig - Is there an open bug for validator specific preference pages?
I've removed the Validate DTD/WSDL/XML/XSD File menu items. This bug will remain open to track the two enhancements to the Run Validation menu action that Craig and I feel are required (and I will investigate) now that the XML specific options have been removed. The two enhancements are: 1. If any of the files selected for manual validation are dirty (unsaved changes in an editor) the user should be prompted to save the files before validating them. 2. The manual validation dialog should display overall validation results. This may be number of files not valid or number of errors and warnings reported. If minimized, the progress view should maintain the validation task after it is complete so a user can select it to see the results.
I have a fix ready for the first issue I stated in comment #9. The fix will prompt the user to save any file that is included in validation that has a dirty editor. This fix requires the addition of another setting to the global validation preference page. This fix also required the resolution of bug 129977, which is included in the patches that follow. I haven't included tests at this time. Not only does no test suite exist for the validation framework but the code seems quite confusing at the moment. Vijay - I'd appreciate your review of the patches that will follow.
Created attachment 37398 [details] Patch for org.eclipse.wst.validation This patch adds a global preference for save automatically to the global preference configuration. This patch also contains a fix for bug 129977 restricting validation to the resources that were selected.
Created attachment 37399 [details] Patch for org.eclipse.wst.validation.ui This patch adds the save dialog. When manually running validation, the dialog will display with a list of files that are to be validated but are dirty and inform the user that the files must be saved prior to validating. The dialog also contains an option to always save. This option is mirrored on the global validation preference page.
I forgot to add in comment #10 that an enhancement that should be made to this patch at a later time is to only prompt to save files that will be validated. For example, if validating a project and the .project file is dirty the user will be prompted to save it even though it will not be validated by any validator.
Vijay committed and released my fix for problem 1 today. The fix will be included in the I-build from the week of 20060403.
Bug 138743 has been opened to track issue 2 from comment #9. I'm resolving this bug as the rest of the bug has been fixed and is in WTP 1.5M6.
Verified on wtp-sdk-S-1.5RC3-200605162029.
Closing bug.