Skip to main content



      Home
Home » Eclipse Projects » Eclipse 4 » Icon URI(What are the options?)
Icon URI [message #1034628] Fri, 05 April 2013 13:35 Go to next message
Eclipse UserFriend
The application I am porting to e4 had some infrastructure around sourcing icons. Mostly I had an icon sheet and could pull individual icons off of the one graphic. Additional options let me reverse, flip, crop or do other manipulations when requesting an image.
I'm wondering what options there are for Icon URIs in e4. Is there a hook somewhere that I can supply my own handler? For example it would be nice to be able to supply a URI like "joicon://name/crop:10,20x30,30" or some such that eventually calls my handler with the URI, which returns an ImageDescriptor.
If there isn't a system like that already, are there any alternatives to the platform: option?
Re: Icon URI [message #1037133 is a reply to message #1034628] Tue, 09 April 2013 03:50 Go to previous messageGo to next message
Eclipse UserFriend
You can define your own URI scheme handler using the OSGi URL Handler Service. See the following comment for pointers:

http://www.cooljeff.co.uk/2009/12/12/custom-url-protocols-and-multiple-classloaders/#comment-127

Your handler would transform the images into a PNG or GIF.

Brian.
Re: Icon URI [message #1037435 is a reply to message #1037133] Tue, 09 April 2013 10:56 Go to previous message
Eclipse UserFriend
Perfect! That got me going. I now have a protocol that uses my internal icon sourcer/modifier.
The link you gave has some dead ends though. Searching around based on that I did find a good page here:
http://dz.prosyst.com/pdoc/mbs_ext_6.1/um/mbrowser/developerguide/handler.html
Previous Topic:Adding model contributions from a plugin (fragment.e4xmi) without clearing workspace
Next Topic:How to change the label of a ToolControlImpl
Goto Forum:
  


Current Time: Wed Jul 02 21:00:16 EDT 2025

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

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

Back to the top