[ANN] SPP: GotoNextTrueError

A quick implementation of "GotoNextTrueError" and "GotoPreviousTrueError"
is available through SPP 0.0.1 (SimplePowerPack, I was obviously having
issues
finding names).

GotoNextTrueError has the following behavior:
- when at least one highlighted error exists in the active editor,
Alt+F2 (by default) will navigate to the next "true" error
which is not a warning
- when there isn't any error in the active editor, Alt+F2
will navigate through warnings
- with no error nor warning, Alt+F2 does nothing.

Basically Alt-F2 works the same as F2 with an 'Errors First' behavior.

This will most likely become deprecated when
http://www.jetbrains.net/jira/browse/IDEADEV-793
is implemented, but in the meantime it's convenient.

Vince.


8 comments
Comment actions Permalink


Extremely nice. I've actually replaced the F2/Shift-F2 actions in my keymap with these, because this functionality is basically what I always want. If there's a compile error, I always want to go there before fixing an inspection warning, no matter how urgent.

Thoughts:

1)When multiple warning levels are implemented (per the Irida roadmap), the plugin action should be to move to the next error/warning of the highest level in the file. In that vein, perhaps name the action "Go to next priority error" or "Goto next important error".

2)Any chance of publishing the source. I've always had a vague desire for "Go to next 'TODO' comment", but never quite enough to do anything about it.

--Dave Griffith

0
Comment actions Permalink

Excellent, I've wanted this for years. Nice improvement over the default behavior. I have also mapped F2 and shift F2 to the "true error" actions and I wouldn't mind if the default actions were completely overridden.
By the way, do you have any special reason to give the new actions the same mnemonic as the default ones?

Bas

0
Comment actions Permalink

Thanks. It didn't take me long to remap F2/Shift+F2 to the plugin actions
too :)

2) check out SPP 0.0.3 that has GotoNextTodo/GotoPreviousTodo actions (not
mapped by default).
I've put the source on the TWiki plugin page (SimplePoWerPack actually, I
locked myself out of SimplePowerPack by not removing the leading
write-protection comment). The source is blatantly inspired by IDEA's own
GotoNextErrorAction.

1) 'Next Most Important Error' would be my choice if it weren't that long,
but I agree that a more meaningful name would be appropriate. I'm sure that
when JB gets to implement this functionality on their own they'll do it
right with a good choice of name :)

Vince.


0
Comment actions Permalink

By the way, do you have any special reason to give the new actions the

same mnemonic as the default ones?

You mean, from the Go To menu? I must say I didn't pay much attention to
those because I figured F2 would be way to go. (Or did I not understand your
question?)

Thanks,

Vince.


0
Comment actions Permalink

Vincent Mallet wrote:
>>By the way, do you have any special reason to give the new actions the

same mnemonic as the default ones?


You mean, from the Go To menu? I must say I didn't pay much attention to
those because I figured F2 would be way to go. (Or did I not understand your
question?)


Yes, that was what I meant. It just looked funny.

Thanks,
Bas

0
Comment actions Permalink

Wow. Excellent. One thing, though. You need to put the "Next TODO"/"Previous TODO" actions under the "Go To" menu. Right now the only way to know about them is by stumbling across them in the keymap.

--Dave Griffith

0
Comment actions Permalink

Also, Ctrl-Shift-F2 and Ctrl-Alt-Shift-F2 seem to be open, and appropriate, if you're looking for default mappings.

--Dave Griffith

0
Comment actions Permalink

Thanks. I've added them to the Go To menu, along with the default mapping
you suggested.

Vince.


0

Please sign in to leave a comment.