Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » HowTo dynamically extend the tool palette at runtime(Sample from the ArduinoDesigner of Obeo)
HowTo dynamically extend the tool palette at runtime [message #1468048] Mon, 10 November 2014 14:33 Go to next message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 40
Registered: January 2011
Member
Hello,
I try to improve my knowledge of Sirius by studiyng the ArduinoDesigner sample.
https://github.com/mbats/arduino from Melanie Bats, Obeo.

In this fun project the tool palette of the Hardware view is composed with only three item:
- Platform
- Module
- Wire

When you add a Platform or a Module to the Hardware model, the ArduinoDesigner use a model into the Design plugin : ArdublockKit.arduino to propose a concrete Platform or Module (Arduino R3, Blue Led, Red Led and so on...).

Is there a way in Sirius to dynamically extend the Tool palette at runtime using this modele ?
Then after the Tool palette show three sections :
- The Tool Section
- The Plaform Section with the Arduino R3
- The Module section with a list of available modules: leds, servos, etc...

My need is very similar from the ArduinoDesigner.
Working with a generic model when i create a deigner. But after, at the runtime, extend the palette with various devices.
For the user experience, i can't just open a Dialog Box with the list of available devices. I need to add them to the Palette.


Thanks,
--
Philippe
Re: HowTo dynamically extend the tool palette at runtime [message #1470840 is a reply to message #1468048] Wed, 12 November 2014 17:22 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
Hi Philippe,

It is an interesting need, unfortunately the palette is used only for
tool creation and are defined statically in .odesign resource.

As Sirius is based on GMF and this last on GEF, you could use the GEF
API to update the org.eclipse.gef.palette.PaletteRoot programmatically.
But we can't guarantee that Sirius code will not remove your palette
update then you should care of that.

You can raise a Sirius bugzilla feature request to have palette entries
contributed dynamically through odesign model according to semantic
model elements as you want.

Best Regards.

Le 10/11/2014 15:33, Philippe EUGENE a écrit :
> Hello,
> I try to improve my knowledge of Sirius by studiyng the ArduinoDesigner
> sample.
> https://github.com/mbats/arduino from Melanie Bats, Obeo.
>
> In this fun project the tool palette of the Hardware view is composed
> with only three item:
> - Platform
> - Module
> - Wire
>
> When you add a Platform or a Module to the Hardware model, the
> ArduinoDesigner use a model into the Design plugin :
> ArdublockKit.arduino to propose a concrete Platform or Module (Arduino
> R3, Blue Led, Red Led and so on...).
>
> Is there a way in Sirius to dynamically extend the Tool palette at
> runtime using this modele ?
> Then after the Tool palette show three sections :
> - The Tool Section
> - The Plaform Section with the Arduino R3
> - The Module section with a list of available modules: leds, servos, etc...
>
> My need is very similar from the ArduinoDesigner. Working with a generic
> model when i create a deigner. But after, at the runtime, extend the
> palette with various devices.
> For the user experience, i can't just open a Dialog Box with the list of
> available devices. I need to add them to the Palette.
>
>
> Thanks,
> --
> Philippe



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: HowTo dynamically extend the tool palette at runtime [message #1472186 is a reply to message #1470840] Thu, 13 November 2014 17:21 Go to previous messageGo to next message
Esteban Dugueperoux is currently offline Esteban DugueperouxFriend
Messages: 472
Registered: July 2009
Senior Member
I have found a bugzilla which talk about this need :
https://bugs.eclipse.org/bugs/show_bug.cgi?id=442145

Le 12/11/2014 18:22, Esteban Dugueperoux a écrit :
> Hi Philippe,
>
> It is an interesting need, unfortunately the palette is used only for
> tool creation and are defined statically in .odesign resource.
>
> As Sirius is based on GMF and this last on GEF, you could use the GEF
> API to update the org.eclipse.gef.palette.PaletteRoot programmatically.
> But we can't guarantee that Sirius code will not remove your palette
> update then you should care of that.
>
> You can raise a Sirius bugzilla feature request to have palette entries
> contributed dynamically through odesign model according to semantic
> model elements as you want.
>
> Best Regards.
>
> Le 10/11/2014 15:33, Philippe EUGENE a écrit :
>> Hello,
>> I try to improve my knowledge of Sirius by studiyng the ArduinoDesigner
>> sample.
>> https://github.com/mbats/arduino from Melanie Bats, Obeo.
>>
>> In this fun project the tool palette of the Hardware view is composed
>> with only three item:
>> - Platform
>> - Module
>> - Wire
>>
>> When you add a Platform or a Module to the Hardware model, the
>> ArduinoDesigner use a model into the Design plugin :
>> ArdublockKit.arduino to propose a concrete Platform or Module (Arduino
>> R3, Blue Led, Red Led and so on...).
>>
>> Is there a way in Sirius to dynamically extend the Tool palette at
>> runtime using this modele ?
>> Then after the Tool palette show three sections :
>> - The Tool Section
>> - The Plaform Section with the Arduino R3
>> - The Module section with a list of available modules: leds, servos,
>> etc...
>>
>> My need is very similar from the ArduinoDesigner. Working with a generic
>> model when i create a deigner. But after, at the runtime, extend the
>> palette with various devices.
>> For the user experience, i can't just open a Dialog Box with the list of
>> available devices. I need to add them to the Palette.
>>
>>
>> Thanks,
>> --
>> Philippe
>
>
>



--
Esteban Dugueperoux - Obeo

Need professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: HowTo dynamically extend the tool palette at runtime [message #1473005 is a reply to message #1472186] Fri, 14 November 2014 09:01 Go to previous message
Philippe EUGENE is currently offline Philippe EUGENEFriend
Messages: 40
Registered: January 2011
Member
Hi esteban,
Thanks, for reply and link to the bugzilla.
--
Philippe
Previous Topic:SWTBot test problem: Double Click node call Derect Edit Label
Next Topic:Creating an image-map of nodes during export as image?
Goto Forum:
  


Current Time: Mon Apr 06 22:17:50 GMT 2020

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

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

Back to the top