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

Bug 481987

Summary: Separators are displayed at wrong position in context menu
Product: [RT] RAP Reporter: Michael Klein <michael.klein>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: ivan
Version: 3.0   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard: sr302
Attachments:
Description Flags
Screenshot to illustrate the problem
none
Snippet to reproduce the problem none

Description Michael Klein CLA 2015-11-12 02:39:07 EST
Created attachment 257890 [details]
Screenshot to illustrate the problem

Environment: Firefox 42.0/IE 11.0.9600.18059 on Win7

The bug occurs using RAP 3.0.1
Works with RAP 3.0.0


Steps to reproduce:
* create a viewer with context menu containing action groups (separators)
* action visibility has to differ between selected viewer items
* right click on different items to open context menu
-> the separators are (sometimes, but reproducible) displayed at wrong positions

I've attached a screenshot to illustrate.
I've attached a snippet to reproduce.
I've tracked down the problem to commit 1fe24b3e5e74cd3e3535e1ab0fbb5c1bd94badd8.

The example works with two visible separators to demonstrate the problem, but I've seen up to four separators stacked at one position in other applications.
Comment 1 Michael Klein CLA 2015-11-12 02:40:03 EST
Created attachment 257891 [details]
Snippet to reproduce the problem
Comment 2 Ivan Furnadjiev CLA 2015-11-12 03:49:28 EST
Yes... you are right. That's the commit, which introduced the regression. Destroying widgets at the end of the protocol message leads to broken "add at position" functionality.
Comment 3 Ivan Furnadjiev CLA 2015-11-12 03:57:38 EST
I tend to revert the problematic commit. We have to look for a different fix about reparenting issue. Ralf, what do you think?
Comment 4 Ivan Furnadjiev CLA 2015-11-16 08:12:04 EST
Fixed with change https://git.eclipse.org/r/#/c/60461/
Comment 5 Ivan Furnadjiev CLA 2015-11-30 05:09:54 EST
Backported to 3.0-maintenance branch with change https://git.eclipse.org/r/#/c/60509/.