Install java source, docs in 8 steps:
Sign in with your Apple ID (http://connect.apple.com)
Go to https://developer.apple.com/downloads/index.action
Download Java for OS X 2012-00* Developer Package
Install javadeveloper_for_os_x_ * .dmg.
Go to Eclipse > Preferences > Java > Installed JRE
Click Search...
Choose JRE with location like /Library/Java/JavaVirtualMachines/1.6.0_your_jdk_filename.jdk
/contents/home. In my case jdk file name was 1.6.0_33-b03-424.jdk
.
You can find the file name of jdk in terminal: ls -l /Library/Java/JavaVirtualMachines
Now, when you try "open declaration" and get message "Source Not Found" press button Attach source... and paste /Library/Java/JavaVirtualMachines/1.6.0_your_jdk_filename.jdk
/contents/home/src.jar