Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 13:03 Go to next message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 34
Registered: June 2012
Member

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 17:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33133
Registered: July 2009
Senior Member
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
>


Ed Merks
Professional Support: https://www.macromodeling.com/
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 13:52 Go to previous message
Fredrik Attebrant is currently offline Fredrik AttebrantFriend
Messages: 34
Registered: June 2012
Member

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: Thu Apr 18 10:13:16 GMT 2024

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

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

Back to the top