Modify palette at runtime [message #636727] |
Tue, 02 November 2010 11:19  |
Eclipse User |
|
|
|
Hi,
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...)?
Thanks in advance, 123star
|
|
|
|
Re: Modify palette at runtime [message #637893 is a reply to message #636895] |
Tue, 09 November 2010 04:42  |
Eclipse User |
|
|
|
Hi,
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
Regards
Rémi
|
|
|
Powered by
FUDForum. Page generated in 0.03908 seconds