Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Drop Listener for Connection
Drop Listener for Connection [message #194655] Thu, 26 June 2008 10:13 Go to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Hello All,

I have a simple model containing Components and Connections.
When I drag a connection from Component1(source editpart) and drop it on
Component2(target editpart) I have to open a dialog to take values for
that particular connection.So i have to basically open a diolog on drop of
the connection.

I tried the following :

1>In my xxxDiagramEditor initializeGraphicalViewer() i added the following
getDiagramGraphicalViewer().addDropTargetListener(new
MyDropTargetListener())

2>In my xxxConnectorEditPart i installed DragDropEditPolicy
installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new
DiagramDragDropEditPolicy)

When I debug and check i found out that its not getting inside
MyDropTargetListener().

Am I missing some link..or is there any other better way of solving the
problem.

Thanks in advance.

Regards,
Shwetha
Re: Drop Listener for Connection [message #194708 is a reply to message #194655] Thu, 26 June 2008 11:29 Go to previous messageGo to next message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Shwetha,

Try modifying generated ConnectionCreateCommand - this command should be
called to create actual connection instance in the end of the process, so
you can patch it to open dialog.

-----------------
Alex Shatalin
Re: Drop Listener for Connection [message #194881 is a reply to message #194708] Mon, 30 June 2008 04:29 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: Shwetha.V.in.bosch.com

Thanks Alex :)

It helped me getting the diolog but on click of OK of the diolog the
entered value is not getting refreshed in the GMF Editor.

Thanks in Advance.

Regards,
Shwetha
Re: Drop Listener for Connection [message #195061 is a reply to message #194881] Tue, 01 July 2008 11:37 Go to previous message
Alexander Shatalin is currently offline Alexander ShatalinFriend
Messages: 2928
Registered: July 2009
Senior Member
Hello Shwetha,

Try debugging corresponding EditPart to see the reason why domain model notification
was skipped (by the label?).

-----------------
Alex Shatalin
Previous Topic:Connector and target element focus/selection
Next Topic:Extend resource set of a diagram
Goto Forum:
  


Current Time: Thu Apr 25 01:19:08 GMT 2024

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

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

Back to the top