Community
Participate
Working Groups
Build ID: M20090211-1700 The vertical ruler (LHS) of the JavaEditor supports some actions on annotations via a context menu. When multiple annotations share the same source line, only the top layer is shown and only this annotation's action is offered in the context menu. Hovering the annotation correctly displays labels from annotations in lower layers, so it would be great if these actions are enabled, too. For an example write this line into any class: public String toString() { return 13; } Only the error marker will show, but hover will also say: overrides java.lang.Object.toString So, way isn't "Open super implementation" enabled? The technical reason seems to lie in class JavaSelectAnnotationRulerAction which only handles the top-most annotation (field fAnnotation). Can't this field be changed to a list or array to support the actions of all java annotations, or do those collide not only here? How about the shortcut Ctrl-1? It seems to be bound to the top-most action (whichever that is), but OTOH Ctrl-1 for "Open super implementation" doesn't seem to work anyway, does it? Multiple menu entries for multiple annotations would be perfect.
Only quick assist/fix is handled specially, otherwise the context menu is always the same and not filtered by the top annotation.
Sorry, I got tricked by "context menu" in your original comment. What you mean is the single-click action which is targeted to the top annotation.
I might be doing something stupid, but if the line of an overriding method has a quickfix I find NO way to invoke the "Open super implementation" action. I'm not so much surprised that there's only one single-click action. Plus: looking at the code, JavaSelectAnnotationRulerAction.update() first finds the top-most java annotation (method findJavaAnnotation()) and from there the context menu is initialized ONLY for that topmost annotation. Are you seeing something different? The other thing might be a separate bug: I never found a way to use Ctrl-1 for invoking "Open super implementation" although that's the shortcut advertized in the context menu. Could this one be plattform specific (I'm on linux-gtk)?
>I might be doing something stupid, but if the line of >an overriding method has a quickfix I find NO way to >invoke the "Open super implementation" action. That's what I tried to say: those are handled by the Go To Annotation action hence only one wins and in case of problems, quick fix wins. However, there's a way to go to the super implementation: use roll-over hovers: Java > Editor > Hovers > [] Expand vertical ruler icons upon hovering >The other thing might be a separate bug: I Right, see bug 66640.
(In reply to comment #4) > there's a way to go to the super implementation: use roll-over hovers: > Java > Editor > Hovers > [] Expand vertical ruler icons upon hovering Thanks, one more of those hidden treasures ;-) I would still prefer if Go To Annotation would expand to a sub-menu if more than one annotation is found, but if presenting only one is by design I won't take this to the Supreme Court :)
> I find NO way to invoke the "Open super implementation" action. For this concrete action, you can always use the main menu: Navigate > Open Super Implementation. I've bound this to Shift+F3.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.