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 Jaquinta
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?


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jo Grant, Senior Software Engineer
Admin and Config Console Architect
OpenPages, IBM
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 offline Brian de Alwis
Messages: 191
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.


Eclipse Platform committer. Ask me about Eclipse support, training, and consulting.
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 Jaquinta
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


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jo Grant, Senior Software Engineer
Admin and Config Console Architect
OpenPages, IBM
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: Fri Oct 24 20:37:45 GMT 2014

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

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