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?
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.