Programmatically configure visible palette for diagram [message #777312] |
Tue, 10 January 2012 09:14 |
|
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
Remi Schnekenburger
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Re: Programmatically configure visible palette for diagram [message #777315 is a reply to message #777312] |
Tue, 10 January 2012 09:15 |
|
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
Remi Schnekenburger
Get professional Eclipse developer support:
http://eclipsesource.com/en/services/developer-support/
|
|
|
Powered by
FUDForum. Page generated in 0.02903 seconds