Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Connection problems - getConnectionCompleteCommand() called when created source
Connection problems - getConnectionCompleteCommand() called when created source [message #220659] Thu, 03 August 2006 09:22 Go to next message
Mark Robinson is currently offline Mark RobinsonFriend
Messages: 37
Registered: July 2009
Member
I'm having problems getting connections to work. I thought I had completed
all the steps necessary to get connections to work but I must have misssed
something?

When the connection tool hovers over the intended source figure,
getConnectionCreateCommand() is called - this sets the source before I've
clicked on the figure?

When I then click on the figure to make it the source,
getConnectionCompleteCommand() is called; thus setting the target to be
the same as the source. Surely getConnectionCreateCommand() should be
getting called here, not getConnectionCompleteCommand()?

Anybody got any idea what I may doing wrong (or misunderstanding)?

Thanks in advance.
Re: Connection problems - getConnectionCompleteCommand() called when created source [message #220699 is a reply to message #220659] Thu, 03 August 2006 13:50 Go to previous messageGo to next message
Nhu Le is currently offline Nhu LeFriend
Messages: 47
Registered: July 2009
Member
That's for a loopback connection. In your getConnectionCompleteCommand,
you should check to make sure the source object is not the same as the
target object if you don't want to have a loopback connection. Remember
that the connectioncompletecommand is not executed until you click again.

Nhu Le

Mark Robinson wrote:
> I'm having problems getting connections to work. I thought I had
> completed all the steps necessary to get connections to work but I must
> have misssed something?
>
> When the connection tool hovers over the intended source figure,
> getConnectionCreateCommand() is called - this sets the source before
> I've clicked on the figure?
>
> When I then click on the figure to make it the source,
> getConnectionCompleteCommand() is called; thus setting the target to be
> the same as the source. Surely getConnectionCreateCommand() should be
> getting called here, not getConnectionCompleteCommand()?
> Anybody got any idea what I may doing wrong (or misunderstanding)?
>
> Thanks in advance.
>
Re: Connection problems - getConnectionCompleteCommand() called when created sou [message #220706 is a reply to message #220659] Thu, 03 August 2006 13:56 Go to previous messageGo to next message
Mark Robinson is currently offline Mark RobinsonFriend
Messages: 37
Registered: July 2009
Member
Hmm, after stepping through the Shapes-emf example, it appears this
behaviour is correct.

I wasn't implementing getModelTarget/SourceConnections correctly which was
causing my previous problem.



Mark Robinson wrote:

> I'm having problems getting connections to work. I thought I had completed
> all the steps necessary to get connections to work but I must have misssed
> something?

> When the connection tool hovers over the intended source figure,
> getConnectionCreateCommand() is called - this sets the source before I've
> clicked on the figure?

> When I then click on the figure to make it the source,
> getConnectionCompleteCommand() is called; thus setting the target to be
> the same as the source. Surely getConnectionCreateCommand() should be
> getting called here, not getConnectionCompleteCommand()?

> Anybody got any idea what I may doing wrong (or misunderstanding)?

> Thanks in advance.
Re: Connection problems - getConnectionCompleteCommand() called when created sou [message #220713 is a reply to message #220699] Thu, 03 August 2006 14:01 Go to previous message
Mark Robinson is currently offline Mark RobinsonFriend
Messages: 37
Registered: July 2009
Member
Thanks,

The loopback connection confused me.

My problem was due to not implementing getModelTarget/SourceConnections
correctly.




Nhu Le wrote:

> That's for a loopback connection. In your getConnectionCompleteCommand,
> you should check to make sure the source object is not the same as the
> target object if you don't want to have a loopback connection. Remember
> that the connectioncompletecommand is not executed until you click again.

> Nhu Le

> Mark Robinson wrote:
>> I'm having problems getting connections to work. I thought I had
>> completed all the steps necessary to get connections to work but I must
>> have misssed something?
>>
>> When the connection tool hovers over the intended source figure,
>> getConnectionCreateCommand() is called - this sets the source before
>> I've clicked on the figure?
>>
>> When I then click on the figure to make it the source,
>> getConnectionCompleteCommand() is called; thus setting the target to be
>> the same as the source. Surely getConnectionCreateCommand() should be
>> getting called here, not getConnectionCompleteCommand()?
>> Anybody got any idea what I may doing wrong (or misunderstanding)?
>>
>> Thanks in advance.
>>
Previous Topic:Snap to Grid
Next Topic:overriding getFigure to return nested Figure ?
Goto Forum:
  


Current Time: Sat Apr 27 01:47:44 GMT 2024

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

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

Back to the top