Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » missing emf icons for product export
missing emf icons for product export [message #395185] Mon, 22 August 2005 08:12 Go to next message
Michael Illgner is currently offline Michael IllgnerFriend
Messages: 35
Registered: July 2009
Member
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 #395191 is a reply to message #395185] Mon, 22 August 2005 15:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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?


Michael Illgner wrote:

> 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


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: missing emf icons for product export [message #395202 is a reply to message #395191] Mon, 22 August 2005 20:10 Go to previous messageGo to next message
Michael Illgner is currently offline Michael IllgnerFriend
Messages: 35
Registered: July 2009
Member
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 #395206 is a reply to message #395202] Mon, 22 August 2005 21:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: missing emf icons for product export [message #395451 is a reply to message #395206] Thu, 08 September 2005 09:07 Go to previous messageGo to next message
Michael Illgner is currently offline Michael IllgnerFriend
Messages: 35
Registered: July 2009
Member
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
Re: missing emf icons for product export [message #395454 is a reply to message #395451] Thu, 08 September 2005 14:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
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.&nbsp; 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.&nbsp; It's probably worth while to
look at how your plugin structure differs from the ones for which all
this works correctly.&nbsp; 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.&nbsp;
(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".&nbsp; When it generates icons
for plugins, that what it uses.&nbsp; Is that a typo?&nbsp; 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>
&nbsp;&nbsp;&nbsp; protected Object doGetImage(String key) throws IOException {
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; URL url = Platform.getBundle(PLUGIN_ID).getEntry("icons/" + key +
".gif");
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; InputStream inputStream = url.openStream();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; inputStream.close();
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return url;
<br>
&nbsp;&nbsp;&nbsp; }
<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--


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: missing emf icons for product export [message #395464 is a reply to message #395454] Thu, 08 September 2005 15:04 Go to previous messageGo to next message
Michael Illgner is currently offline Michael IllgnerFriend
Messages: 35
Registered: July 2009
Member
Ed Merks wrote:
> 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
>
The mystery is solved, shame on me ...
the plugin.xml of our model plugin lost the class entry for the Plugin
class, after fixing this all is OK...
Sorry
Re: missing emf icons for product export [message #1385610 is a reply to message #395464] Tue, 10 June 2014 00:16 Go to previous message
Andi Topp is currently offline Andi ToppFriend
Messages: 1
Registered: June 2014
Junior Member
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.
Previous Topic:[CDO] more detailed logs when CDOSession is null...
Next Topic:Eclipse core components
Goto Forum:
  


Current Time: Thu Mar 28 21:51:15 GMT 2024

Powered by FUDForum. Page generated in 0.03950 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top