Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » How to show a pop-up when a connection is made?
How to show a pop-up when a connection is made? [message #200555] Tue, 05 August 2008 14:49 Go to next message
Eclipse UserFriend
Originally posted by: julan.gmail.com

Hello Guys,


Can someone please give me a brief idea how to go about this?

I want a pop-up when a connection is made from one component to another
component in my gmf diagram.

Any help will be much appreciated.

Thanks,

julan
Re: How to show a pop-up when a connection is made? [message #201022 is a reply to message #200555] Thu, 07 August 2008 11:30 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: julan.gmail.com

Hello,

Can someone please give me some hints regarding this?

Thanks in advance.

Julan
Re: How to show a pop-up when a connection is made? [message #201030 is a reply to message #201022] Thu, 07 August 2008 12:23 Go to previous message
Eclipse UserFriend
Originally posted by: lunaris.bluemoon.gmail.com

Hi Julan,

I'm not sure how favourable this method is, but you could do this with
custom commands and edit policies.

I needed a connection that would do more than just connecting elements,
so I created a new subclass of CreateConnectionRequest detailing the
behaviour I wanted. Next I created an EditPolicy extending
GraphicalNodeEditPolicy and overrode the #getCommand(Request) method to
handle my new request type. I then installed the EditPolicy on my shape
of choice in the GRAPHICAL_NODE_ROLE.

Where your popup comes in is that #getCommand(Request) method in your
new EditPolicy. Simply create a new subclass of command whose #execute()
method throws up a dialog and does whatever you want with the results
and then return that as the result of the #getCommand(Request) call. Or,
if you want more than just that, chain it in a CompoundCommand for
similar effects.

I know I've been quite abstract, but I hope it helps.
Good luck,
Will

Julan wrote:
> Hello,
>
> Can someone please give me some hints regarding this?
>
> Thanks in advance.
>
> Julan
>
Previous Topic:Printing GMF diagram
Next Topic:How to get the result of a CreateElementCommand when doing Drag 'n Drop
Goto Forum:
  


Current Time: Mon Sep 23 23:50:12 GMT 2024

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

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

Back to the top