Thanks Paul,
that did the trick! But there is now one problem left.
Using the org.eclipse.ui.menus extension point I succeded to contribute
elements to the popupmenu which are directly linked to my commands.
But I have problems contributing to submenus of the contextmenu.
<extension
point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:my.view?after=startGroup">
<menu
id="refactor.submenu"
label="Refactor">
</menu>
</menuContribution>
</extension>
If I define popup elements directly as command subelements of the menu
definition, they are shown in the submenu.
But I do not succeed to contribute from other plugins into that submenu.
Maybe I am using the wrong locationURI?
I tried
locationURI="popup:my.view?after=refactor.submenu"