I have got ditched in a problem with Menu Contribution and PersistedState. I had no problem before removing the -clearPersistedState flag from the VM args.
Now, the app has a weird behaviour, the menu contribution starts to pile up a menu entry every time the code is executed.
Here it's the guilty snippet enclosed in a Processor:
MDirectMenuItem menuItem = MMenuFactory.INSTANCE.createDirectMenuItem();
menuItem.setLabel("Another Exit");
menuItem.setContributionURI("bundleclass://"
+ "com.telespazio.optsat.wizard/"
+ ExitHandlerWithCheck.class.getName());
if (!menu.getChildren().contains(menuItem))
menu.getChildren().add(menuItem);