| PaletteEntry identity [message #80430] |
Thu, 22 May 2003 14:56  |
Eclipse User |
|
|
|
Hello,
I realized that the PaletteEntry class does not take a unique id (String or
whatever) that could be used to identify the entry programatically. However,
this could be usefull for extensions that want to contribute to the palette
at specific locations (after an element, before an element...etc). This is
analogous to Actions having an action id.
The PaletteContainer class could also have methods like
"insertBefore(After), append, ...etc)" similar to the ContributionManager
class.
Having such a unique id facilitates our effort to add extensibility to the
PaletteViewer. Wht do you think?
Maged Elaasar
|
|
|
|
| Re: PaletteEntry identity [message #80867 is a reply to message #80430] |
Sun, 25 May 2003 21:44  |
Eclipse User |
|
|
|
Originally posted by: none.us.ibm.com
Maged,
The workaround for 2.1 is to use PaletteSeparators, which do have IDs. What
we could and should do is to filter out any unnecessary separators from the
children of a drawer. This is what JFace does in MenuManager. For example,
a leading separator should be suppressed. Depending on your implementation,
you may be able to hide from your clients the fact that you are using
separators to mark extension points. Then, in the next release, you will be
able to move the IDs to the PaletteDrawers.
If you want to be able to expose both drawer ID *and* use separator IDs too,
then you'll have to add ID to your own PaletteDrawer subclass. Be sure to
make your method names unique, since you know we'll be adding the same
feature. We cannot add any feature until the next major release.
Let me know if PaletteSeparators is good enough. We could consider adding
the filtering above in 2.1.1.
"Maged Elaasar" <melaasar@ca.ibm.com> wrote in message
news:baj6hk$5ps$1@rogue.oti.com...
> Hello,
>
> I realized that the PaletteEntry class does not take a unique id (String
or
> whatever) that could be used to identify the entry programatically.
However,
> this could be usefull for extensions that want to contribute to the
palette
> at specific locations (after an element, before an element...etc). This is
> analogous to Actions having an action id.
>
> The PaletteContainer class could also have methods like
> "insertBefore(After), append, ...etc)" similar to the ContributionManager
> class.
>
> Having such a unique id facilitates our effort to add extensibility to the
> PaletteViewer. Wht do you think?
>
> Maged Elaasar
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03713 seconds