Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 149787 - Elements are not deleted in the diagram when using two domain (ecore) models
Summary: Elements are not deleted in the diagram when using two domain (ecore) models
Status: RESOLVED INVALID
Alias: None
Product: GMF-Tooling
Classification: Modeling
Component: Core (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: gmf.generation-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-06 03:41 EDT by Missing name CLA
Modified: 2010-07-19 22:20 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Missing name CLA 2006-07-06 03:41:06 EDT
I have created an ecore model "var.ecore" and loaded the "Ecore.ecore" model as a resource into that model. Beside others the top-level "model" domain element references to elements of type "EObject".

Now in my GMFMAP I have created a Top Node Mapping with a Node Mapping child. The "element" attribute of this Node mapping is set to "EObject".

Now if I select "create generator model..." the wizard asks me "Need genmodel to cover all referenced domain packages (2)". If I select my "var.genmodel" model (which references the Ecore model) the GMFGEN gets generated and I can generate the diagram code. But when using the generated editor I can no longer delete any of the elements in the diagram. If I select an element in the diagram and press delete, the element is correctly removed from the model-file but remains within the diagram. Furthermore, if the element I wanted to delete has e.g. a label, after pressing delete the label's text is changed to "[]" (null reference?).

If I reopen the diagram, the node is still there. But if I delete the diagram file and re-initialize it from the model file (where the element is already correctly deleted), the diagram is correctly displayed.

So perhaps this might be an update problem with the diagram file?

See Thread news://news.eclipse.org:119/e8d8ll$ks1$1@utils.eclipse.org
Comment 1 Missing name CLA 2006-07-06 04:38:32 EDT
My fault. I accidentally mapped the semantical element of a graphical node to an interface instead to a class which could be instantiated. The generator itself produced no error, but the generated editor showed the described behaviour. 

Perhaps interfaces and abstract classes should be excluded from the list "Domain meta information -> Element" in the GMFMAP.
Comment 2 Alex Shatalin CLA 2006-07-07 08:13:40 EDT
Can you please submitt a separate request for correcting EMF editor for .gmfmap model + adding corresponding rules to the validation process?
Comment 3 Missing name CLA 2006-07-10 05:14:05 EDT
I have submitted enhancement request #150117
<https://bugs.eclipse.org/bugs/show_bug.cgi?id=150117>
Comment 4 Eclipse Webmaster CLA 2010-07-19 22:20:06 EDT
[GMF Restructure] Bug 319140 : product GMF and component
Generation was the original product and component for this bug