Home » Modeling » GMF (Graphical Modeling Framework) » Having customized forms or Adding Menus/Toolbars/Context Menus and etc. when running GMF as a plugin
|
Re: Having customized forms or Adding Menus/Toolbars/Context Menus and etc. when running GMF as a pl [message #1702559 is a reply to message #1702105] |
Thu, 23 July 2015 08:37 |
Ángel Moreno Messages: 14 Registered: November 2013 Location: Madrid |
Junior Member |
|
|
Hi Parsa Pourali,
Shhhhhh... this is a TOP SECRET....
Go to your *.diagram plug-in, go to the package xxxxx.diagram.part, and go to the Java Class DiagramEditorContextMenuProvider.java. In this class, go to the buildContextMenu() function and check how works the next code :
menu.remove(ActionIds.ACTION_DELETE_FROM_MODEL);
menu.appendToGroup("editGroup", deleteAction);
In this point you have access to the Context Menu, from all point of your Diagram Editor Surface... Study how add new actions and Menus some code to study, and decide what actions and submenus do you have include in your Context Menu...
Regards,
Ángel Moreno Pérez
Enterprise Architect
El Corte Inglés, Madrid, Spain
[Updated on: Thu, 23 July 2015 11:01] Report message to a moderator
|
|
| | |
Re: Having customized forms or Adding Menus/Toolbars/Context Menus and etc. when running GMF as a pl [message #1703888 is a reply to message #1703695] |
Wed, 05 August 2015 15:54 |
Parsa Pourali Messages: 210 Registered: February 2014 |
Senior Member |
|
|
Hi Aurelien,
Thank you so much, the link was a very good starting point for me, it was very helpful.
Also, it may be a long shot, but I'd rather ask, do you know or think that we can have access to the elements of a model. for example, I want to have an action listener on the transition label of a state diagram. So, whenever the user tries to edit the label of a transition in a state machine, I can listen to it and do some code ... not sure , if it is possible in GMF or other modelling frameworks ...
Thanks,
Regards,
Parsa
|
|
| | |
Goto Forum:
Current Time: Wed Sep 25 06:34:47 GMT 2024
Powered by FUDForum. Page generated in 0.05699 seconds
|