Created
April 24, 2019 23:58
-
-
Save nbhusare/20f3b87b7284d7cb84bd706e4322ab5b to your computer and use it in GitHub Desktop.
Reading image from an bundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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