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
Eclipse UserFriend
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.
Previous Topic:Execute commands on a RCP instance by using command lines
Next Topic:80 errors creating new Eclipse4 application
Goto Forum:
  


Current Time: Tue Apr 16 06:49:32 GMT 2024

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

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

Back to the top