How do I create an EAttribute whose data type is not an EMF class?

后端 未结 3 2087
名媛妹妹
名媛妹妹 2021-02-09 02:38

Using EMF, I\'d like to define an attribute whose data type (EType) is external to my EMF model. That is, the type I want is a normal hand-coded Java class that is not part of m

3条回答
  •  北恋
    北恋 (楼主)
    2021-02-09 03:11

    You can add a data type to eCore models by manually adding an eClassifiers entry to the *.ecore file. (I was unable to find a mechanism to do this through the Eclipse UI.)

    For example:

    
    

    This will make the class available as an option for the EType in the Properties editor for EAttributes. It does not appear to make it available for EReferences.

提交回复
热议问题