Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / February 2006

Tip: Looking for answers? Try searching our database.

Eclipse question - Newbie

Thread view: 
mdares - 08 Feb 2006 20:48 GMT
Hi,

I am looking for a way to view built in java api definations from
within eclipse, is there a way I can do this? To be more clear, if I do
something like:

variable1 = object.method(variable2);

I want an easy way to see the documentation for that method/class,
without having to refer to:
http://java.sun.com/j2se/1.5.0/docs/api/ for example.

Any help would be appreciated, I am REALLY new to eclipse, I sure there
is an easy way to get this.

mdares
Roedy Green - 08 Feb 2006 23:29 GMT
>I am looking for a way to view built in java api definations from
>within eclipse, is there a way I can do this? To be more clear, if I do
>something like:
>
>variable1 = object.method(variable2);

You select the thing you are curious about so that it is highlighted.
Then you choose "show declaration" from the menu. That shows you the
Javadoc.  It is the raw javadoc.  Presumably you want to see the HTML
tags in it rendered.  I don't know how to do that.

The trick is selecting first. If you right click in the middle of a
word nothing happens. It drove me nuts at first after using SlickEdit
which works the reverse way, where you must NOT have the item
selected.

I don't understand why either of them is so picky. It should not
matter what is selected, just where you right click.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Boris Gorjan - 09 Feb 2006 08:15 GMT
>>I am looking for a way to view built in java api definations from
>>within eclipse, is there a way I can do this? To be more clear, if I do
[quoted text clipped - 14 lines]
> I don't understand why either of them is so picky. It should not
> matter what is selected, just where you right click.

Window->Show View->Other->Java->JavaDoc
Roedy Green - 09 Feb 2006 11:29 GMT
>Window->Show View->Other->Java->JavaDoc

Wow!  That is so useful. I am always doing muddled Javadoc with < and
> sprinkled in it.

Then when I do it properly, with <li> etc. the stuff becomes
unreadable.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

mdares - 09 Feb 2006 12:16 GMT
Thanks everyone! This is exactly what I was looking for!

Matthew
Boris Gorjan - 09 Feb 2006 12:41 GMT
>>Window->Show View->Other->Java->JavaDoc
>
[quoted text clipped - 4 lines]
> Then when I do it properly, with <li> etc. the stuff becomes
> unreadable.

When you find out that every jar in (Project) Properties -> Java Build Path ->
Libraries has a possibility of specifying its source and javadoc, this feature
becomes even more useful.

Eclipse has many such feaures. One must just take time and go through them: Help
-> *. Otherwise you only use, say, 10% of Eclipses capabilities.

This also might come in handy: http://www.books-download.com/?cat=Eclipse-(105)
Oliver Wong - 09 Feb 2006 17:32 GMT
>>Window->Show View->Other->Java->JavaDoc
>
[quoted text clipped - 3 lines]
> Then when I do it properly, with <li> etc. the stuff becomes
> unreadable.

What's annoying is that Eclipse seems to have a bug when formatting comments
containing <pre></pre> tags: It keeps indenting the comments by one every
time you ask Eclipse to do the formatting. E.g.

<0 formats>
/**
* <pre>
* Hello World!
* </pre>
*/
<0 formats>

becomes

<1 format>
/**
* <pre>
*  Hello World!
* </pre>
*/
<1 format>

and then

<2 formats>
/**
* <pre>
*   Hello World!
* </pre>
*/
<2 formats>

and so on indefinitely.

   - Oliver
Roedy Green - 09 Feb 2006 21:42 GMT
>What's annoying is that Eclipse seems to have a bug when formatting comments
>containing <pre></pre> tags: It keeps indenting the comments by one every
>time you ask Eclipse to do the formatting. E.g.

I reported that bug and they said they already knew about it. I guess
it is fairly low priority to fix.  Watch what happens if you don't
balance your HTML tags.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

aniljava@gmail.com - 09 Feb 2006 05:22 GMT
put your cursor over object or method and press F3. You will find new
page where you need to click on a button somewhat like (Attach src
location..) click that and point to src.zip that ships with JDK. Now
every time you need to see the declaration or the javadoc you can point
the mouse over the method or the class name. Pressing CTRL when mouse
is over lets you view the declaration.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.