Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » DynamicMenuContribution items are persistent...
DynamicMenuContribution items are persistent... [message #1104722] Sun, 08 September 2013 21:48 Go to next message
Maarten Bezemer is currently offline Maarten BezemerFriend
Messages: 117
Registered: February 2012
Senior Member

I have a DynamicMenuContribution item defined in the Application.e4xmi to implement a MRU list.
During development it worked nicely.

public void aboutToShow(List<MMenuElement> items, EModelService modelService) {
	final String[] mruArray = getMRUArray(preferences);
	if (mruArray == null) {
	for (String mruItem : mruArray) {
		MDirectMenuItem dynamicItem = modelService
		dynamicItem.setLabel(new File(mruItem).getName());
	if (mruArray.length > 0) {

After I removed the clearPersistedState flag, the MRU list became persistent, and each time I restart my application, the old entries are kept and the new ones are added. And the list becomes larger and larger.

When I check the workbench.xmi file (in .metadata/.plugins/org.eclipse.e4.workbench/ ) it indeed shows all MRU menu entries.

I would have thought that the dynamic menu items are not stored between sessions? Or am I wrong? Or am I doing something wrong?


[Updated on: Sun, 08 September 2013 21:48]

Report message to a moderator

Re: DynamicMenuContribution items are persistent... [message #1141938 is a reply to message #1104722] Thu, 17 October 2013 09:32 Go to previous message
Wernke zur Borg is currently offline Wernke zur BorgFriend
Messages: 23
Registered: December 2011
Junior Member
This issue had apparently been fixed in 4.3 (see but seems to have revived from the ashes in 4.4 - I am experiencing the problem with these features in my target platform:

Eclipse e4 Rich Client Platform 1.3.0.v20130918-1640
Eclipse RCP 4.4.0.v20130918-2000

The code mentioned in the bug report ( is different from this release. Is it possible that the old problem was reintroduced during refactoring?
Previous Topic:TextEditor and other goodies
Next Topic:Trouble installing e4 tools in Eclipse 4.2.2 RCP-RAP
Goto Forum:

Current Time: Sun Feb 23 14:42:10 GMT 2020

Powered by FUDForum. Page generated in 0.01699 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top