|Re: Changing Palette Icons programmatically [message #661213 is a reply to message #661098]
||Wed, 23 March 2011 11: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!
|Re: Changing Palette Icons programmatically [message #665857 is a reply to message #661277]
||Sun, 17 April 2011 05:56
Registered: March 2011
sorry for the continued delay in my message.
I was playing around with PaletteViewer and PaletteRoot and it seems the palette is refreshed but eclipse is using cached images. So there is no visible change. Can you confirm this?
Since I need to refresh the my editor edit part images as well I thought I can write a global class for doing that. When I close my editor and restart it again, I see the changed images in both palette and editor. Any ideas on how to accomplish that in a simple class programmatically?
Thank you very much indeed
Powered by FUDForum
. Page generated in 0.02771 seconds