Community
Participate
Working Groups
I'm currently playing around with Dynamic Menu Contribution as described here: http://blog.vogella.com/2013/03/21/dynamic-menu-contributions-in-eclipse-e4/ But I encountered a serve problem here: The Method annotated with @AboutToShow can not have additional parameters injected. This is because an empty IEclipseContext is created and only populated with the item itself and the List of menu items. Then this context is used to call the AboutToShow method. Because of this it is very hard for the 'Dynamic Menu Contribution' to be really dynamic and contradicts the whole idea of a 'dynamic' contribution if only static values can be used.
Sounds like this context should be created as child context of the active context. Gerrits are welcome
@Lars sorry for confusion, while debugging the code more deeply for providing a patch I noticed that in fact everything works quite well... beside that if one tries to inject a wrong item (in my case: interface versus implementation class) a confusing "Missing @AboutToShow method in..." message is emitted what leads me on the wrong track. Anyways I'll change the ticket to improve this message to something like: > No suitable @AboutToShow method found for injection in ... It also seems that even though it is possible with the injector to report missing items this is not used in ContextInjectionFactory :-\