Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Add a button (button-menu) to the GMF toolbar(How to add a button to the GMF toolbar)
Add a button (button-menu) to the GMF toolbar [message #1125188] Fri, 04 October 2013 08:50 Go to next message
Edwin Tuzar is currently offline Edwin TuzarFriend
Messages: 33
Registered: April 2013
Location: Kaiserslautern
Member

What is the path that I have to follow in order to have a functional button on the GMF toolbar?
More details: http://stackoverflow.com/questions/18985646/gmf-add-a-button-to-its-toolbar
until now I managed to make a button to appear there by modifying in XXXDiagramActionBarContributor (XXX any name) the public void init(IActionBars bars, IWorkbenchPage page) {} method. More exactly by adding an action to the (IToolBarManager) toolBarManager.
But now I don't get where to handle the button if it's clicked or not...
Thanks in advance!


Edwin W.T.
Re: Add a button (button-menu) to the GMF toolbar [message #1128177 is a reply to message #1125188] Mon, 07 October 2013 12:23 Go to previous messageGo to next message
Edwin Tuzar is currently offline Edwin TuzarFriend
Messages: 33
Registered: April 2013
Location: Kaiserslautern
Member

I found something helpful in this pdf: http://www.inf.ed.ac.uk/teaching/courses/ip/resources/GEF/GEF_Tutorial_2up.pdf --- at least something in the right direction Wink
PS: chapter 9 especially


Edwin W.T.

[Updated on: Mon, 07 October 2013 12:23]

Report message to a moderator

Re: Add a button (button-menu) to the GMF toolbar [message #1128203 is a reply to message #1128177] Mon, 07 October 2013 12:55 Go to previous message
Ralph Gerbig is currently offline Ralph GerbigFriend
Messages: 702
Registered: November 2009
Senior Member
Hi,

the pop up toolbar is created by a PopupBarEditPolicy installed into your editparts. I managed to customize this menu by overriding fillPopupBarDescriptors(). This allows you to add your own buttons. Just call the addPopupBarDescriptor method from this method. For the elementtype you can provide null.

Ralph
Previous Topic:Error: EditPart has to be selectable
Next Topic:Expression Label For Element
Goto Forum:
  


Current Time: Tue Apr 16 08:35:51 GMT 2024

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

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

Back to the top