google-code-export / smartgwt

Automatically exported from code.google.com/p/smartgwt
1 stars 3 forks source link

Schema javascript fragment files should not be named *.ds.xml #675

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
SmartGWT 3.0, GWT 2.4.0, GPE 2.6.1  Eclipse 3.7/Springsource Tool Suite 2.9.2:

I have a very strong opinion that the schema fragment files war/{app 
module}/sc/schema/*.ds.xml

should not have the extension xml.

They are javascript files. Naming with extension xml confuses the Eclipse XML 
validator. Eclipse problem pane is profligate with XML problems due to 
detecting javascript rather than valid XML in SmartGWT generated "XML" files.

There are two ways I could work around this:
- set up an inclusive working set to include only the folders I need XML 
validation.
- or, disable XML altogether.

Neither of the above methods are desirable. Reason ...

Eclipse validation/error/warning detection requires an inclusive working set, 
not an exclusionary one. That means, I cannot set up a working set to exclude 
"war/{app module}/sc/schema/". But, I can set up a working set that includes 
all other directories that I wish to require XML validation. Spending time thus 
discovering which directories require XML validation is another profligacy (of 
time and focus). 

I also cannot afford to turn off XML validation altogether.

I wish to thank SmartGWT and Sanjiv for their kind provision of SmargGWT, which 
has helped the GWT community extremely well. I hope this is not too complex an 
issue to resolve. I would be willing contribute any efforts necessary to 
resolve this issue.

Original issue reported on code.google.com by BlessedGeek on 12 Jun 2012 at 2:39

GoogleCodeExporter commented 9 years ago
This is one of many instances of Eclipse automatically turning on undesirable 
validation (another is validating any file ending with .xml as a whole 
document) and, as you point out, providing inadequate UI to turn it off.  It 
should be as simple as, for example, right clicking on some warnings and 
telling Eclipse to stop reporting them for the folder.

So this is properly an Eclipse issue, but we will at some point implement a 
workaround of renaming the files.  For reasons too complex to get into, this is 
not trivial.

Original comment by smartgwt...@gmail.com on 12 Jun 2012 at 3:59

GoogleCodeExporter commented 9 years ago
As a workaround in Eclipse:

go to: Window > Preferences > Validation > XML Validator > Column Settings

and add a rule to the exclude group for folder target.

Original comment by o...@off-topic.biz on 10 Jul 2012 at 8:59