Skip to main content



      Home
Home » Modeling » Papyrus » Programmatically configure visible palette for diagram((from a private email exchange))
Programmatically configure visible palette for diagram [message #777312] Tue, 10 January 2012 04:14 Go to next message
Eclipse UserFriend
We would like to programmatically enable and disable the palette configurations for a certain diagram. For example:
In UTP you can apply <<testcase>> to any behavior. We pre-configured a palette for sequences/activities/state machines. Only those elements, which are sensible, respectively supported in our methodology are provided in that palettes. Now, if the user wants to create a <<testcase>> sequence diagram, we simply reuse the CreateSequenceDiagramCommand, but want to programmatically disable the default sequence palette and enable the customized palette. I browsed the source, unfortunately with no success.

Can you point me to the code section, where the UI invoked the de-/activation of palette configurations?

Thanks a lot.

Marc-Florian
Re: Programmatically configure visible palette for diagram [message #777315 is a reply to message #777312] Tue, 10 January 2012 04:15 Go to previous message
Eclipse UserFriend
Hi Marc-Florian,

To programmatically show/hide a palette, you can use the static method org.eclipse.papyrus.diagram.common.part.PapyrusPalettePreferences.changePaletteVisibility(String, String, boolean).
The class is located in the plugin "org.eclipse.papyrus.diagram.common".

An example of the usage of this method is located in the class: org.eclipse.papyrus.diagram.common.palette.customization.dialog.PapyrusPaletteCustomizerDialog.
This dialog is used to customize the content of the palettes, and which palette should be visible/hidden. It is located in the plugin "org.eclipse.papyrus.diagram.common.palette.customization".

Do you agree to copy/paste this discussion in Papyrus forum? We prefer to answer technical questions in the forum, this let the other users discover the solution to their problems.

Best regards,
Rémi
Previous Topic:SysML 1.2 supported by Papyrus?
Next Topic:What is the current status of this OCL in profiles issue?
Goto Forum:
  


Current Time: Wed Jul 23 14:25:51 EDT 2025

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

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

Back to the top