[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Re: Adding Children(As Anchors) to Nodes, when a connection is dragged bettween two Nodes
|
All you have to do is probbably to enhance the EditPolicy for your target to
return appropriate command which will at least be standard
ConnectionCreateCommand redirected from the actual target to the port. Or
you can return a composite command which will firstly create a port and then
ends the created connection on it if the port does not already exists.
See also:
GEF and Draw2d Plug-in Developer Guide / Programmer Guide / GEF / Editing
and EditPolicies
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse.gmf.doc/prog-guide/runtime/Developer%20Guide%20to%20Diagram%20Runtime.html
MiG
"Daniel Pech" <daniel-p@xxxxxx> wrote in message
news:ft2jh6$62k$1@xxxxxxxxxxxxxxxxxxxx
> Hi,
>
> does anybody have a solution to that problem in the meantime. I have the
> exact same problem at the moment.
>
> Cheers,
> Daniel
>
>
>
> webwhysguy schrieb:
>> Hi Biju,
>>
>> I have a similar requirement, did you find an answer/solution to this
>> problem?
>>
>> Thanks,
>> - Billy
>>
>> "biju" <biju_gopinathan@xxxxxxxxxxxxxx> wrote in message
>> news:eof567$r4p$1@xxxxxxxxxxxxxxxxxxxx
>>> Hi friends,
>>>
>>> Can any one please explain, which class we need to modify in
>>> order to add a Connection Anchor automatically to a node when a
>>> connection is dragged form one node to another.
>>>
>>> What i need is, in my project I need to connect one Task(Node)
>>> with another Task.
>>>
>>> But the Source Reference and Target Reference attributes of our Link
>>> Mapping in the .gmfmap model file is given as SourcePort(Source Anchor)
>>> and SinkPort (Target Anchor)respectively ,which is our design
>>> requirement.
>>>
>>> So the mouse pointer is not enabled , when we try to drag a connection
>>> from one task to another.
>>>
>>> What we need is , to enable the mouse pointer when on top of task node
>>> while try to draw a connection, and automatically adding anchors to
>>> Source node and Target Node on clicking on it to drag a connection.
>>>
>>>
>>> Thanks in advance regards biju
>>