|
Re: Icon for an EClass [message #793944 is a reply to message #793701] |
Wed, 08 February 2012 19:07 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
<html>
<head>
<meta content="text/html; charset=ISO-8859-15"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Jonas,<br>
<br>
The item provider does this:<br>
<blockquote>getResourceLocator().getImage("full/obj16/EClass")<br>
</blockquote>
and overrides getResourceLocator like this:<br>
<blockquote> public ResourceLocator getResourceLocator()<br>
{<br>
return EcoreEditPlugin.INSTANCE;<br>
}<br>
</blockquote>
The general pattern is to use the name of the class, the name of the
edit plugin for the class' edit plugin, to fetch the image's URL and
then use ExtendedImageRegistry.INSTANCE to convert it to an Image.<br>
<br>
<br>
On 08/02/2012 2:00 PM, Jonas Helming wrote:
<blockquote cite="mid:jgtrl8$op8$1@news.eclipse.org" type="cite">Hi,
<br>
is there an existing way retrieve the Icon for an EClass, which is
defined in the ItemProvider (basically call getImage()) without
having an instance of that EClass?
<br>
Cheers
<br>
Jonas
<br>
</blockquote>
</body>
</html>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03180 seconds