Gabor, Eclipse 2.1 and later provide an option to run javadoc. Eclipse 3.0 provides a view to display it in the editor. Is this what you are looking for?
Javadoc for what? For the JDK classes? Thirdparty libraries?
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
Gabor Beres
Greenhorn
Joined: Dec 21, 2004
Posts: 21
posted
0
Jeanne
I'd like to view it in the editor(for methods, class etc...)
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Eclipse automatically shows the JavaDoc in the editor if it knows the source code for the class. How you tell it where to find the source depends on your answer to my first question...
Gabor Beres
Greenhorn
Joined: Dec 21, 2004
Posts: 21
posted
0
Jeanne I doen't mean the souce code viewing featue. i already know that. I dowloaded the entire javadoc for java2 SE 5.0, and just want to make use of it under eclipse.
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
I understand. You don't need the Javadoc, you only need to point Eclipse to the src.zip of the JDK. Eclipse will then extract the Javadoc information and show it whenever you hover the mouse of a reference to a class, method, whatever from the JDK.
Gabor Beres
Greenhorn
Joined: Dec 21, 2004
Posts: 21
posted
0
"you only need to point Eclipse to the src.zip of the JDK"
that's exactly what i'd like to do. just don't know how
Gabor, In Windows->Preferences->Java->JRE, you can change the JRE/JDK. Note that this will change the compiler too. While the Eclipse 3.0 doesn't support Java 5 features (unless you download the beta version that has that support), you can still use the Java 5 compiler and JavaDoc.
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Originally posted by Gabor Beres: "you only need to point Eclipse to the src.zip of the JDK"
that's exactly what i'd like to do. just don't know how
Exactly as Jeanne already posted.
We could have told you much earlier if you just had answered my very first questions - namely that you want the javadoc for the JDK classes. :roll: [ January 24, 2005: Message edited by: Ilja Preuss ]
Owen Densmore
Greenhorn
Joined: Aug 29, 2004
Posts: 4
posted
0
OK, so I'll be the dummy: can you enter the src.zip file in the preferences>java>installed JREs Javadoc URL entry for the default JRE? I thought you had to enter a javadoc jar/folder for that. Is Eclipse smart enough to figure out its a source tree and not only extract the javadoc info but also the source information too?
Ilja Preuss
author
Sheriff
Joined: Jul 11, 2001
Posts: 14112
posted
0
Originally posted by Owen Densmore: OK, so I'll be the dummy: can you enter the src.zip file in the preferences>java>installed JREs Javadoc URL entry for the default JRE? I thought you had to enter a javadoc jar/folder for that. Is Eclipse smart enough to figure out its a source tree and not only extract the javadoc info but also the source information too?
OK, I guess I deserve that for not trying out my own suggestions...
No, you don't enter the zip file as the Javadoc URL. The Javadoc URL isn't used for in-editor javadoc.
All you need to do is point Eclipse at the "JRE home directory" of a fully fledged JDK (in contrast to a real JRE), it will then automatically pick up the src.zip file.
To see wether it did that correctly, take a look at "Java/Build Path/Classpath Variables" - there should be a JRE_SRC variable containing the path to the tip file.
Sorry for the confusion...
Owen Densmore
Greenhorn
Joined: Aug 29, 2004
Posts: 4
posted
0
Thanks, that makes things clearer.
BTW: My desire to lob in a source dir/jar/zip is that I use Mac which nicely downloads the latest JRE when its available. So I'd like to either add the src.zip directly to the JRE's directory or bind it to the JRE within eclipse via some preferences magic. Doesn't look possible. Hmm..maybe if I just put the zip in the jre directory and reboot???
Owen
Owen Densmore
Greenhorn
Joined: Aug 29, 2004
Posts: 4
posted
0
Yeehaa! It worked:
I downloade a java.sun.com 1.4.2 linux distro, grabbed the src.zip file from it, copied it to the mac location (/Library/Java/Home) for javahome, exited and restarted eclipse, and it worked: tooltips show lots more interesting information.