Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 521353 - [Test][Diagram] Edit part selection is not restored after reloading diagram
Summary: [Test][Diagram] Edit part selection is not restored after reloading diagram
Status: RESOLVED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Diagram (show other bugs)
Version: 4.0.0   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Thanh Liem PHAN CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-24 04:58 EDT by Thanh Liem PHAN CLA
Modified: 2017-09-05 05:26 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thanh Liem PHAN CLA 2017-08-24 04:58:38 EDT
The test EditorReloadTest.testEditPartSelectionRestored is failed.
Please see the following stacktrace:

java.lang.AssertionError: 
Expected: edit-part is selected
     but: was <CustomOpaqueActionEditPart( org.eclipse.papyrus.infra.gmfdiag.css.CSSShapeImpl@44b54e21 (visible: true, type: OpaqueAction_Shape, mutable: false) (fontColor: 0, fontName: Tahoma, fontHeight: 9, bold: false, italic: false, underline: false, strikeThrough: false, description: , fillColor: 16777215, transparency: -1, gradient: null, lineColor: 11579568, lineWidth: -1, roundedBendpointsRadius: 0) )>
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:20)
	at org.hamcrest.MatcherAssert.assertThat(MatcherAssert.java:8)
	at org.eclipse.papyrus.editor.integration.tests.tests.EditorReloadTest.testEditPartSelectionRestored(EditorReloadTest.java:206)
Comment 1 Thanh Liem PHAN CLA 2017-08-24 05:06:48 EDT
The debug leads us to the method DiagramMatchers.EditPartSelected->isSelected(EditPart),
which shows that viewer.getSelectedEditParts().contains(editPart) is false.

There is no clue why the default behavior is not preserved anymore.
Comment 2 Thanh Liem PHAN CLA 2017-08-24 10:41:55 EDT
After some more investigation, this test is failed due to the patch of bug 519107
https://git.eclipse.org/r/#/c/101449/
Comment 3 Eclipse Genie CLA 2017-08-25 09:44:04 EDT
New Gerrit change created: https://git.eclipse.org/r/103699
Comment 5 Eclipse Genie CLA 2017-09-03 16:45:43 EDT
New Gerrit change created: https://git.eclipse.org/r/104238
Comment 6 Eclipse Genie CLA 2017-09-03 17:15:18 EDT
Gerrit change https://git.eclipse.org/r/104238 was merged to [streams/3.0-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=6e49019e94036a776c9db4865862c732361ab579
Comment 7 Eclipse Genie CLA 2017-09-03 17:15:40 EDT
New Gerrit change created: https://git.eclipse.org/r/104239
Comment 8 Eclipse Genie CLA 2017-09-05 05:23:13 EDT
Gerrit change https://git.eclipse.org/r/104239 was merged to [streams/2.0-maintenance].
Commit: http://git.eclipse.org/c/papyrus/org.eclipse.papyrus.git/commit/?id=57af836c6627bfaeec2336096b0abb22ba72547b
Comment 9 Ansgar Radermacher CLA 2017-09-05 05:23:47 EDT
Fixed with gerrit commits (master, 3.0-maintenance, 2.0-maintenance)