| Summary: | Resolve issues with ValidValues annotation | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Brian Svihovec <svihovec> | ||||
| Component: | EDT | Assignee: | Paul Harmon <pharmon> | ||||
| Status: | CLOSED INVALID | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | jspadea | ||||
| Version: | unspecified | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
This problem occurs because Validvalues.value is defined as an ANY[], but it really should be defined as ANY[][]. The deserializer needs to know when it is dealing with an array type. Since the list type in this case is an ANY, and it gets a list as the value, the deserializer doesnt know how to handle it. There are a few ways to deal with this in the future: 1) Split up validValues into ValidValuesRanges and ValidValuesMatches. The former would take any[][] and the latter would take any[] 2) Keep validvalues, but change the definition to any[][]. Add an annotation onto the value field so that validation would allow non-array entries to be specified, such as validValues = [1, 2, 3, [6, 10]]. Validation would translate this into: [[1],[2],[3],[6,10]] For now, we will defer this out of 0.7 since it is not really needed right now Since this was originally a problem in the definition of the annotation, and now that annotation no longer exists, I'm resolving as invalid. Closing all bugs in the RESOLVED state with reason INVALID, WONTFIX, DUPLICATE, WORKSFORME, or NOT_ECLIPSE. |
Created attachment 204559 [details] Testcase. Import the attached EGL file. NOTE: This file has no dependencies on other files or parts. When the file is saved and built, you will see the following exception being thrown: org.eclipse.edt.mof.serialization.DeserializationException: java.lang.ClassCastException: java.lang.String cannot be cast to org.eclipse.edt.mof.EObject at org.eclipse.edt.mof.serialization.xml.XMLDeserializer.deserialize(XMLDeserializer.java:79) at org.eclipse.edt.mof.serialization.AbstractObjectStore.get(AbstractObjectStore.java:69) at org.eclipse.edt.ide.rui.internal.lookup.PreviewIREnvironment.find(PreviewIREnvironment.java:94) at org.eclipse.edt.compiler.internal.egl2mof.Egl2MofBase.getMofSerializable(Egl2MofBase.java:1341) ... Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to org.eclipse.edt.mof.EObject at org.eclipse.edt.mof.serialization.xml.XMLDeserializer.startElement(XMLDeserializer.java:150) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source) at org.eclipse.edt.mof.serialization.xml.XMLDeserializer.deserialize(XMLDeserializer.java:77) ... 41 more