Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » missing emf icons for product export
missing emf icons for product export [message #435658] 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 #435716 is a reply to message #435658] Mon, 22 August 2005 15:28 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
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 #435749 is a reply to message #435716] 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 #435752 is a reply to message #435749] Mon, 22 August 2005 21:48 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
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 #436428 is a reply to message #435752] 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 #436443 is a reply to message #436428] Thu, 08 September 2005 14:06 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
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 #436446 is a reply to message #436443] Thu, 08 September 2005 15:04 Go to previous 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
Previous Topic:Drag and Drop Between 2 View
Next Topic:Processing symbolic link files
Goto Forum:
  


Current Time: Sat Dec 07 18:32:51 GMT 2024

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

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

Back to the top