Skip to main content



      Home
Home » Eclipse Projects » GEF » PaletteEntry identity
PaletteEntry identity [message #80430] Thu, 22 May 2003 14:56 Go to next message
Eclipse UserFriend
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 #80447 is a reply to message #80430] Thu, 22 May 2003 15:06 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Yes, this was supposed to get into PaletteEntry.
We are considering adding it into 2.1.1. It is new API which
"optimistically" doesn't break others, but we need to see if out clients
have already added the same methods:

void setID(String id)
String getID()

"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
>
>
Re: PaletteEntry identity [message #80867 is a reply to message #80430] Sun, 25 May 2003 21:44 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:Java Media Framework
Next Topic:"class must implement abstract method" error
Goto Forum:
  


Current Time: Sat Nov 08 02:56:30 EST 2025

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

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

Back to the top