Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Update palette dynamically(Update palette dynamically)
Update palette dynamically [message #1816078] Sat, 19 October 2019 10:11 Go to next message
Mohit Advani is currently offline Mohit AdvaniFriend
Messages: 28
Registered: May 2019
Junior Member
Hi,
I want to update palette dynamically. i have certain set of libraries and user can add or delete libraries from another dialog, based on libraries added/deleted, i want to show nodes on palette. Please let me know if i can update palette at runtime.
Thanks In advance.

Thanks and Regards
Mohit Advani
Re: Update palette dynamically [message #1816121 is a reply to message #1816078] Mon, 21 October 2019 13:48 Go to previous messageGo to next message
Pierre-Charles David is currently offline Pierre-Charles DavidFriend
Messages: 703
Registered: July 2009
Senior Member
Hi,

This is not supported (see https://bugs.eclipse.org/bugs/show_bug.cgi?id=442145). The tools on the palette of a Sirius diagram are not just elements "prototypes" that are copied/instanciated on the diagram, they are tools defined statically in the odesign model, with possibly complex behavior. Adding new tools dynamically would imply modifying the odesign being used to add the tool definitions, but modifying the modeler's definition in this way is not supported.

Depending on your context, one possible workaround is to define *one* tool in your odesign which invokes some Java code that displays through an SWT/JFace dialog the list of possible libraries (computed dynamically by your code), and then add the one selected.

Regards,
Pierre-Charles David


Pierre-Charles David - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Update palette dynamically [message #1816135 is a reply to message #1816121] Tue, 22 October 2019 05:28 Go to previous messageGo to next message
Mohit Advani is currently offline Mohit AdvaniFriend
Messages: 28
Registered: May 2019
Junior Member
Thanks for your quick reply, can i statically create all nodes initially and later based on some condition (via service method call) hide or disable it.
Re: Update palette dynamically [message #1816747 is a reply to message #1816135] Wed, 06 November 2019 09:36 Go to previous message
Felix Dorner is currently offline Felix DornerFriend
Messages: 392
Registered: December 2015
Senior Member
You can add all tools and then show/hide them with a filter a) per tool or b) via the new toolfilter extension mechanism, see https://bugs.eclipse.org/bugs/show_bug.cgi?id=549558
Previous Topic:Java services
Next Topic:model to model transformation
Goto Forum:
  


Current Time: Tue Apr 23 13:40:58 GMT 2024

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

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

Back to the top