Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » QVT-OML » Error "ObjectDeclsCS" expected after "object"
Error "ObjectDeclsCS" expected after "object" [message #870543] Tue, 08 May 2012 15:47 Go to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Hello,

In a qvto script I have this object creation:

object {
ownedMember += ownedPackages->collect(thisPackage |
createPackage(thisPackage))->asOrderedSet();
}

The dynamic interpretor (red crossed circle) shows me the following error:
"ObjectDeclsCS" expected after "object"

How can it be fix.

Thanks.
Re: Error "ObjectDeclsCS" expected after "object" [message #870556 is a reply to message #870543] Tue, 08 May 2012 16:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7676
Registered: July 2009
Senior Member
Hi

+= looks suspect.

When a complicated expression doesn't work, make it simpler till it does
then all becomes clear.

Regards

Ed Willink

On 08/05/2012 16:47, Alain Lavoie wrote:
> Hello,
>
> In a qvto script I have this object creation:
>
> object {
> ownedMember += ownedPackages->collect(thisPackage |
> createPackage(thisPackage))->asOrderedSet();
> }
>
> The dynamic interpretor (red crossed circle) shows me the following
> error:
> "ObjectDeclsCS" expected after "object"
>
> How can it be fix.
>
> Thanks.
Re: Error "ObjectDeclsCS" expected after "object" [message #870600 is a reply to message #870556] Tue, 08 May 2012 22:02 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Ed Willink a écrit :
>
> += looks suspect.
>
> When a complicated expression doesn't work, make it simpler till it does
> then all becomes clear.

This comes from an extract of the [Quick Start Guide to MDA]
from Borland.

I will avoid mixing Qvt samples from different implementors.

Thanks.
Re: Error "ObjectDeclsCS" expected after "object" [message #870622 is a reply to message #870600] Wed, 09 May 2012 06:23 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7676
Registered: July 2009
Senior Member
HI

You're not mixing implementors; just using vintage or inadequately
proof-read material.

Quick Start Guide to MDA is dated September 2006, and refers to OMG document
ptc/05-11-01 (MOF 2.0 Query/View/Transformation final adopted
specification).

The specification has not changed significantly since then. Looking at
the spec, I can find no justification for "object" in

mapping ... {
init { ... }
object { ... }
}

It seems that this usage of "object" was recognised to be redundant (in
perhaps 2004/2005) so that the syntax is

mapping ... {
init { ... }
....
}
optionally

mapping ... {
init { ... }
population { ... }
}

The residual usage of object is as a type constructor in an expression

object s:Schema {
name := self.name;
table := self.ownedElement->map class2table();
}

where += is an option, but not normally necessary since you start from
scratch.

If you're going to use QVTo, you should familiarize yourself with the
specification; it's not perfect but at least gives a vendor-independent
view of what should be right.

Regards

Ed Willink


On 08/05/2012 23:02, Alain Lavoie wrote:
> Ed Willink a écrit :
> >
> > += looks suspect.
> >
> > When a complicated expression doesn't work, make it simpler till it
> does
> > then all becomes clear.
>
> This comes from an extract of the [Quick Start Guide to MDA]
> from Borland.
>
> I will avoid mixing Qvt samples from different implementors.
>
> Thanks.
Re: Error "ObjectDeclsCS" expected after "object" [message #870728 is a reply to message #870622] Wed, 09 May 2012 13:23 Go to previous message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Ed Willink a écrit :
> HI
>
>...

Excellent answer. Thanks, I will follow your advises.

Regards.
Previous Topic:Failed to resolve metamodel when debugging
Next Topic:Using oclIsTypeOf() with a variable argument
Goto Forum:
  


Current Time: Thu Oct 10 23:37:50 GMT 2024

Powered by FUDForum. Page generated in 0.03742 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top