Home » Modeling » Epsilon » EMF model - simple questions(I've a simple EMF model which is raising questions - inc. why is one relationship seen but not the other?)
EMF model - simple questions [message #1064055] |
Mon, 17 June 2013 12:55 |
Julian Johnson Messages: 20 Registered: March 2013 |
Junior Member |
|
|
Attached is a simple ecore model (and its diagram, and emf). I can create .model instances of this (example crews1.model attached), and populate the model with exeed editor, however, there are several oddities:
1) when I right click on the root object 'asset', I can only see childs: 'equipment', 'task', 'zone', and not 'equipTaskUse'. Would 'equipTaskUse' also need to be a subtype of 'item' so that I could also create instances of it?
2) I am puzzled that the way I see properties for the instances of 'equipment' and for 'task' does not seem symmetric. If I've created an instance of 'equipment', I can see the attribute: "equipname", while for instances of 'task' I can see attributes: "taskID", "taskname", "uses". Why can I see 'uses'for task, and not 'performs' for equipment?
3) In 'equipment', attribute 'equipname' actually appears as "Equip Name" in properties view. Also for 'task' attributes actually appear as "Task ID", "Task Name", "Uses" - note capitalisations and word splits. Why is this?
Thanks.
-
Attachment: crews.emf
(Size: 0.73KB, Downloaded 142 times) -
Attachment: crews.ecore
(Size: 3.31KB, Downloaded 225 times) -
Attachment: crews.ecorediag
(Size: 24.52KB, Downloaded 246 times) -
Attachment: crews1.model
(Size: 0.92KB, Downloaded 223 times)
|
|
|
Re: EMF model - simple questions [message #1064187 is a reply to message #1064055] |
Tue, 18 June 2013 07:17 |
|
Hi Julian,
> Attached is a simple ecore model (and its diagram, and emf). I can create .model instances of this (example crews1.model attached), and populate the model with exeed editor, however, there are several oddities:
> 1) when I right click on the root object 'asset', I can only see childs: 'equipment', 'task', 'zone', and not 'equipTaskUse'. Would 'equipTaskUse' also need to be a subtype of 'item' so that I could also create instances of it?
Either this, or you could add another val reference e.g.
val equipTaskUse[*] equipTaskUses;
> 2) I am puzzled that the way I see properties for the instances of 'equipment' and for 'task' does not seem symmetric. If I've created an instance of 'equipment', I can see the attribute: "equipname", while for instances of 'task' I can see attributes: "taskID", "taskname", "uses". Why can I see 'uses'for task, and not 'performs' for equipment?
This appears to be consistent with your metamodel (crews.emf).
> 3) In 'equipment', attribute 'equipname' actually appears as "Equip Name" in properties view. Also for 'task' attributes actually appear as "Task ID", "Task Name", "Uses" - note capitalisations and word splits. Why is this?
EMF does this automatically to improve usability (it only affects presentation).
Cheers,
Dimitris
|
|
|
Goto Forum:
Current Time: Fri Apr 26 19:37:30 GMT 2024
Powered by FUDForum. Page generated in 0.02772 seconds
|