Ok, i have to fix somebody else's code, and basically on line 892 there's an ELSE/IF statement, but i can't find the original IF statement! The inconsistent nesting is making this extremely hard.
I've trailed up the cod开发者_Go百科e to see if i can find the original but i can't. Does anybody have any ideas how i can search for the originating IF statement besides scrolling with the mouse?
By the way, i'm using Eclipse. Thanks :)
If you're using the CDT, Ctrl-Shift-P is "Go to matching bracket". It may also exist in vanilla Eclipse, PyDev, etc...
if(...) { ... } else { ... }
click on the bolded brace above and Ctrl-Shift-P your way to success!
Why don't you press ctrl-f to format the code and then you should be able to line up the if/else statement. Also you could turn code folding on and close each set of if/else statements until you find it.
精彩评论