Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to handle click/right click events on a model in papyrus?
How to handle click/right click events on a model in papyrus? [message #1012985] Fri, 22 February 2013 10:10 Go to next message
Leila A is currently offline Leila A
Messages: 17
Registered: February 2013
Junior Member
Hi every one,

I need to change the palette display in Papyrus anytime the user clicks on an element in the Model Explorer view or on the Model Editor.
I downloaded Papyrus source files but there are lots of packages and it is very confusing for me to find the right packages which I need to work with:(

I wonder if you could help me to find out which packages/classes in the source code I can use to be able to control click and right click events and also hide/add some elements on the palette?

Is there any class diagram which shows the components of the Papyrus, their interfaces and the way they are connected?

Thanks,
Leila Rolling Eyes
Re: How to handle click/right click events on a model in papyrus? [message #1017349 is a reply to message #1012985] Mon, 11 March 2013 12:27 Go to previous message
Goood Guy is currently offline Goood Guy
Messages: 126
Registered: September 2011
Senior Member
concerning the right click: you can easily contribute to the context menu of a graphical shape. for more information on this, see http://trac.rtsys.informatik.uni-kiel.de/trac/kieler/wiki/Help/EclipseCookbook/ContextMenu (that is not Papyrus-specific).

concerning the left click: If the user has clicked on an element, this element gets a selection. If you return the selection of the editor, you will get these elements. I do not know ad hoc how to do this but try to access the diagram editor from the palette and and get the selection from the editor. then check the type of the selected element and redraw the palette accordingly. Maybe you will also need a selectionchangedlistener.
Previous Topic:How to reuse a "component" ?
Next Topic:How to create a classDiagram which which defines an Instance Specification?
Goto Forum:
  


Current Time: Mon Jul 28 22:44:35 EDT 2014

Powered by FUDForum. Page generated in 0.03043 seconds