I am sure that my command is working adding an entry to other context menus worked (e.g. package explorer). But I am not sure why it does not work for the content outline. I assume that the content outline and the context menu depends on the currently opened file in the editor (would make sense).
I tried to extend the menu with this locationUri:Quote:

org.eclipse.jdt.internal.ui.javaeditor.JavaOutlinePage

but that did not work either.

How can I add a menu entry to the context menu if a java file is edited. There must be an extension point or an id for it (if I use the popup.any locationUri my entry does appear, but then its everywhere...). How do I find correct locationUri for the various contents of the ContentOutline for extension?

Thx for help, this problem is bothering me for some time. I would appreciate any hint.