Category Image Automatic XCode Java Syntax Checking Tip


Ever wish you did not have to wait until you click Build to find out what syntax errors you have in the code you just typed? Well, today I discovered something built-in that automatically shows basic syntax errors every time you save your .java file in XCode ....

Pretty simple, XCode auto indexing updates the project index (it needs the index for Code Sense to work) every time you save. However when it finds a syntax error in your newly typed java code, Code Sense stops displaying the correct list of stuff in the Code Sense pop-up. So, to see what syntax errors are tripping up your XCode project indexer (and your Code Sense functionality), simply leave the console open and any time Code Sense stops working, check the index exceptions, or simply glance at the console when you save and fix the syntax errors that it finds.

In the example picture here, the highlighted message are showing "java indexer exceptions" which indicate syntax errors in the file, line and character position indicated ... missing SEMI's ( ; ).



Just resize the console small and park it in the bottom right corner of your main or second screen (you do use a second screen for faster development, don't you ;-) ) so you can see the last few lines when it is behind other windows.


Posted: Thursday - December 09, 2004 at 02:49 PM        


Published by