Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Modify palette at runtime
Modify palette at runtime [message #636727] Tue, 02 November 2010 15:19 Go to next message
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010
Member
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 #636895 is a reply to message #636727] Wed, 03 November 2010 09:17 Go to previous messageGo to next message
Patrick Tessier is currently offline Patrick TessierFriend
Messages: 142
Registered: July 2009
Senior Member
I have duscussed with Remi, I exist a solution. He will respond to you.
Patrick
Re: Modify palette at runtime [message #637893 is a reply to message #636895] Tue, 09 November 2010 09:42 Go to previous message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 139
Registered: July 2009
Senior Member
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


Previous Topic:Model Corrupted
Next Topic:How to edit parameters for class operations in class diagram?
Goto Forum:
  


Current Time: Mon Dec 22 08:28:08 GMT 2014

Powered by FUDForum. Page generated in 0.09651 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software