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

Bug 489303

Summary: Legacy tabs sometimes activated in the wrong context, causing crashes
Product: [Modeling] Sirius Reporter: Pierre-Charles David <pierre-charles.david>
Component: PropertiesAssignee: Project Inbox <sirius.properties-inbox>
Status: CLOSED FIXED QA Contact: Julien Dupont <julien.dupont>
Severity: normal    
Priority: P3 CC: julien.dupont, stephane.begaudeau
Version: 3.1.0Keywords: triaged
Target Milestone: 4.1.0   
Hardware: All   
OS: All   
URL: https://tuleap.eclipse.org/plugins/tracker/?aid=502
Whiteboard:
Bug Depends on:    
Bug Blocks: 495366    

Description Pierre-Charles David CLA 2016-03-09 11:21:46 EST
Steps to reproduce, with Sirius-defined properties views installed/enabled.

1. Make sure the properties view is visible.
2. Create a plain (non-Modeling) projet with a sample.ecore inside (it probably works the same with a Modeling project, but I have not tested).
3. Create a new representation file (sample.aird) for the Ecore, and enable the "Design" viewpoint from "Ecore Tools" .
4. Select the sample.ecore from the Model Explorer. The properties view shows 'No properties available', OK.
5. Create a new diagram on the root EPackage in the ecore. The diagrams opens, and we have the expected tabs in the properties view (the "General" one from default rules, and the legacy ones).
6. Close the diagram and select again the sample.ecore in the Model Explorer. 4 identical exceptions are thrown (see below), which seem to indicate that the legacy bridge considers that the GMF-provided legacy are applicable to the element, but calls them in an invalid context.

java.lang.NullPointerException
	at org.eclipse.gmf.runtime.diagram.ui.properties.sections.AdvancedPropertySection.setInput(AdvancedPropertySection.java:167)
	at org.eclipse.sirius.diagram.ui.tools.api.properties.MiscPropertySection.setInput(MiscPropertySection.java:129)
	at org.eclipse.eef.properties.ui.legacy.internal.legacy2eef.EEFLegacySection.setInput(EEFLegacySection.java:151)
	at org.eclipse.eef.properties.ui.api.EEFTabContents$2.run(EEFTabContents.java:117)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:50)
	at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:173)
	at org.eclipse.eef.properties.ui.api.EEFTabContents.setInput(EEFTabContents.java:120)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage.processSelectionChanged(EEFTabbedPropertySheetPage.java:507)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage.access$0(EEFTabbedPropertySheetPage.java:482)
	at org.eclipse.eef.properties.ui.api.EEFTabbedPropertySheetPage$1.selectionChanged(EEFTabbedPropertySheetPage.java:239)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer.fireSelectionChanged(EEFTabbedPropertyViewer.java:117)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer.access$1(EEFTabbedPropertyViewer.java:115)
	at org.eclipse.eef.properties.ui.internal.page.EEFTabbedPropertyViewer$1.widgetSelected(EEFTabbedPropertyViewer.java:99)
Comment 1 Pierre-Charles David CLA 2016-06-20 11:30:14 EDT
I can't reproduce this anymore on current master. Reducing the severity but not closing yet, as there is no obvious link to a particular change that whould have fixed it. I'd like to understand the initial issue a little more before considering it fixed.
Comment 2 Pierre-Charles David CLA 2016-09-07 10:19:56 EDT
I still can't reproduce it. I don't have time to hunt the actual commit which fixed it, but it is probably among the legacy support fixes done on the EEF side.
Comment 3 Pierre-Charles David CLA 2016-10-18 11:07:32 EDT
Available in Sirius 4.1.0, see https://wiki.eclipse.org/Sirius/4.1.0 for details.