Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » [Xpand] Regression when migrating from 0.7.0 to 0.8.0M5
[Xpand] Regression when migrating from 0.7.0 to 0.8.0M5 [message #515986] Mon, 22 February 2010 07:02 Go to next message
Peter Keller is currently offline Peter Keller
Messages: 13
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 08:18 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven Efftinge
Messages: 1759
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


--
Need professional support on Xtext or Xtend?
Mail to: xtext (at) itemis.com
Twitter : @svenefftinge
Blog : blog.efftinge.de
Re: [Xpand] Regression when migrating from 0.7.0 to 0.8.0M5 [message #516892 is a reply to message #516089] Thu, 25 February 2010 08:35 Go to previous message
Peter Keller is currently offline Peter Keller
Messages: 13
Registered: October 2009
Junior Member
Quote:
Hi Peter,

this sounds pretty strange.
Could you please file a bugzilla?

Sven


Hi Sven,

OK - done: https://bugs.eclipse.org/bugs/show_bug.cgi?id=303897

In spite of what I wrote above, this problem doesn't seem to affect the running of workflows, so I filed it as an editor problem.

Regards,
Peter.
Previous Topic:[JET] <c:iterate> , arithmetic questions
Next Topic:XPand workflows and documentation?
Goto Forum:
  


Current Time: Wed Jul 23 01:49:03 EDT 2014

Powered by FUDForum. Page generated in 0.01866 seconds