[Xpand] Regression when migrating from 0.7.0 to 0.8.0M5 [message #515986] |
Mon, 22 February 2010 12:02 |
Peter Keller Messages: 14 Registered: October 2009 |
Junior Member |
|
|
Dear all,
I have hit a regression when going to 0.8.0M5 - luckily I have been able to solve it in my case, but I would appreciate any comments about whether it reflects a deliberate change or not.
Consider the following extension, which uses the XSD of XSD as a metamodel:
extension myQName;
create xmlschema::Attribute this a2( xmlschema::SimpleType t ):
this.setType( t.qnameFromType() )
;
The extension "myQName.ext" is:
extension org::eclipse::xtend::typesystem::xsd::lib::qname;
type::QName qnameFromType ( xmlschema::SimpleType t ):
createQName( ( (xmlschema::SchemaType) t.eRootContainer).targetNamespace , t.name)
;
In 0.7.0 no errors are flagged, and workflows containing this run fine. In 0.8.0M5 there is an error at the "this.setType" line that reads:
Quote: | Couldn't find operation 'setType(javax::xml::namespace::QName)' for type 'xmlschema::Attribute'
|
In this particular case, this error can be removed by deleting the return type from the definition of qnameFromType:
qnameFromType ( xmlschema::SimpleType t ):
createQName( ( (xmlschema::SchemaType) t.eRootContainer).targetNamespace , t.name)
;
(although I have no idea what I would have had to do if the extension was a recursive one.) I then get a different error at the "this.setType" line:
Quote: | Couldn't find operation 'qnameFromType()' for type 'xmlschema::SimpleType'
|
This can be got around by changing this:
this.setType( t.qnameFromType() )
to this:
this.setType( qnameFromType(t) )
and everything works.
Is this a genuine regression, or is the original form of my code wrong in some way that has been cleaned up in 0.8.0? If so, where do I look for information about this? I haven't managed to find any release notes for the 0.8.0 sequence, and the list of bugs fixed for 0.8.0 in bugzilla doesn't seem to contain anything relevant.
Regards,
Peter.
|
|
|
Re: [Xpand] Regression when migrating from 0.7.0 to 0.8.0M5 [message #516089 is a reply to message #515986] |
Mon, 22 February 2010 13:18 |
Sven Efftinge Messages: 1823 Registered: July 2009 |
Senior Member |
|
|
Hi Peter,
this sounds pretty strange.
Could you please file a bugzilla?
Sven
Peter Keller schrieb:
> Dear all,
>
> I have hit a regression when going to 0.8.0M5 - luckily I have been able
> to solve it in my case, but I would appreciate any comments about
> whether it reflects a deliberate change or not.
>
> Consider the following extension, which uses the
> http://www.w3.org/2001/XMLSchema.xsd as a metamodel:
>
> extension myQName;
>
> create xmlschema::Attribute this a2( xmlschema::SimpleType t ):
> this.setType( t.qnameFromType() )
> ;
>
> The extension "myQName.ext" is:
>
> extension org::eclipse::xtend::typesystem::xsd::lib::qname;
>
> type::QName qnameFromType ( xmlschema::SimpleType t ):
> createQName( ( (xmlschema::SchemaType)
> t.eRootContainer).targetNamespace , t.name)
> ;
>
> In 0.7.0 no errors are flagged, and workflows containing this run fine.
> In 0.8.0M5 there is an error at the "this.setType" line that reads:
>
> Quote:
>> Couldn't find operation 'setType(javax::xml::namespace::QName)' for
>> type 'xmlschema::Attribute'
>
>
> In this particular case, this error can be removed by deleting the
> return type from the definition of qnameFromType:
>
> qnameFromType ( xmlschema::SimpleType t ):
> createQName( ( (xmlschema::SchemaType)
> t.eRootContainer).targetNamespace , t.name)
> ;
>
> (although I have no idea what I would have had to do if the extension
> was a recursive one.) I then get a different error at the "this.setType"
> line:
>
> Quote:
>> Couldn't find operation 'qnameFromType()' for type
>> 'xmlschema::SimpleType'
>
>
> This can be got around by changing this:
>
> this.setType( t.qnameFromType() )
>
> to this:
>
> this.setType( qnameFromType(t) )
>
> and everything works.
>
> Is this a genuine regression, or is the original form of my code wrong
> in some way that has been cleaned up in 0.8.0? If so, where do I look
> for information about this? I haven't managed to find any release notes
> for the 0.8.0 sequence, and the list of bugs fixed for 0.8.0 in bugzilla
> doesn't seem to contain anything relevant.
>
> Regards,
> Peter.
--
Need professional support for Xtext and EMF?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
|
|
|
|
Powered by
FUDForum. Page generated in 0.03135 seconds