|
Re: Setting eReference from Code [message #421891 is a reply to message #421889] |
Sat, 16 August 2008 21:16 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Maurice,
Comments below.
Maurice O'Connor wrote:
> Hi there!
>
> I've got a piece of code, creating a SetCommand that looks like this:
>
> Command setCommand = SetCommand.create(editingDomain, foo,
> foo.eClass().getEReferences().get(0), bar);
Probably you want to use XyzPackage.Literals.ABC__DEF, where ABC is the
name of the class holding the feature and DEF is the name of the feature.
>
>
> Obviously this is incredibly ugly! Is there any type of reference Id I
> can use to clean this up? Much as you use a feature Id in the
> generated package.
>
> Thanks!
>
> Maurice
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02810 seconds