aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Issue with JavaDoc, Code Assist and Eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Issue with JavaDoc, Code Assist and Eclipse" Watch "Issue with JavaDoc, Code Assist and Eclipse" New topic
Author

Issue with JavaDoc, Code Assist and Eclipse

Ralf Rottmann
Greenhorn

Joined: Dec 07, 2003
Posts: 25
Hi there,
I have an issue with Eclipse's build in Code Assist and Java API Doc feature. I tried to use Google and the Eclipse mailing list before, but without any result as towards a solution of the problem. I assume it might be a very small configuration thing and therefore I hope somebody from JavaRanch might be able to help.
As it tends to be difficult to refer to all the Eclipse settings by words, I have assembled a quick description of the problem along with a set of screenshots at http://www.rottmann.net/java .
Your help is greatly appreciated.
Ralf


-----------------------------<br /><a href="http://www.rottmann.net" target="_blank" rel="nofollow">http://www.rottmann.net</a><p>"The real voyage of discovery consists not in making new landscapes but in having new eyes." <br />Marcel Proust (1871-1922)
Ed Burnette
Author
Ranch Hand

Joined: Jun 10, 2003
Posts: 142
Code assist and hover help don't work off the javadoc. They work directly off the source code. So to get them to work you need to associate source code (usually a jar or zip file containing the source code) with each jar file. For standard Java libraries there is a shortcut - define your JRE in Eclipse preferences to point to the SDK directory (for example c:\j2sdk1.4.2_02) instead of the JRE location (for example c:\Program Files\Java\j2r31.4.2_02) and Eclipse will figure out the rest.


Ed Burnette, Author of Hello Android
Blog: ZDNet's Dev Connection - Twitter: @eburnette
Ralf Rottmann
Greenhorn

Joined: Dec 07, 2003
Posts: 25
Ed, thanks a lot for helping!
I changed general Eclipse preferences the way you described it in your reply. And the problem has partially been solved. When I now hover over, e.g.:
System.out.println
I do get the full signature AND description displayed in the little popup. I guess Eclipse drives it from the src.zip file in C:\j2sdk1.4.2_02 .
However, if I hover over any method of any HttpSession object (I assume in general over any from any javax package) I only get the method signature, not the full description.
And still, if I press Shift-F2 I receive the error message that I have to set a location anywhere. But I don't know where?
Any idea?
Ralf Rottmann
Greenhorn

Joined: Dec 07, 2003
Posts: 25
Update:
I just found out that I did not have ALL JavaDocs available, only the ones coming with J2SE. I added the J2EE JavaDocs from sun.com and now the Shift-F2 over e.g. HttpSession is working fine.
I also found where to configure the documentation path for e.g. the javax.servlet.jar file.
Question 1: Is there any way to configure this location globally, or do I have to set it new for each single project I am creating?
Question 2: While JavaDocs (Shift-F2) seems to work perfectly well, now, I still have problems with Code Assist and the hover popup. It only displays info on some of the packages. I assume that the src.zip file does not contain the required information for packages like javax.servlet.jar. If so, where do I get the "rest of the src.-files"?
Best regards
Ralf
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Ralf Rottmann:
I also found where to configure the documentation path for e.g. the javax.servlet.jar file.
Question 1: Is there any way to configure this location globally, or do I have to set it new for each single project I am creating?

If you configure this in the Build Path settings of one project, it should be available to all projects, if I am not mistaken.

Question 2: While JavaDocs (Shift-F2) seems to work perfectly well, now, I still have problems with Code Assist and the hover popup. It only displays info on some of the packages. I assume that the src.zip file does not contain the required information for packages like javax.servlet.jar. If so, where do I get the "rest of the src.-files"?

Most probably from wherever you got the binary jar files. For servlets, it should be downloadable somewhere at sun.


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
Consider Paul's rocket mass heater.
 
subject: Issue with JavaDoc, Code Assist and Eclipse