Skip to main content



      Home
Home » Modeling » EMF » EMF.edit icons in extra plug-in
EMF.edit icons in extra plug-in [message #1018770] Thu, 14 March 2013 08:47 Go to next message
Eclipse UserFriend
Hi,

I have an EMF project and generate .model and .edit plug-in.

In ItemProvider the generated icon is used:
public Object getImage(Object object) {
 return overlayImage(object,getResourceLocator().getImage("full/obj16/MYICON"));
 }


I want to add some additional logic:
- check in another plug-in called "my-icons" "full/obj16" if MYICON exists, if so use it.
- if it does not exist, use the generated one

However I don't know how to access the "my-icons" plug-in from the ItemProvider. Any suggestions?
Re: EMF.edit icons in extra plug-in [message #1018862 is a reply to message #1018770] Thu, 14 March 2013 11:28 Go to previous message
Eclipse UserFriend
Matthias,

So this other plugin isn't one you depend on, it's just one that might
be installed...

Perhaps you can just specialize the
XyzEditPlugin.Implementation.getImage to do that optional delegation
step to this other. Looking at
org.eclipse.emf.common.EMFPlugin.InternalHelper.getImage(String) will
help understand how the framework converts these keys into URLs...


On 14/03/2013 1:47 PM, Matthias N wrote:
> Hi,
>
> I have an EMF project and generate .model and .edit plug-in.
>
> In ItemProvider the generated icon is used:
>
> public Object getImage(Object object) {
> return
> overlayImage(object,getResourceLocator().getImage("full/obj16/MYICON"));
> }
>
>
> I want to add some additional logic: - check in another plug-in called
> "my-icons" "full/obj16" if MYICON exists, if so use it.
> - if it does not exist, use the generated one
>
> However I don't know how to access the "my-icons" plug-in from the
> ItemProvider. Any suggestions?
>
Previous Topic:[CDO] Possible bug in CDORepositorySynchronizer?
Next Topic:NO_MODIFICATION_ALLOWED_ERR error when building GWT app
Goto Forum:
  


Current Time: Tue Jul 01 01:08:51 EDT 2025

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

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

Back to the top