bundle.getEntry() always returns null [message #676250] |
Fri, 03 June 2011 11:55 |
Erwin Messages: 10 Registered: June 2011 |
Junior Member |
|
|
Hi,
I am struggling with something that seems a trivial task for a day now, and I am completely lost! For some reason bundle.getEntry() just won't return the url of my resource. getResource() however DOES work.
I have checked, double checked an triple checked that the PLUGIN_ID is correct, that the filename is correct, desperately moved the resource around, added '/', and '.' to the image path, but to no avail.
Code and build.properties below.
Any help is highly appreciated.
Kind Regards,
Erwin
...
image = getImageDescriptor("icons/myImage.jpg").createImage();
...
private ImageDescriptor getImageDescriptor(String id){
// URL url = Platform.getBundle(Activator.PLUGIN_ID).getResource(id); // Valid URL
// URL url = Platform.getBundle(Activator.PLUGIN_ID).getEntry(id); // null
// return ImageDescriptor.createFromURL(url);
ImageDescriptor imd = AbstractUIPlugin.imageDescriptorFromPlugin(Activator.PLUGIN_ID, id); // null
return imd;
}
Build.properties:
source.. = src/
output.. = bin/
bin.includes = plugin.xml,\
META-INF/,\
.,\
icons/
src.includes = META-INF/,\
icons/,\
plugin.xml
|
|
|
|
Powered by
FUDForum. Page generated in 0.02614 seconds