Skip to main content



      Home
Home » Modeling » Papyrus » Question about palette
Question about palette [message #546056] Sat, 10 July 2010 09:09 Go to next message
Eclipse UserFriend
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 04:11 Go to previous messageGo to next message
Eclipse UserFriend
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 17:15 Go to previous message
Eclipse UserFriend
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
Re: Question about palette [message #602569 is a reply to message #547283] Fri, 23 July 2010 17:15 Go to previous message
Eclipse UserFriend
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
Previous Topic:import and export options
Next Topic:MARTE on Papyrus Helios
Goto Forum:
  


Current Time: Sun Jul 27 08:10:06 EDT 2025

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

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

Back to the top