I have a Java method that is passed a String and an EMF EObject. The String is meant to be the name of an attribute of the EObject. For example, if it were passed "foo" and EObject eobj, it would need to access eobj.getFoo(). I know how to get the value of an EAttibute from its featureID, but can't seem to find a way to get it by attribute name. Is this even possible?
相关问题
- How to export Xcore to Ecore?
- How do I create an EAttribute whose data type is n
- How do I install an Eclipse EPP (for example EPP M
- How to use EMF to read XML file?
- Loading same plugin twice with different version i
相关文章
- How do I create an EAttribute whose data type is n
- How do I install an Eclipse EPP (for example EPP M
- How to use EMF to read XML file?
- 加载使用EMF资源负载的多个文件?(Loading Multiple files using EMF
- Java源代码编辑器作为Eclipse视图(Java source code editor as a
- Java源代码编辑器作为Eclipse视图(Java source code editor as a
- GMF显示图示例(GMF display diagram example)
- GMF显示图示例(GMF display diagram example)
The following should do the trick, but it is not elegant at all. It obtains the
eClass
of youreObject
, finds a matching attribute definition by name and accesses it. ThegetEAllAttributes()
used here also includes attributes defined by parent classes.