Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 481572 - Menu contribution is shown twice the first time
Summary: Menu contribution is shown twice the first time
Status: CLOSED WORKSFORME
Alias: None
Product: NatTable
Classification: Technology
Component: Core (show other bugs)
Version: 1.3.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 05:14 EST by Quang Tran CLA
Modified: 2017-03-07 05:36 EST (History)
3 users (show)

See Also:


Attachments
Sample source code (9.43 KB, application/x-zip-compressed)
2015-11-06 05:14 EST, Quang Tran CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Quang Tran CLA 2015-11-06 05:14:20 EST
Created attachment 257778 [details]
Sample source code

I wanted to contribute menus via the extension point org.eclipse.ui.menus and followed the guide written by Dirk: http://blog.vogella.com/2015/02/03/nattable-context-menus-with-eclipse-menus/

The problem is the first time I open the menu with right click my contribution is shown twice, all other consecutive tries are shown correcty.
It doesn't matter if it is a dynamic contribution or a command.

Tested with Eclipse target platform 4.4. Attached you'll find a sample application
Comment 1 Dirk Fauth CLA 2016-01-17 16:08:51 EST
On debugging into this it seems like it is an issue in the Eclipse compatibility layer. 

The first time the menu is opened the two existing items are not removed in org.eclipse.ui.internal.PopupMenuExtender (or MenuManagerRenderer when digging deeper). Consecutive tries are removing the items correctly and creating the other items new.

I would need to dig deeper in the platform code to see what is happening here.
Comment 2 Vincent Lorenzo CLA 2016-01-25 08:49:41 EST
Hi, 
	we confirm this bug. We tried with the provided example! To be sure, we modify the example to make the same thing without using NatTable, and as supposed, the problem doesn't come from Nattable!
Nevertheless, this bug does not seem linked to the Papyrus problem where the menus is not correctly filled, see bug 486474
Comment 3 Dirk Fauth CLA 2017-03-07 05:36:39 EST
No further activity on this ticket for more than a year. The last message confirms that the issue is not NatTable related, but related to the Eclipse Platform itself.

I close this ticket as WORKSFORME as I am not sure what to do with it.

Feel free to reopen it or directly create a new ticket for the platform if this still persists with the latest platform.