Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:14 Go to next message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 169
Registered: July 2009
Location: Palaiseau, France
Senior Member
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 Go to previous message
Remi Schnekenburger is currently offline Remi SchnekenburgerFriend
Messages: 169
Registered: July 2009
Location: Palaiseau, France
Senior Member
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/
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: Fri Apr 26 22:00:22 GMT 2024

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

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

Back to the top