Community
Participate
Working Groups
Build Identifier: Eclipse for RCP and RAP Developers Version: Helios Service Release 1 Build id: 20100917-0705 Suppose I have some kind of warning on the current line (and a lightbulb in the editor margin). I'd like to be able to find out what the lightbulb warning is, without using the mouse, since Ctrl-1 shows me the fixes (but not the warning itself, and sometimes the problem isn't obvious from the fixes). Take this example: public class Foo { private int foo = 5; } Here, the word "foo" will be underlined and there is a lightbulb on the left line of the line. In this case, it's perhaps obvious that the warning is telling me "foo" is unused, but in many other cases it hasn't been as obvious to me. I recently learned that the warning message is actually displayed in the status bar, and that alternatively, I can press F2 to see it. However, this seems to only work when the caret itself is WITHIN the underlined segment; I can not simply click on the line to see the warning, I have to navigate to the word "foo" (and I cannot be at the end of the word, I have to be inside or at the front). I suspect this is the reason I never spotted the warning text in the status bar, because I'm often just somewhere on the line, not on the actual error segment. I've been using NetBeans a lot in the past, and in NetBeans, you can go anywhere on a line and press Alt-Enter, and it will pop up the warning and the quickfixes. Thankfully, Eclipse supports exactly the same anywhere-on-line behavior with the Ctrl-1 functionality -- I can be anywhere on the line, and it will open the suggestions for fixing the error. So, to finally get to the point: I'd like the F2-functionality, and the status bar, to ALSO behave this way -- show the error message(s) on the current line, regardless of where I am. (Or if there are many, just pick the one I'm inside, but if I'm not inside any editor range, display one or more of them.) Reproducible: Always Steps to Reproduce: 1. Enter "int foo = 5;" within a Java method body. 2. Wait or save such that a lightbulb text appears. 3. Assuming your caret is still where you finished typing (at the end of the semicolon), notice that there is no warning message in the status bar, and that F2 doesn't bring up a dialog. 4. Now move the caret to the end of the word "foo". Notice that still there is no warning. 5. Nov move the caret on more position to the left, inside foo. Now the warning text appears and F2 will open a dialog with the warnings. I'd like the behavior in 5 to work anywhere on the current line.
Go to the 'Keys' preference page and assign a key binding of your liking to the 'Show Ruler Annotation Tooltip' command.
Thanks. I still think that the -status bar- message should work on the current line instead of the current caret. I would rather be able to see immediately what the error is than having to pull up a popup to read it - but if you want to leave the issue resolved that's okay by me since at least I know how to get the message via popup now. (I also think that the new action (Show Ruler Annotation Tooltip, which looks like it was added in 3.6 since it wasn't in 3.5 which I've been using (because the plugins I'm working on must run on 3.5), should be substituted in as the "default" keybinding currently assigned to Show Tooltip Description. I think the new action is more user friendly and it ought to be the default for new users to eclipse, and only those who really want to narrow focus to the caret are probably expert users who can rebind to the caret-action instead.
(In reply to comment #2) > Thanks. I still think that the -status bar- message should work on the current > line instead of the current caret. The status bars shows various things and changes quite often, hence it's not the best places to do this. Also, if you have several problems with long messages it gets unreadable. > (I also think that the new action (Show Ruler Annotation Tooltip, which looks > like it was added in 3.6 since it wasn't in 3.5 which I've been using (because > the plugins I'm working on must run on 3.5), should be substituted in as the > "default" keybinding currently assigned to Show Tooltip Description. This would break all users (especially blind ones) that use F2 to show e.g. the Javadoc. Another improvement for you could be to use the Problems view and configure to only show the problems for the current selection and sorted by line number.