Deleting a feature that has a realization model is broken

Issue #556 resolved
Stacey Beard created an issue

Problem

Trying to delete a feature that has a realization model causes the project to fail to save.

Steps to reproduce

  1. Create a new project.
  2. Add a mandatory feature to the root.
  3. Create a Realization Model > Design Model for the new feature.
  4. Delete the feature.
  5. Try to save the project; saving will silently fail.

Actual result

742577 [AWT-EventQueue-0] INFO .mt4j.sceneManagement.AbstractScene - Destroyed scene: ca.mcgill.sel.ram.impl.AspectImpl@5387342b
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'ca.mcgill.sel.core.impl.CORESceneImpl@76c13dfa (perspective: Design Model (Class Diagram + Sequence Diagrams))' is not contained in a resource.
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301)
at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265)
at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.saveOnlyIfChangedWithMemoryBuffer(ResourceImpl.java:1189)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1030)
at ca.mcgill.sel.ram.ui.utils.BasicActionsUtils.saveConcern(BasicActionsUtils.java:88)
at ca.mcgill.sel.ram.ui.scenes.handler.impl.DefaultRamSceneHandler.save(DefaultRamSceneHandler.java:32)
at ca.mcgill.sel.ram.ui.scenes.RamAbstractScene.actionPerformed(RamAbstractScene.java:313)
at ca.mcgill.sel.ram.ui.scenes.DisplayConcernEditScene.actionPerformed(DisplayConcernEditScene.java:331)

Expected result

Deleting a feature that has a realization model should be possible.

Environment & Version

Windows 10 Home 1909

TouchCORE version:

Comments (2)

  1. Log in to comment