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

Bug 467813

Summary: Cannot close and reopen the outline view when a Sirius diagram is opened
Product: [Modeling] Sirius Reporter: Mickael LANOE <mickael.lanoe>
Component: DiagramAssignee: Project Inbox <sirius.diagram-inbox>
Status: CLOSED FIXED QA Contact:
Severity: major    
Priority: P3 CC: esteban.dugueperoux, pierre-charles.david
Version: 2.0.0Keywords: triaged
Target Milestone: 3.0.0   
Hardware: PC   
OS: Windows 7   
See Also: https://git.eclipse.org/r/48344
https://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=4f7a1debafc1470e8a7128472be0c28bb5bd316b
Whiteboard:

Description Mickael LANOE CLA 2015-05-21 04:24:45 EDT
Steps to reproduce:

1- open a Sirius diagram
2- close the outline view
3- reopen the outline view without closing the diagram

Assertion failed, the content provider is null.

4- close the diagram and the outline view
5- open the diagram and the outline view, the view is now properly initialized
Comment 1 Pierre-Charles David CLA 2015-05-21 04:26:07 EDT
Here is the actual stack (the relevant part):

org.eclipse.core.runtime.AssertionFailedException: assertion failed:
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:110)
    at org.eclipse.core.runtime.Assert.isTrue(Assert.java:96)
    at org.eclipse.jface.viewers.AbstractTreeViewer.assertContentProviderType(AbstractTreeViewer.java:2385)
    at org.eclipse.jface.viewers.TreeViewer.assertContentProviderType(TreeViewer.java:345)
    at org.eclipse.jface.viewers.StructuredViewer.setContentProvider(StructuredViewer.java:1649)
    at org.eclipse.jface.viewers.AbstractTreeViewer.setContentProvider(AbstractTreeViewer.java:2380)
    at org.eclipse.jface.viewers.TreeViewer.setContentProvider(TreeViewer.java:922)
    at org.eclipse.ui.dialogs.FilteredTree$NotifyingTreeViewer.setContentProvider(FilteredTree.java:1329)
    at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.initializeOutline(DiagramOutlinePage.java:471)
    at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.configureControls(DiagramOutlinePage.java:281)
    at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.createControl(DiagramOutlinePage.java:267)
Comment 2 Pierre-Charles David CLA 2015-05-21 04:27:50 EDT
The stack above is the one you get when running the scenario using Sirius 3.0.0rc1. With Sirius 2.0.x, the problem (at least *a* problem) is already there, but the stack is different:

java.lang.NullPointerException
 at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.initializeOverview(DiagramOutlinePage.java:476)
 at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.configureControls(DiagramOutlinePage.java:285)
 at org.eclipse.sirius.diagram.ui.tools.internal.editor.DiagramOutlinePage.createControl(DiagramOutlinePage.java:267)
 at org.eclipse.ui.views.contentoutline.ContentOutline.doCreatePage(ContentOutline.java:1
Comment 3 Esteban DUGUEPEROUX CLA 2015-05-26 04:12:23 EDT
I don't reproduce on Linux, this seems specific to Windows.
Comment 5 Mickael LANOE CLA 2015-05-28 02:48:46 EDT
Resolve by commit 4f7a1debafc1470e8a7128472be0c28bb5bd316b
Comment 6 Pierre-Charles David CLA 2015-06-24 11:15:44 EDT
Available in Sirius 3.0.0. See https://wiki.eclipse.org/Sirius/3.0.0.