|Re: Link Constraints and shared tool element [message #237259 is a reply to message #237247]
||Wed, 22 July 2009 17:49
| RefuX Zanzeebarr
Registered: July 2009
> I am linking from Class A to Class C
> Class C has an attribute called: type.
> type can be: ONE or TWO.
> Class B is the element used to map from A to C.
> So the instances would look something like A->B->C
> Where A is a diagram box, B is the line, and C is another diagram box.
> Depending on Class C's type, I want to use a different line figure.
> I have two Link Mappings, both using B as the element.
> The first link mapping has a Link Constraint on the Target: self.type = ONE
> The second link mapping has a Link Constraint on the Target: self.type =
> Both of these link mappings use the same 'Tool' item - this is where I
> think the problem lies.
> My tool palette has just one link creating element called: "create link".
> I draw a link from A to C using this "create link" element, if C's type
> is ONE I get the line I want, if C's type is TWO I don't get any lines
> at all.
> I'm guessing GMF only tries the first link mapping and if it doesn't
> meet the constraints, it stops, it doesn't try the next link mapping.
> Any thoughts? I'm guessing this is so convoluted I'm the first person to
> do this :)
Actually this works! I just needed to define not only a Link Constraint
but also a Constraint, since that helped it pick up the correct edit
part (Since they have the same type).
Powered by FUDForum
. Page generated in 0.48120 seconds