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 |
Philippe EUGENE Messages: 58 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 |
Esteban Dugueperoux 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 |
Esteban Dugueperoux 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
|
|
| |
Goto Forum:
Current Time: Tue Apr 23 17:55:00 GMT 2024
Powered by FUDForum. Page generated in 0.02323 seconds
|