Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Re: collection declarations in OCL expressions
Re: collection declarations in OCL expressions [message #68665] Thu, 12 March 2009 14:50 Go to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
It's best to ask on the OCL newsgroup, which I've added to the "to" list
of the reply, so no need to repost.


exquisitus wrote:
> I forgot to precise the message error:
>
> Unknown type (MyConcept)
>
> exquisitus a écrit :
>> Hi all,
>>
>> I use OCL constraints and I have a problem using Collections:
>> This expression
>>
>> let res : OrderedSet(MyConcept) = OrderedSet{} in ...
>>
>> throws an error. Is the syntax wrong or the EMF OCL implementation
>> that does'nt support this kind of declaration ?
>>
>> Cheers.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: collection declarations in OCL expressions [message #68677 is a reply to message #68665] Thu, 12 March 2009 16:02 Go to previous messageGo to next message
Ali Koudri is currently offline Ali KoudriFriend
Messages: 118
Registered: July 2009
Senior Member
OK, thanks

Ed Merks a écrit :
> It's best to ask on the OCL newsgroup, which I've added to the "to" list
> of the reply, so no need to repost.
>
>
> exquisitus wrote:
>> I forgot to precise the message error:
>>
>> Unknown type (MyConcept)
>>
>> exquisitus a écrit :
>>> Hi all,
>>>
>>> I use OCL constraints and I have a problem using Collections:
>>> This expression
>>>
>>> let res : OrderedSet(MyConcept) = OrderedSet{} in ...
>>>
>>> throws an error. Is the syntax wrong or the EMF OCL implementation
>>> that does'nt support this kind of declaration ?
>>>
>>> Cheers.
Re: collection declarations in OCL expressions [message #68790 is a reply to message #68677] Sat, 14 March 2009 18:22 Go to previous message
Eclipse UserFriend
Originally posted by: give.a.damus.gmail.com

Hi,

Is MyConcept defined in the same package or an ancestor package of the
contextual classifier of your constraint?

If not, then the name will have to be at least partially qualified in
order for the parser to resolve the name.

This isn't a problem of collections: you would have the same result with

let c : MyConcept = ...

HTH,

Christian


exquisitus wrote:
> OK, thanks
>
> Ed Merks a écrit :
>> It's best to ask on the OCL newsgroup, which I've added to the "to"
>> list of the reply, so no need to repost.
>>
>>
>> exquisitus wrote:
>>> I forgot to precise the message error:
>>>
>>> Unknown type (MyConcept)
>>>
>>> exquisitus a écrit :
>>>> Hi all,
>>>>
>>>> I use OCL constraints and I have a problem using Collections:
>>>> This expression
>>>>
>>>> let res : OrderedSet(MyConcept) = OrderedSet{} in ...
>>>>
>>>> throws an error. Is the syntax wrong or the EMF OCL implementation
>>>> that does'nt support this kind of declaration ?
>>>>
>>>> Cheers.
Previous Topic:[Announce] MDT OCL 1.3.0 I200903110918 is available
Next Topic:Getting started with OCL/EMF validation
Goto Forum:
  


Current Time: Fri Apr 19 10:50:12 GMT 2024

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

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

Back to the top