Fix for break points, line numbers, and other UI bugs in Eclipse on OS X

There are a number of small bugs with Eclipse on OS X that you may run into from time to time. Some of the biggest ones that I have seen are line numbers not showing up in the code editor, break points not showing, line numbers not scrolling when you scroll the code window, errors not showing in the code editor and a host of other small things like this with the UI.

This mainly takes place when I go from having a duel display environment to unhooking my laptop from the external monitor or vice versa. Use too think the the only fix for this was restarting OS X after I make the switch from one setup to another but passing an argument to eclipse when it startes up seems to do the trick. Restarting Eclipse is way faster than having to restart OS X.

Here is what you do:
  1. close Eclipse if it is open
  2. open up a terminal window … (if you don’t know what terminal is then you may not really be a developer)
  3. execute Eclipse from terminal and pass it the “clean” argument like so  
$ /Applications/eclipse/eclipse -clean
If eclipse is installed somewhere else on your system then naturally you will need to use the proper path to get to the eclipse directory.