Skip to main content



      Home
Home » Modeling » EMF » Setting Edit>Creation Icons to false causes generation of shouldComposeCreationImage in ItemProvi
Setting Edit>Creation Icons to false causes generation of shouldComposeCreationImage in ItemProvi [message #1213922] Wed, 27 November 2013 08:03 Go to next message
Eclipse UserFriend
Hi,

I'm working with a fairly large EMF model where we do not want any "creation icons" to be generated (those in <edit>/icons/full/ctools16). So I went ahead and set the "Edit > Creation Icons" property in the genmodel to false. By the way, we are not using the any creation commands, so the "Edit > Creation Commands" is also set to false.

But when I re-generate the edit-code, every ItemProvider gets the following override:

    /**
     * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
     * @generated
     */
    @Override
    protected boolean shouldComposeCreationImage() {
        return true;
    }

This sort of defeats the purpose of setting the property to false, since now I have to override this to return false in every ItemProvider.

This behavior seems to have appeared in EMF 2.6 and later.

Are there anyway of avoiding this, i.e. not getting the shouldComposeCreationImage method overide?

Thanks,
--Fredrik
Re: Setting Edit&gt;Creation Icons to false causes generation of shouldComposeCreationImage in I [message #1214436 is a reply to message #1213922] Wed, 27 November 2013 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Fredrik,

Comments below.

On 27/11/2013 2:03 PM, Fredrik Attebrant wrote:
> Hi,
>
> I'm working with a fairly large EMF model where we do not want any
> "creation icons" to be generated (those in
> <edit>/icons/full/ctools16). So I went ahead and set the "Edit >
> Creation Icons" property in the genmodel to false. By the way, we are
> not using the any creation commands, so the "Edit > Creation Commands"
> is also set to false.
>
> But when I re-generate the edit-code, every ItemProvider gets the
> following override:
>
>
> /**
> * <!-- begin-user-doc -->
> * <!-- end-user-doc -->
> * @generated
> */
> @Override
> protected boolean shouldComposeCreationImage() {
> return true;
> }
>
> This sort of defeats the purpose of setting the property to false,
> since now I have to override this to return false in every ItemProvider.
This just means that when it needs creation icons, it will compose them
from the icons of the objects themselves...
>
> This behavior seems to have appeared in EMF 2.6 and later.
>
> Are there anyway of avoiding this, i.e. not getting the
> shouldComposeCreationImage method overide?
Is there really a problem or are you assuming it's a problem?
>
> Thanks,
> --Fredrik
>
Re: Setting Edit&gt;Creation Icons to false causes generation of shouldComposeCreationImage in I [message #1218912 is a reply to message #1214436] Fri, 29 November 2013 08:52 Go to previous message
Eclipse UserFriend
Thanks for the quick response.
I was just assuming that it was a problem - sorry about that Wink

Now done the change and gotten rid of the extra icons.

Thanks,
--Fredrik

Previous Topic:Quick model migration beofre using Edapt or Sphinx
Next Topic:EMF data binding: one model value split to multiple targets
Goto Forum:
  


Current Time: Mon Apr 21 08:59:26 EDT 2025

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

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

Back to the top