Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Type EAttribute (EAttribute has type as another EClass)
Type EAttribute [message #1775320] Fri, 27 October 2017 15:18 Go to next message
Alex Gor is currently offline Alex GorFriend
Messages: 127
Registered: November 2014
Location: Russia
Senior Member
Hello All,

I observed the following problem. In my EMF model I have EClass and I would like to add to another EClass an EAttribute that has type of previously defined EClass

EClass Type1 {} 
EClass Type2 {
   Type1 attribute
}

If user creates POJO. He can write something like this

public class C1 {}
public class C2 {
  private C1 c1;
}


In case I try add EAttribute using core model editor the list of available types limited by standard EType (EString, EInt etc.). And I cannot setup type of EAttribute which type is equal previously defined EClass.

Is it standard limitation of EMF?

In view where property of atrribute can be edited there are two fields

EType - contains only default ecore type (EString, EInt etc)
EAttribyteType - but this field is disable

I use EMF 2.12
Re: Type EAttribute [message #1775324 is a reply to message #1775320] Fri, 27 October 2017 15:44 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6044
Registered: July 2009
Senior Member
Hi

EAttributes are for EDataTypes (not EObjects)

EReferences are for EClasses (i.e. EObjects).

Regards

ED Willink
Re: Type EAttribute [message #1775326 is a reply to message #1775324] Fri, 27 October 2017 16:19 Go to previous message
Alex Gor is currently offline Alex GorFriend
Messages: 127
Registered: November 2014
Location: Russia
Senior Member
Thanks a lot. It is clear
Previous Topic:out of date model
Next Topic:Displaying frequently changing lists of eObjects
Goto Forum:
  


Current Time: Tue Sep 25 11:46:44 GMT 2018

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

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

Back to the top