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

Bug 357648

Summary: Edge notation invisible not visible after saving diagram and reopening diagram
Product: [Modeling] GMF-Runtime Reporter: J.Teutsch <J_Bugzilla_Teutsch>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3    
Version: 1.4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description J.Teutsch CLA 2011-09-14 11:24:47 EDT
Build Identifier: 1.4.1.v20100717-0059

An Edge is made invisible. This diagram is saved.
Reopening the diagram the edge is not visible.
Notation to set the edge visible causes no reaction. the target and source ShapeImpl are visible.

Debugging in the code, I found the reason in AbstractGraphicalEditPart createOrFindConnection(Object model).

It always returns createConnection(model) instead of the invisible conx;

I assume, that the EditPartRegistry has not the information of invisible editparts, when they are saved. 

When the diagram is saved with Edge Notation visible=true, the behaviour is like designed. 

Reproducible: Always
Comment 1 J.Teutsch CLA 2011-11-01 03:59:39 EDT
Further Debugging showed the cause.

getModelSourceConnection() returns only visible ConnectionViews.

This makes it impossible to make invisible connections visible again, because ShapeNodeEditPart does not return those connection. I think, it should be the task of the notation to handle the visibility. But the task of getModelSourceConnection() is to return the model despite the status of visibility.