Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » Question about palette
Question about palette [message #546056] Sat, 10 July 2010 13:09 Go to next message
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010
Member
Hi,

what I'd like to do is:

when the user select a diagram, I'd like to check the stereoype of the package used in the diagram to change the palette accordingly.

Is it possible to change the palette at runtime? If yes how?

How to catch the event of selecting the diagram?

Thank you in advance,
star123
Re: Question about palette [message #547283 is a reply to message #546056] Fri, 16 July 2010 08:11 Go to previous messageGo to next message
123star  is currently offline 123star Friend
Messages: 70
Registered: June 2010
Member
Hi,

anyone could help?

Is there a tutorial to this kind of things?
Re: Question about palette [message #549050 is a reply to message #547283] Fri, 23 July 2010 21:15 Go to previous message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 168
Registered: July 2009
Location: Palaiseau, France
Senior Member
Hi,

For a small tutorial about palette customization, you will find some documentation in the online help of Eclipse (Papyrus > user guide > palette customization or something equivalent)

This is the description of the runtime and plugin-based customization of the palette. Currently, in Papyrus, there is an implementation that listens to the profile applications, and depending on the applied profile in the model, switches the available palettes.
This is all based on listeners and preferences system. You will find some interesting classes in the org.eclipse.papyrus.diagram.common plugin, in the "service" package, especially the class org.eclipse.papyrus.diagram.common.service.PaletteProfileApp licationListener
This class is registered as a listener on the model modifications, tracking for profile application. As soon as a profile is applied or unapplied, it updates the palettes which are hidden or visible. Palettes are hidden using the preferences (see org.eclipse.papyrus.diagram.common.part.PapyrusPalettePrefer ences)


Hope this will help
Rémi


Remi Schnekenburger

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Re: Question about palette [message #602569 is a reply to message #547283] Fri, 23 July 2010 21:15 Go to previous message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 168
Registered: July 2009
Location: Palaiseau, France
Senior Member
Hi,

For a small tutorial about palette customization, you will find some documentation in the online help of Eclipse (Papyrus > user guide > palette customization or something equivalent)

This is the description of the runtime and plugin-based customization of the palette. Currently, in Papyrus, there is an implementation that listens to the profile applications, and depending on the applied profile in the model, switches the available palettes.
This is all based on listeners and preferences system. You will find some interesting classes in the org.eclipse.papyrus.diagram.common plugin, in the "service" package, especially the class org.eclipse.papyrus.diagram.common.service.PaletteProfileApp licationListener
This class is registered as a listener on the model modifications, tracking for profile application. As soon as a profile is applied or unapplied, it updates the palettes which are hidden or visible. Palettes are hidden using the preferences (see org.eclipse.papyrus.diagram.common.part.PapyrusPalettePrefer ences)


Hope this will help
Rémi
--
http://www.eclipse.org/papyrus


Remi Schnekenburger

Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
Previous Topic:import and export options
Next Topic:MARTE on Papyrus Helios
Goto Forum:
  


Current Time: Sun Jul 12 14:23:00 GMT 2020

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

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

Back to the top