Bug 254647

Summary: [ui]Validation should be triggered when changing the setting of the "indicate if grammar is not specified" preference settings
Product: [WebTools] WTP Source Editing Reporter: Gabriel Indik <gindik>
Component: wst.xmlAssignee: Sarika Sinha <sarika.sinha>
Status: RESOLVED FIXED QA Contact: Nitin Dahyabhai <thatnitind>
Severity: normal    
Priority: P3 CC: d_a_carver, gindik, itewksbu, nsand.dev, valentinbaciu
Version: 3.1Keywords: bugday, helpwanted
Target Milestone: 3.3 M6Flags: nsand.dev: review+
sarika.sinha: review? (d_a_carver)
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
patch for xml validation preference page
none
patch to use AbstractValidationSettingsPage from sse
nsand.dev: iplog+
Patch to have one AbstractValidationSettingsPage in sse and changes in XML validation to follow that nsand.dev: iplog+

Description Gabriel Indik CLA 2008-11-07 15:21:55 EST
Steps To Reproduce:
Create a project and place an XML document with no associated grammar in it. Validate the project, a warning will be displayed indicating that no grammar has been specified (default behaviour). Open the preferences dialog box and navigate to "XML" -> "XML Files" -> "Validating XML Files". Change the setting to "ignore" and apply the changes. Note the warning message will remain until the user validates the project again.
Ideally, project validation should be automatically triggered so these errors dissapear instantly.
Comment 1 Gabriel Indik CLA 2008-11-07 15:32:46 EST
Note that in similar scenarios i.e. changing the error/warning level of unused java code, the user is prompted with the following message every time the setting is changed:

"The Error/Warning settings have changed. A full rebuild is required for changes to take effect. Do the full build now?" - Yes / No / Cancel

This same approach should be used in this scenario.
Comment 2 Valentin Baciu CLA 2008-11-07 15:42:25 EST
Perhaps we should consider creating a separate preferences page for the two validation settings. That should make it easier to determine when to ask the user if they want to trigger a build.

There seems to be a trend to separate out the validation settings in their own preferences page, at least in the Web preferences section. This has been somewhat debated and weighed against placing validation settings in the validation settings pop-up dialog invoked from the validation preferences validators list.
Comment 3 David Carver CLA 2008-11-08 09:44:55 EST
(In reply to comment #2)
> Perhaps we should consider creating a separate preferences page for the two
> validation settings. That should make it easier to determine when to ask the
> user if they want to trigger a build.
 
> There seems to be a trend to separate out the validation settings in their own
> preferences page, at least in the Web preferences section. This has been
> somewhat debated and weighed against placing validation settings in the
> validation settings pop-up dialog invoked from the validation preferences
> validators list.

For XSL Tools, we have created a preference page that controls these types of settings....modeled off the HTML Preference page for similar functionality.   So I think it would be good to add this ability.

The one thing I'm starting to notice though, is that now we have preferences like this for JDT, HTML, XML, XSL, JSP, etc...all under various sections.  Starting to get cluttered a bit, don't know if this is something that can be addressed now, or maybe it's an e4 issue.


Comment 4 Ian Tewksbury CLA 2010-03-09 14:42:50 EST
This is reproducible in WTP 3.2
Comment 5 Sarika Sinha CLA 2010-09-07 01:19:37 EDT
Created attachment 178292 [details]
patch for xml validation preference page

Patch creates a property page for XML Validation preference page, moves the existing property page classes from html to xml plugin to use the base structure. Using this base property page, validation is triggered after the preference has been applied.
Comment 6 Nick Sandonato CLA 2010-12-07 15:09:55 EST
Hi Sarika,

Thanks for the patch. I noticed that we have a PropertyPreferencePage in sse.ui already. Can we merge the one from html.ui into the one from sse.ui and then instead of putting AbstractValidationSettingsPage in xml.ui, we put it in sse.ui?
Comment 7 David Carver CLA 2010-12-07 15:29:14 EST
(In reply to comment #6)
> Hi Sarika,
> 
> Thanks for the patch. I noticed that we have a PropertyPreferencePage in sse.ui
> already. Can we merge the one from html.ui into the one from sse.ui and then
> instead of putting AbstractValidationSettingsPage in xml.ui, we put it in
>

Please update XSL to use the new comming AbstractValidationSettingsPage as well, if you make a common one under sse.ui.

I may not have time until early January to update it myself.
Comment 8 Sarika Sinha CLA 2010-12-15 05:20:44 EST
Created attachment 185212 [details]
patch to use AbstractValidationSettingsPage from sse
Comment 9 Sarika Sinha CLA 2010-12-15 05:22:55 EST
Created attachment 185213 [details]
Patch to have one AbstractValidationSettingsPage in sse and changes in XML validation to follow that
Comment 10 Sarika Sinha CLA 2010-12-15 05:23:59 EST
I have attached sse and xsl patch to use the merged AbstractValidationSettingsPage.
Comment 11 Nick Sandonato CLA 2011-03-08 15:57:22 EST
I've checked in the changes including the XSL. In addition, I updated the XML Validator to respect project-level settings.