Add new element to the palette [message #149254] |
Wed, 29 March 2006 12:49 |
Eclipse User |
|
|
|
Originally posted by: wl_95421.yahoo.com.cn
My company is using birt,we have a plan to intetegrate it in our IDE product
of "EOS".
We want to build a element library to make report design more easy.
At first i want to add some elements to the palette.
The elements are not new elements,but some new decorators and composite for
the old elements.
Just like some labels,texts with specific color and style,
or some composites of grids and labels,texts and so on.
It's will be easy to be implemented by using the report library.
But i want to make the IDE clearly,just use the palette instead of other
soluctions.
I readed the sournce code abour the palette,
especially,the class of "DesignerPaletteFactory".
The entries of the palette are hard-coded in it,then using the class of
"GuiExtensionManager" to build the new entries of the new elements.
I would to know there is a good way to extend the palette insteadof modify
the source code.
Or the birt team have any plan to support the extension just like this.
If i can add elements to the palette ,i think i can control it by using the
listener of "GEF CommandStack".
Does anybody has better solutions to solve it.
Thanks for your excellent contributions.
Last time i forget to write the class names.sorry.
|
|
|
Re: Add new element to the palette [message #149259 is a reply to message #149254] |
Wed, 29 March 2006 13:38 |
yannick chong Messages: 19 Registered: July 2009 |
Junior Member |
|
|
You can extend org_eclipse_birt_report_designer_ui_reportitemUI. In
there you can add a new item in the palette (as well as new extended
item model ...).
But by doing so you may have to extend:
org_eclipse_birt_report_engine_reportitemPresentation,
org_eclipse_birt_report_model_reportitemModel
(meaning you'll have to construct a new report item with some copy/paste
and adaptation from existing items in your case)
You can look at the sample rotated Text for example (from CVS)
I don't know if it resolves your problem but this way might be easier
than modifying the hard code.
Lei.Wang a écrit :
> My company is using birt,we have a plan to intetegrate it in our IDE product
> of "EOS".
> We want to build a element library to make report design more easy.
> At first i want to add some elements to the palette.
> The elements are not new elements,but some new decorators and composite for
> the old elements.
> Just like some labels,texts with specific color and style,
> or some composites of grids and labels,texts and so on.
>
> It's will be easy to be implemented by using the report library.
> But i want to make the IDE clearly,just use the palette instead of other
> soluctions.
>
> I readed the sournce code abour the palette,
> especially,the class of "DesignerPaletteFactory".
> The entries of the palette are hard-coded in it,then using the class of
> "GuiExtensionManager" to build the new entries of the new elements.
>
> I would to know there is a good way to extend the palette insteadof modify
> the source code.
> Or the birt team have any plan to support the extension just like this.
>
> If i can add elements to the palette ,i think i can control it by using the
> listener of "GEF CommandStack".
> Does anybody has better solutions to solve it.
>
> Thanks for your excellent contributions.
>
> Last time i forget to write the class names.sorry.
>
>
|
|
|
Re: Add new element to the palette [message #149267 is a reply to message #149259] |
Wed, 29 March 2006 14:24 |
Eclipse User |
|
|
|
Originally posted by: wl_95421.yahoo.com.cn
In fact, i know the extension-point of reportitemUI.
But i dont' mean i want to add "new" elements to the palette.
For a simple example,I want to add the elements of the referenced library to
the palette automaticlly.
If the designer add a referenced library to a report, the palette will add a
entry automaticlly.
Thanks for your replay.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03460 seconds