Skip to content

Instantly share code, notes, and snippets.

@nbhusare
Created April 24, 2019 23:58
Show Gist options
  • Save nbhusare/20f3b87b7284d7cb84bd706e4322ab5b to your computer and use it in GitHub Desktop.
Save nbhusare/20f3b87b7284d7cb84bd706e4322ab5b to your computer and use it in GitHub Desktop.
Reading image from an bundle
final Bundle bundle = Platform.getBundle("org.eclipse.ui.editors");
final URL url = FileLocator.find(bundle, new Path("icons/full/obj16/quick_fix_warning_obj.png"), null);
final ImageDescriptor imageDesc = ImageDescriptor.createFromURL(url);
final Image image = imageDesc.createImage();
return image;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment