Home » Modeling » EMF » missing emf icons for product export
missing emf icons for product export [message #395185] |
Mon, 22 August 2005 04:12  |
Eclipse User |
|
|
|
Hi,
I have some problems using EMF in a RCP application. The application
works fine started as runtime eclipse application, but as exported
product, it complaines about missing icons. These icons are exported and
are contained in the created plugin jar. Even the icon for the view
popup menu (the little triangle) seems to be missing ..
The icons are used by an EMF label provider and are loaded by
EMFPlugin.getImage()
Is this a known issue for EMF or should I provide a bugzilla problem
report ?
Michael
|
|
| | |
Re: missing emf icons for product export [message #395206 is a reply to message #395202] |
Mon, 22 August 2005 17:48   |
Eclipse User |
|
|
|
Michael,
EMF expects the folder to be called "icons". When it generates icons
for plugins, that what it uses. Is that a typo? Perhaps you have two
folders with slightly different names and you're either getting from one
folder or the other folder but not both folders?
Michael Illgner wrote:
> Ed Merks wrote:
>
>> Michael,
>>
>> Is this maybe related to
>> https://bugs.eclipse.org/bugs/show_bug.cgi?id=107519? Loading icons
>> for RCP should be no different than loading icons regularly. When
>> you say the icons are in the plugin jar, do you mean you have a
>> jarred plugin, i.e, the whole plugin is a jar?
>>
>>
> Yes,
> the product export generated most plugins as single jars.
> After changing/overriding EMFPlugin.dogetImage() to use an URL from
> the Bundle (Bundle.getEntry("icon/MyIcon.gif")) our custom images got
> loaded, but the icon for the popup menu (little triangle) is still
> missing and I cannot reproduce this with the rcp mail template
> application..., some other icons are missing too, like the icon for
> the "Help Contents" menu.
|
|
| |
Re: missing emf icons for product export [message #395454 is a reply to message #395451] |
Thu, 08 September 2005 10:06   |
Eclipse User |
|
|
|
This is a multi-part message in MIME format.
--------------090001060100040507060504
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Michael,
Your problem is kind of a mystery to me. Clearly all this works for all
our own plugins and this is the first time I've seen an issue like this
in years of it working like this. It's probably worth while to look at
how your plugin structure differs from the ones for which all this works
correctly. Since the base URL is computed by
getBundle().getEntry("/")
what you show and what we already do should produce the same result.
(You have been running with -clean to be sure configuration changes are
picked up, right?)
How things are exported depends on how you've declared your jar in the
plugin.xml/MANIFEST.MF and (I believe) on the build.properties file.
Michael Illgner wrote:
> Ed Merks wrote:
>
>> Michael,
>>
>> EMF expects the folder to be called "icons". When it generates icons
>> for plugins, that what it uses. Is that a typo? Perhaps you have
>> two folders with slightly different names and you're either getting
>> from one folder or the other folder but not both folders?
>>
>>
>
> Hi Ed,
> Sorry for the late answer,
> the problem seems to be still there, let me recall it
> We have a so called model plugin with all stuff related to EMF.
> All works fine when we start out application from eclipse, but after
> the product export the icons and resource texts are missing (not found).
> The model plugin gets exported to a single jar (btw. how can we change
> this ?)
> When we override the method EMFPlugin.dogetImage() in our model plugin
> class to use the bundle URL like
>
> protected Object doGetImage(String key) throws IOException {
> URL url = Platform.getBundle(PLUGIN_ID).getEntry("icons/" + key
> + ".gif");
> InputStream inputStream = url.openStream();
> inputStream.close();
> return url;
> }
>
> we get our icons back, a similar method has to be changed for resource
> texts. Is this a bug ?
>
> BTW.
> We are using EMF 2.1
>
> Michael
--------------090001060100040507060504
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Michael,<br>
<br>
Your problem is kind of a mystery to me. Clearly all this works for
all our own plugins and this is the first time I've seen an issue like
this in years of it working like this. It's probably worth while to
look at how your plugin structure differs from the ones for which all
this works correctly. Since the base URL is computed by <br>
<blockquote>getBundle().getEntry("/")<br>
</blockquote>
what you show and what we already do should produce the same result.
(You have been running with -clean to be sure configuration changes are
picked up, right?)<br>
<br>
How things are exported depends on how you've declared your jar in the
plugin.xml/MANIFEST.MF and (I believe) on the build.properties file.<br>
<br>
<br>
Michael Illgner wrote:
<blockquote cite="middfov0s$9iv$1@news.eclipse.org" type="cite">Ed
Merks wrote:
<br>
<blockquote type="cite">Michael,
<br>
<br>
EMF expects the folder to be called "icons". When it generates icons
for plugins, that what it uses. Is that a typo? Perhaps you have two
folders with slightly different names and you're either getting from
one folder or the other folder but not both folders?
<br>
<br>
<br>
</blockquote>
<br>
Hi Ed,
<br>
Sorry for the late answer,
<br>
the problem seems to be still there, let me recall it
<br>
We have a so called model plugin with all stuff related to EMF.
<br>
All works fine when we start out application from eclipse, but after
the product export the icons and resource texts are missing (not
found).
<br>
The model plugin gets exported to a single jar (btw. how can we change
this ?)
<br>
When we override the method EMFPlugin.dogetImage() in our model plugin
class to use the bundle URL like
<br>
<br>
protected Object doGetImage(String key) throws IOException {
<br>
URL url = Platform.getBundle(PLUGIN_ID).getEntry("icons/" + key +
".gif");
<br>
InputStream inputStream = url.openStream();
<br>
inputStream.close();
<br>
return url;
<br>
}
<br>
<br>
we get our icons back, a similar method has to be changed for resource
texts. Is this a bug ?
<br>
<br>
BTW.
<br>
We are using EMF 2.1
<br>
<br>
Michael
<br>
</blockquote>
<br>
</body>
</html>
--------------090001060100040507060504--
|
|
| |
Re: missing emf icons for product export [message #1385610 is a reply to message #395464] |
Mon, 09 June 2014 20:16  |
Eclipse User |
|
|
|
even if this is a very old thread, i will make some note here for all other people which have similar problem:
if somebody else does have problems with images or icons in application/plugin (in my case RCP Product) which are displayed if launched from eclipse, but are not displayed after product export, ... the answer is simple:
check the case of your path-strings and filenames! ...inside eclipse it doesnt matter, but after export, the thing is case-sensitive! before export, inside eclipse you can have filename Icon.png and in code icon.png and it will work, but if you export it, it'll not work! the icons are missing or throwing nullpointer exceptions - depending on where you use them.
hope this helps somebody - took me some time to find this out.
|
|
|
Goto Forum:
Current Time: Wed Jul 23 18:34:38 EDT 2025
Powered by FUDForum. Page generated in 0.25722 seconds
|