I'm writting a custom launcher in my eclipse plugin. The purpose is to display options via the "Run As" and "Debug As" menu on the toolbar.
According to the answer from How do I use "org.eclipse.debug.ui.launchShortcuts"? , I can add static options in "Run As" and "Debug As" menu.
How can I add dynamic options in theses menus. For example , according to the number of runtime server displayed in the server view , I know to display some options or not in the "Run As" and "Debug As" menu.