How can I go to the next Eclipse marker (e.g. build error) using the keyboard?

橙三吉。 提交于 2019-11-28 17:29:02

The best I've come up with so far is Ctrl + F7 to flip to the Problems view, then to pick the topmost error, then Enter to go to it (which returns focus to the editor).

kash

Here's a way to move to the next error, regardless of editor, in one keystroke. It's not perfect, but it works until it's fixed in Eclipse.

  1. Open a "Markers" view. Click the down arrow at the top right, and choose "Configure Contents". Uncheck the show all box, and create the view to show only the problems you want to see. You'll probably want to deselect "warnings" and "errors" as well. Save it.

  2. Click the same "Markers" down arrow, and choose "Group By". Select "None". This is important because you don't want the parent tree level nodes to show, otherwise some of your "next" actions will take you to those, which don't represent an error.

  3. In Eclipse -> preferences -> keys, search for "Markers". If there is not a keystroke bound to the Markers view, create one. I use Ctrl + Shift + M

  4. Get a keyboard hotkey tool like AutoHotKey (for PC's) or iKey for the Mac. I'm using iKey, but there are plenty of other Mac tools you can use. In your hotkey tool, define an action for the keystroke you want to use for "next error". I chose the standard CMD + .

  5. For that keystroke/action in your hotkey tool, generate 3 keystrokes in the following order:

    • Ctrl + Shift + M
    • Down arrow
    • Enter

  6. Of course, you'll want to change the first one to whatever you picked for yours. You'll probably want to restrict that action to be executed only when Eclipse is the current application.

  7. Save that, create some compile errors, and test it.

user77115

Try Ctrl + 3 for Quick access popup window.

If the "Markers view" is not already visible, then type in "markers", in the searchbox on the popup window. Once you have selected it, it should stay available, when you press Ctrl + 3 the next time around.

I just had the same problem, after refactoring some parts of code. I had a lot of errors in different files and i had to go through all of those.
I used the following solution:

  1. Mark all (relevant) entries in the Problems view.
    To do this switch to the Problems view using Ctrl+F7 and select the entries with Shift+/
    You can also select all entries using Ctrl+A
  2. Open the marked errors by pressing .
    Every file containing at least one marked error will be opened.
    The cursor will automatically select one error/file, as if you open only this specific entry
  3. Fix the errors in the opened file.
    Here you can use Ctrl+. to navigate to next error inside this file
  4. Close the file using Ctrl+W when your done.
  5. Eclipse will automatically focus the next file and you can go back to step 3

In my case this solution was much faster then switching to the Problems view each time.

There's an Eclipse bug entered for this that has an attachment that looks like it does what you want.

You could use AutoHotkey: save the mouse position, send a mouse event to click on the arrow in CDT console and then return the mouse back to it's original location. Record the mouse coords with window spy or use autohotkey's search by image function (first capture the images of two arrows with printscreen into bitmaps).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!