Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » How to obtain an EAttributes property name?
How to obtain an EAttributes property name? [message #423579] Thu, 02 October 2008 14:29 Go to next message
Morten MacFly is currently offline Morten MacFlyFriend
Messages: 69
Registered: July 2009
Member
Dear all,

let's assume I have an Editor generated out of an Ecore model with
several parameters (EAttributes).
Within a method I obtain an EAttribute of a specific type. I would like
to present the EAttribute's name to the user. Hence if I use the
EAttribute.getName() method I only get the "models" EAttribute name
(like "myParam") but not the representation as e.g. in the generated
PropertySheet of the editor.
I realise that this is related to the EObject's PropertyDescriptors and
what I am looking for is what's e.g. in the
"_UI_[ObjectType]_[Feature]_feature" constant in the plugin.properties
file of the object providers (e.g. [ObjectType]ItemProvider). I just
don't know how to access this "string" given an EAttribute and the
related EObject.

An help?!

With regards, Morten.
Re: How to obtain an EAttributes property name? [message #423587 is a reply to message #423579] Thu, 02 October 2008 15:46 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 30806
Registered: July 2009
Senior Member
Morten,

Comments below.


Morten MacFly wrote:
> Dear all,
>
> let's assume I have an Editor generated out of an Ecore model with
> several parameters (EAttributes).
> Within a method I obtain an EAttribute of a specific type. I would like
> to present the EAttribute's name to the user. Hence if I use the
> EAttribute.getName() method I only get the "models" EAttribute name
> (like "myParam") but not the representation as e.g. in the generated
> PropertySheet of the editor.
> I realise that this is related to the EObject's PropertyDescriptors and
> what I am looking for is what's e.g. in the
> "_UI_[ObjectType]_[Feature]_feature" constant in the plugin.properties
> file of the object providers (e.g. [ObjectType]ItemProvider). I just
> don't know how to access this "string" given an EAttribute and the
> related EObject.
>
If you know there is a property descriptor for it, you could adapt the
owner object to IItemPropertySource (AdapteFactoryContentProvider
supports that), use getPropertyDescriptor with the feature object as the
ID, and then call getDisplayName.
> An help?!
>
> With regards, Morten.
>
Previous Topic:ResourceImpl unload throws out of memory
Next Topic:[CDO] Using CDOView?
Goto Forum:
  


Current Time: Mon Jan 20 18:45:36 GMT 2020

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

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

Back to the top