I'd like to modify the palette in this way:
in a ISelectionListener I listen to the selection of pages, when a page is selected by the user I'd like to hide or show the groups of my custom palette.
Is it possible?
Where should I look if the only thing I see in the ISelectionListener is the selected IPage; is there a way to retrieve the palette at runtime and the modify it (hoping it refreshes its view automatically...)?
sorry for the delay, I was attending to the nice Eclipse Summit Europe.
The palette listens for the prefenreces of the tool. It also listens the application/unapplication of the profile application.
As soon as a profile is applied, the preferences for the palette display is updated.
In your case, you could implement a selection listener and use the org.eclipse.papyrus.diagram.common.part.PapyrusPalettePrefer ences.changePaletteVisibility(String, String, boolean) method, changing the visiblity of the tool depending on your conditions