Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Icon URI(What are the options?)
Icon URI [message #1034628] Fri, 05 April 2013 17:35 Go to next message
Jo Jaquinta is currently offline Jo JaquintaFriend
Messages: 40
Registered: January 2013
Location: Boston
Member

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 07:50 Go to previous messageGo to next message
Brian de Alwis is currently online Brian de AlwisFriend
Messages: 500
Registered: January 2012
Senior Member

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 14:56 Go to previous message
Jo Jaquinta is currently offline Jo JaquintaFriend
Messages: 40
Registered: January 2013
Location: Boston
Member

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: Tue Sep 27 20:47:31 GMT 2016

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

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