Link Constraint with oclIsKindOf [message #121619] |
Wed, 25 April 2007 03:55  |
Eclipse User |
|
|
|
Hello,
I have two Metamodels: Core and Entity (Entity knows Core). Core defines
something like ModelElement and Dependency. In the Editor I created a
LinkMapping to have Dependencies between entity::Entity and
entity::EntityConstants. Of cource, the the normal behavior is that one
can create Dependencies between all ModelElements and this is not what I
want. I want to restrict the Dependency creation to Entity ->
EntityConstants.
I tried to define link constraints like:
self.oclIsKindOf(EntityConstants)
self.oclIsKindOf(Entity)
This fails because Entity/EntityConstants seem to be unknown:
Invalid expression body 'self.oclIsKindOf(Entity)
'. Cause: Invalid expression body 'self.oclIsKindOf(Entity)
'. Cause: ERROR in (variableExpCS): (Unrecognized variable: (Entity))
Can anyone give me hint how to proceed.
Cheers,
Mathias
|
|
|
|
|
Re: Link Constraint with oclIsKindOf [message #125410 is a reply to message #125057] |
Thu, 10 May 2007 08:12   |
Eclipse User |
|
|
|
Hi Mathias,
Use both type names as qualified, the way Alex has suggested.
As you use two metamodels, it is unclear which package was taken
as the default one for resolving un-qualified names.
If you have tried so already, could you please post a simple test models
that we could reproduce this?
Regards,
/Radek
On Thu, 10 May 2007 09:39:41 +0200, Mathias Freier
<mathias.freier@gentleware.com> wrote:
> Hello Alex,
>
> I tried (in several variations: ::, : , fqn ...), but it does not work.
>
> Mathias
>
> Alex Shatalin schrieb:
>> Hello Mathias,
>> Try using entity::EntityConstants as a parameter of oclIsKindOf.
>> -----------------
>> Alex Shatalin
>>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
|
|
|
|
Re: Link Constraint with oclIsKindOf [message #130553 is a reply to message #129205] |
Mon, 28 May 2007 03:03  |
Eclipse User |
|
|
|
Hi Varun,
It is not easy to see what erros you report here,
as you use 'ocliskindof' instead of 'oclIsKindOf'.
Also, 'Actor' used as type first and then as a package
in 'Actor::DiagramElement' indicates there might be other
causes of errors.
Regards,
/Radek
On Thu, 24 May 2007 12:33:00 +0200, varun <bhatia1984@yahoo.com> wrote:
> hiiiii
>
> I am also facing the same prob
>
> I hv two metamodels Tde & UseCase
>
> All the elements in UseCase extends from DiagramElement which i hv
> defined in Tde & also the diagram of usecase extends from class which i
> hv define in Tde.
>
>
> By the way UseCase is usecase editor & Tde is statemachine editor.
> now when i define
>
> self.ocliskindof(Actor) in usecase it gives error.
>
> but when i define self.ocliskindof(StartState) in Tde it works fine.
>
> i tried to define self.ocliskindof(Actor::DiagramElement) but still it
> gives error.
>
> what i want is that i dnt want any incoming transition on actor
>
> Thanks
>
> Varun Bhatia
>
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
|
|
|
Powered by
FUDForum. Page generated in 0.05179 seconds