|Re: Changing Palette Icons programmatically [message #661213 is a reply to message #661098]
||Wed, 23 March 2011 15:14
| Christophe Bouhier
Registered: July 2009
On 23-03-11 00:39, Dave wrote:
> Thanks for the hint.
> I managed to find the related source code but unfortunatly I don't know
> how to change it, since my code is generated with GMF and is regenerated
> regulary. So I thought I can use an extension somewhere to override the
> existing code but that wasn't successful either. Do you have an idea how
> to change the generated code for a palette entries?
I am not sure why you want to override the palettefactory. What you
really want (At least, if I understand from the original post), is to
subscribe to preference changes, and then reload the palette right? So
from the palette factory, you simply re-use the parts which make sense
I found this comment in the EditingDomain.setPaletteRoot(..)
* Sets the PalatteRoot for this EditDomain. If the EditDomain already
* about a PaletteViewer, this root will be set into the palette viewer
* also. Loads the default Tool after the root has been set.
* It is recommended that the palette root not be set multiple times. Some
* components (such as the PaletteCustomizerDialog for the PaletteViewer)
* might still hold on to the old root. If the input has changed or
* be refreshed, just remove all the children from the root and add the new
* @param root
* the palette's root
so, obviously not a good idea to reset the root.
You would need to play (Add/remove) with this:
Please let us know the result!
> Thank you very much indeed!
Powered by FUDForum
. Page generated in 0.08074 seconds