Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 351022

Summary: Not possible to delete a diagram.
Product: [Modeling] Papyrus Reporter: yirco <netswengineer>
Component: CoreAssignee: Camille Letavernier <cletavernier>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: cletavernier
Version: 0.8.0   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Whiteboard:

Description yirco CLA 2011-07-03 08:59:13 EDT
After some time of editing UML diagrams the .di file gets kind of corrupted. It contains:

<availablePage/>

See below.

Then it is not possible to delete diagrams.

<?xml version="1.0" encoding="ASCII"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
  <pageList>
    <availablePage/>
    <availablePage>
      <emfPageIdentifier href="model.notation#_MY-loKVxEeCpSewJFU8kfQ"/>
    </availablePage>
  </pageList>
  <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
    <windows>
      <children xsi:type="di:TabFolder">
        <children>
          <emfPageIdentifier href="model.notation#_MY-loKVxEeCpSewJFU8kfQ"/>
        </children>
      </children>
    </windows>
  </sashModel>
</di:SashWindowsMngr>
Comment 1 Ansgar Radermacher CLA 2013-03-18 12:16:34 EDT
I've seen already seen <availablePage/> in a di file some time ago. However, I cannot reproduce it via random editing, including creating and removing diagrams. The question is what you have to do specifically during "some time of editing" to get to this situation.
Since eventually difficult to reproduce, I don't mark the bug as resolved yet.
Camille: do you have an opinion on the bug?
Comment 2 Camille Letavernier CLA 2013-03-18 12:48:31 EDT
Fixed in subtasks of Bug 398712: [Core] Multiple issues with the PageManager

There are actually two fixes: you shouldn't get empty <availablePage /> anymore; and the ones you may have from old diagrams won't crash your model anymore.

More precisely:

Bug 348689: [ModelExplorer] Deleting an element that "contains" a diagram/table corrupts the model
Bug 401109: [PageManager] Deleting an element which contains an opened page leads to critical model corruption