Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF.edit icons in extra plug-in
EMF.edit icons in extra plug-in [message #1018770] Thu, 14 March 2013 12:47 Go to next message
Matthias N is currently offline Matthias NFriend
Messages: 66
Registered: June 2012
Member
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 15:28 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
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?
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[CDO] Possible bug in CDORepositorySynchronizer?
Next Topic:NO_MODIFICATION_ALLOWED_ERR error when building GWT app
Goto Forum:
  


Current Time: Sat Apr 27 00:36:36 GMT 2024

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

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

Back to the top