No icons after exporting [message #1111724] |
Wed, 18 September 2013 12:38  |
Eclipse User |
|
|
|
Hi !
I am facing a problem :
After exporting my project, I don't have any icons on my treeView anymore.
Here is my code :
public class TodoLabelProvider extends LabelProvider {
private static final Image FOLDER = getImage("folder.png");
private static final Image FILE = getImage("file.png");
@Override
public Image getImage(Object element) {
if (element instanceof Message) {
return FOLDER;
} else if (element instanceof Word) {
return FILE;
}
return null;
}
private static Image getImage(String file) {
Bundle bundle = FrameworkUtil.getBundle(TodoLabelProvider.class);
URL url = FileLocator.find(bundle, new Path("icons/" + file), null);
ImageDescriptor image = ImageDescriptor.createFromURL(url);
return image.createImage();
}
}
Here is my build.properties :
output.. = bin/
bin.includes = META-INF/,\
.,\
plugin.xml,\
Application.e4xmi,\
css/default.css,\
template/,\
xslt/,\
icons/
source.. = src/
I don't understand why it does not work.
Do I have to add something in the plugin.xml ?
Thank you for your help !
ps : it works just fine when i launch the application from eclipse.
|
|
|
Re: No icons after exporting [message #1112834 is a reply to message #1111724] |
Fri, 20 September 2013 04:33   |
Eclipse User |
|
|
|
Hi,
can you check the deployed version of your bundle, whether the icons are
in it? Do you deploy the bundle as a jar or as a folder?
Regards
Jonas
Am 18.09.2013 18:38, schrieb romain ognier:
> Hi !
> I am facing a problem :
> After exporting my project, I don't have any icons on my treeView anymore.
>
> Here is my code :
> public class TodoLabelProvider extends LabelProvider {
>
> private static final Image FOLDER = getImage("folder.png");
> private static final Image FILE = getImage("file.png");
>
>
> @Override
> public Image getImage(Object element) {
> if (element instanceof Message) {
> return FOLDER;
> } else if (element instanceof Word) {
> return FILE;
> }
> return null;
> }
>
> private static Image getImage(String file) {
> Bundle bundle = FrameworkUtil.getBundle(TodoLabelProvider.class);
> URL url = FileLocator.find(bundle, new Path("icons/" + file),
> null);
> ImageDescriptor image = ImageDescriptor.createFromURL(url);
> return image.createImage();
> } } Here is my build.properties :
> output.. = bin/
> bin.includes = META-INF/,\
> .,\
> plugin.xml,\
> Application.e4xmi,\
> css/default.css,\
> template/,\
> xslt/,\
> icons/
> source.. = src/
>
> I don't understand why it does not work.
> Do I have to add something in the plugin.xml ?
> Thank you for your help !
>
> ps : it works just fine when i launch the application from eclipse.
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: No icons after exporting [message #1115954 is a reply to message #1115765] |
Tue, 24 September 2013 16:23  |
Eclipse User |
|
|
|
This was the next I was to suggest! This is f** win32 which does not
care about upper/lowercase whereas any sensible filesystem does and jar
is a filesystem type which is one ;-)
Tom
On 24.09.13 16:57, romain ognier wrote:
> Ok... I found out...
> And I feel really ashamed.
>
> It seems that eclipse is not case sensitive but the exported project is.
> My files name extension was in upper case.
>
> I am really sorry I bothered you for this. Thank you really much anyway.
>
>
|
|
|
Powered by
FUDForum. Page generated in 1.62298 seconds