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

Bug 351824

Summary: Hide selection / ShapeNodeEditPart: Not showing connections/edges/links properly on undo
Product: [Modeling] GMF-Runtime Reporter: Ivar Refsdal <refsdal.ivar>
Component: GeneralAssignee: Project Inbox <gmf-runtime-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: ralphgerbig
Version: 2.3.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:

Description Ivar Refsdal CLA 2011-07-12 07:56:30 EDT
To reproduce do the following in the Ecore diagram editor (or any GMF editor with connections):

1. Create two classes A and B.
2. Create an inheritance link from A to B, i.e. A -> B.
3. Hide B, then hide A separately (right click, "Filter" -> "Hide selection").
4. Do Ctrl-z (undo) two times.

Bug: The inheritance connection/link/edge does not appear.

Closing and opening the editor will fix this.

Solution:
Instead of using org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.get[Target|Source]ConnectionsConnectingVisibleViews(View)
as org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart.getModel[Target|Source]Connections()
does, one can use
org.eclipse.gmf.runtime.diagram.core.util.ViewUtil.get[Target|Source]Connections(View)

Are there any issues with using this other method?