Community
Participate
Working Groups
element="" is illegal for the mapping annotation. But instead of pointing out this problem with a clear error message, Sapphire would throw the following exception: Invalid Characer Error !STACK 0 org.w3c.dom.DOMException: Invalid Characer Error at org.eclipse.wst.xml.core.internal.document.DocumentImpl.createElementNS(DocumentImpl.java:400) at org.eclipse.sapphire.modeling.xml.XmlElement.addChildElement(XmlElement.java:531) at org.eclipse.sapphire.modeling.xml.XmlElement.addChildElement(XmlElement.java:559) ......
The illegal usage looks like the following examples: @XmlElementBinding( mappings = @XmlElementBinding.Mapping( element = "", type = IMyElement.class ) ) @XmlListBinding( mappings = @XmlListBinding.Mapping( element = "", type = IMyElement.class ) )
Added a check and a better worded exception. Wrote two unit tests. The error messages look like this: ITestXmlBinding0001ModelElement.TestProperty : Element name must be specified in @XmlElementBinding.Mapping annotation. Should be pretty self-explanatory at this point.
Fixed.
Verified that there is a clear message for this case.