Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Dynamic icons
Dynamic icons [message #1727578] Thu, 24 March 2016 07:30 Go to next message
Peter Kullmann is currently offline Peter KullmannFriend
Messages: 240
Registered: July 2009
Senior Member
I wonder how I can use dynamically created images as icons in MHandledMenuItems? In the old e3 code I could draw an image and set a descriptor to an Action (for example).

In e4 there is only the iconURI property. Setting this seems a bit difficult for dynamically created images.

One way to do this is to register an OSGi URLStreamHandlerService and set the icon URI to this special scheme. This is working but is a little too much overhead, I think. Another way would be to save the image to disk and set the URI of the file in the model.

An easy way would be an extension in the renderer where one could supply an ImageDescriptor in the transient data collection.

Peter
Re: Dynamic icons [message #1727619 is a reply to message #1727578] Thu, 24 March 2016 13:41 Go to previous message
Brian de Alwis is currently offline Brian de AlwisFriend
Messages: 876
Registered: January 2012
Senior Member

Quote:

An easy way would be an extension in the renderer where one could supply an ImageDescriptor in the transient data collection.


See IPresentationEngine#OVERRIDE_ICON_IMAGE_KEY.

Brian.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
Previous Topic:Execute commands on a RCP instance by using command lines
Next Topic:80 errors creating new Eclipse4 application
Goto Forum:
  


Current Time: Sun Sep 27 16:53:09 GMT 2020

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

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

Back to the top