Keeping an exact reference to source model element [message #990214] |
Tue, 11 December 2012 08:07  |
Eclipse User |
|
|
|
Hi! I have a simple rule:
rule Formular2GFElement {
from
c : UML!Class(
c.isFormular
)
to
gf : GF!FGUmlLinked (
name <- c.name,
umlElement <- c,
child <- c.attribute ->
collect(a | thisModule.FProperty2GFElement(a))
)
}
umlElement is of type UML!NamedElement. However, with traceability links it's resolced to 'gf' itself ('/'). How could i resolve it to 'c'?
Many thanks in advance!
[Updated on: Tue, 11 December 2012 08:08] by Moderator
|
|
|
|
|
Re: Keeping an exact reference to source model element [message #990556 is a reply to message #990214] |
Thu, 13 December 2012 01:50  |
Eclipse User |
|
|
|
After a few hours of frustration I've discrovered that imperative assigments will not follow traceability links and found this solution:
rule Formular2GFElement {
from
c : UML!Class(
c.isFormular
)
to
gf : GF!FGUmlLinked (
name <- c.name,
child <- c.attribute -> collect(a |
thisModule.FProperty2GFElement(a))
)
do {
gf.umlElement <- c;
}
}
|
|
|
Re: Keeping an exact reference to source model element [message #990720 is a reply to message #990214] |
Wed, 12 December 2012 16:14  |
Eclipse User |
|
|
|
Like this:
umlElement <:= c
(assignment instead of binding)
Dennis
Op 11-12-12 14:07, Dark Diver schreef:
> Hi! I have a simple rule:
>
> rule Formular2GFElement {
> from
> c : UML!Class(
> c.isFormular
> )
> to gf : GF!FGUmlLinked (
> name <- c.name,
> umlElement <- c
> child <- c.attribute -> collect(a |
> thisModule.FProperty2GFElement(a))
> )
> }
>
>
> umlElement is of type UML!NamedElement. However, with traceability links it's
> resolced to 'gf' itself ('/'). How could i resolve it to 'c'?
> Many thanks in advance!
|
|
|
Powered by
FUDForum. Page generated in 0.07224 seconds