|
Description
Ansgar Radermacher
New Gerrit change created: https://git.eclipse.org/r/101449 Gerrit change https://git.eclipse.org/r/101449 was merged to [master]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=bb30ad4f8e8a27d005fd4775a539d836e2cb4084 New Gerrit change created: https://git.eclipse.org/r/102284 Gerrit change https://git.eclipse.org/r/102284 was merged to [streams/3.0-maintenance]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=d9e9abc5aba1d63f661f0ab0446681b997085c55 New Gerrit change created: https://git.eclipse.org/r/102388 Gerrit change https://git.eclipse.org/r/102388 was merged to [streams/2.0-maintenance]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=2f2342b41f9532400a5c0bd2628eecf823ee9310 New Gerrit change created: https://git.eclipse.org/r/103256 Gerrit change https://git.eclipse.org/r/103256 was merged to [master]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=6d2a9e6738ed35ddba11aa520595e17cd1f47f45 New Gerrit change created: https://git.eclipse.org/r/103319 Gerrit change https://git.eclipse.org/r/103319 was merged to [streams/3.0-maintenance]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=cc970f662d63f8d2be9c8b97e8e37cb597eff8f6 New Gerrit change created: https://git.eclipse.org/r/103322 Gerrit change https://git.eclipse.org/r/103322 was merged to [streams/2.0-maintenance]. Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=51664ecfa6d4ab67269b2a4aff4dbd354507a782 Hi Ansgar, It seems that this patch break the test EditorReloadTest.testEditPartSelectionRestored identified in bug 521353. Comment out the added code makes the test passed again. (In reply to Thanh Liem PHAN from comment #13) > Hi Ansgar, > > It seems that this patch break the test > EditorReloadTest.testEditPartSelectionRestored identified in bug 521353. > > Comment out the added code makes the test passed again. Thanks for pointing this out. The patch delays diagram editor initialization until it gets the focus. Do you know whether the failing test in bug 521353 is relevant for the user? (or if we need to force initialization in certain cases). Yes, indeed it is relevant to behavior of user. I did the following steps to demonstrate the problem: - Import oep.editor.integration.tests into your instance Papyrus. - Go to model\reloaded - Open 2 models employment & library simultaneously - Change to employment.di window and select one object in its diagrams (class or activity diagram) - Change to library.di window and select an element, rename it, then save to force reloading the diagram - Return back to the employment.di window - Without the patch: the selected object in the employment window is still focused after the reload of library model - With the patch: the selection is disappeared. We lost the focused object after the diagram reloading. An error in step 4 in the above comment, correct as below - Change to employment.di window, open the activity diagram and select one object If we select one object in the class diagram in the employment model instead, the selection is preserved after reloading of library. It is not obvious that why we have different behaviors for class diagram and activity diagram. Tests for Component and Composite Structure diagrams are not passed also. The same results as for Activity diagram. (In reply to Thanh Liem PHAN from comment #18) > Tests for Component and Composite Structure diagrams are not passed also. > The same results as for Activity diagram. I can reproduce the issue with your description - thanks. I guess that code related to reload tries to restore the selection when the diagram has not been initialized yet (due to the patch in this bug). Do you want to look into the issue or do you prefer that I'll do that? Hi Ansgar, I will try to fix it. A possible solution is to distinguish the reload action with the create part action of PapyrusMultiDiagramEditor in UmlGmfDiagramEditor. Not sure if we can do this, but I'll try. Do not hesitate to tell me if you have any idea. Hi Ansgar, It seems that this patch also breaks the test org.eclipse.papyrus.infra.editor.welcome.tests.WelcomeModelElementTest.restoreActivePagePropert. Please see the report: https://hudson.eclipse.org/papyrus/view/Photon%20(Master)/job/Papyrus-Master-Tests/3489/testReport/org.eclipse.papyrus.infra.editor.welcome.tests/WelcomeModelElementTest/restoreActivePageProperty/ The NPE appears when the patch is applied. editor.getDiagram("classes") in line 86 returns null. Comment out the modif, the NPE disappears. A debug show that the contents of digramGraphicalViewer is null. Please see the trace stack: LinkLFDiagramRootEditPart(SimpleRootEditPart).getContents() line: 70 DiagramGraphicalViewer(AbstractEditPartViewer).getContents() line: 267 UmlClassDiagramForMultiEditor(DiagramEditor).getDiagramEditPart() line: 614 PapyrusEditorFixture.getDiagram(IMultiDiagramEditor, String) line: 900 PapyrusEditorFixture.getDiagram(String) line: 873 WelcomeModelElementTest.restoreActivePageProperty() line: 86 The graphical viewer is not correctly initialized. (In reply to Thanh Liem PHAN from comment #22) > A debug show that the contents of digramGraphicalViewer is null. > > Please see the trace stack: > > LinkLFDiagramRootEditPart(SimpleRootEditPart).getContents() line: 70 > DiagramGraphicalViewer(AbstractEditPartViewer).getContents() line: 267 > UmlClassDiagramForMultiEditor(DiagramEditor).getDiagramEditPart() line: 614 > PapyrusEditorFixture.getDiagram(IMultiDiagramEditor, String) line: 900 > PapyrusEditorFixture.getDiagram(String) line: 873 > WelcomeModelElementTest.restoreActivePageProperty() line: 86 > > The graphical viewer is not correctly initialized. (In reply to Ansgar Radermacher from comment #23) > (In reply to Thanh Liem PHAN from comment #22) > > A debug show that the contents of digramGraphicalViewer is null. > > > > Please see the trace stack: > > > > LinkLFDiagramRootEditPart(SimpleRootEditPart).getContents() line: 70 > > DiagramGraphicalViewer(AbstractEditPartViewer).getContents() line: 267 > > UmlClassDiagramForMultiEditor(DiagramEditor).getDiagramEditPart() line: 614 > > PapyrusEditorFixture.getDiagram(IMultiDiagramEditor, String) line: 900 > > PapyrusEditorFixture.getDiagram(String) line: 873 > > WelcomeModelElementTest.restoreActivePageProperty() line: 86 > > > > The graphical viewer is not correctly initialized. Hi Thanh, can you confirm that the issue is fixed with the corrections done in bug 521353 and bug 521550? Hi Ansgar, I confirmed that 2 tests EditorReloadTest.testEditPartSelectionRestored and WelcomeModelElementTest.restoreActivePageProperty are passed now. No new test are failed because of new patches. Fixed with gerrit commits. |