Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » how to execute a dialog from popup bar menu item
how to execute a dialog from popup bar menu item [message #104740] Fri, 16 February 2007 18:55 Go to next message
Eclipse UserFriend
I would like to execute a dialog to capture information for attributes
before I create a new node on the diagram. I was hoping to hook this
dialog into the create action from the popup bar menu item that GMF
provides for creating nodes on the diagram. Is there any way to do this.
Re: how to execute a dialog from popup bar menu item [message #104796 is a reply to message #104740] Sat, 17 February 2007 05:01 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: martin.tauber.t-online.de

Hi John,

my advice here would be stick with the way GMF is designed by default.
Why do you want to open a dialog? Can't you just create the node with
default values and then (if neccesary) edit the attributes via the
property sheet?

Keep in mind: size properties can be set while creating the node via
mouse gesture (drag). Label properties can be created after creating.
What else do you need?

Regards
Martin

John Yotka schrieb:
> I would like to execute a dialog to capture information for attributes
> before I create a new node on the diagram. I was hoping to hook this
> dialog into the create action from the popup bar menu item that GMF
> provides for creating nodes on the diagram. Is there any way to do this.
Re: how to execute a dialog from popup bar menu item [message #104821 is a reply to message #104740] Sat, 17 February 2007 08:11 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

You can override CreateElementCommand.

If you want only show dialog without 'cancel' you may override
'doDefaultElementCreation', if you want dialog with 'cancel' you can
override 'doExecuteWithResult'.

Sorry for my English ;>
Grzesiek



John Yotka napisał(a):
> I would like to execute a dialog to capture information for attributes
> before I create a new node on the diagram. I was hoping to hook this
> dialog into the create action from the popup bar menu item that GMF
> provides for creating nodes on the diagram. Is there any way to do this.
Re: how to execute a dialog from popup bar menu item [message #104853 is a reply to message #104796] Sat, 17 February 2007 11:22 Go to previous message
Eclipse UserFriend
Martin Tauber wrote:
> Hi John,
>
> my advice here would be stick with the way GMF is designed by default.
> Why do you want to open a dialog? Can't you just create the node with
> default values and then (if neccesary) edit the attributes via the
> property sheet?
>
> Keep in mind: size properties can be set while creating the node via
> mouse gesture (drag). Label properties can be created after creating.
> What else do you need?
>
> Regards
> Martin
>
> John Yotka schrieb:
>> I would like to execute a dialog to capture information for attributes
>> before I create a new node on the diagram. I was hoping to hook this
>> dialog into the create action from the popup bar menu item that GMF
>> provides for creating nodes on the diagram. Is there any way to do this.
Martin,

Actually I can't create the node without setting two essential
properties first. That is why I would like to invoke a dialog before
continuing with the creation of the node from the popup bar. I that is
not doable then I will have to disable the popup bar for that node type.
Previous Topic:how do we use editorProviders ext. point?
Next Topic:Custom Anchor, Custom Layout, Custom Polygon (!) and file reopen
Goto Forum:
  


Current Time: Wed Jul 16 23:45:47 EDT 2025

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

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

Back to the top