|
Re: Ant Problem [message #687206 is a reply to message #684334] |
Wed, 15 June 2011 09:32  |
Eclipse User |
|
|
|
Kai,
Is your genmodel's compliance level set to 5.0? The difference you show
depends (getting the first result) on this being true:
<%final boolean isJDK50 = genModel.getComplianceLevel().getValue() >=
GenJDKLevel.JDK50;%>
Hopefully you're not generating a new *.genmodel each time but rather
reusing the same one you use in the IDE.
Kai B. Heinz wrote:
> Hi there,
> As I described here:
> http://www.eclipse.org/forums/index.php/mv/msg/210348/675052/#msg_675052
> The XSD2Java Ant Task is a bit buggy. During my try to get a
> workaround by myself I found out that also wrong code is generated.
> Using the genmodel manually will result in:
> public FeatureMap getAny() {
> return
> (FeatureMap)getMixed().<FeatureMap.Entry>list(MyPackage.eINSTANCE.getData_Any());
>
> }
> whereas XSD2Java generates:
> public FeatureMap getAny() {
> return (FeatureMap)getMixed().list(MyPackage.eINSTANCE.getData_Any());
> }
> with the result that Eclipse says: "Cannnot cast from EList<Object> to
> FeatureMap". In my whole model this happens just once, but it seems,
> that XSD2Java is not as reliable as the EMF UI. Not very useful for a
> nightly build :( I hope development of the ANT Tasks will go on as
> they can be very useful!
>
> regards
> Kai
|
|
|
Powered by
FUDForum. Page generated in 0.19061 seconds