Tuesday, March 08, 2005

[Tech] Link Java API documents to Eclipse interface

We can make the documents of Java API available in elipse interface by configuring JRE Library in a workspace. Try going to project->properties; then, 'Java Build Path'->Labraries. Choose existing JRE you want to use and click 'Edit' button. At this point choose 'Alternate JRE' and then 'Installed JRE'. The previous step may look confusing because we want to change the one we have in the system, but we must go to 'Alternate JRE'. That's okay. Don't think too much.

We will see the list of JRE availabe. Click the one you like and then 'Edit'. Then, change the Javadoc URL to a folder location we want.

To access the document, press F1 on Java class we want to explore and then select the last menu, 'Javadoc for '.

Another Tip in Eclipse:
Eclipse has a feature to help us locate a reference of class or object easily. This is important because sometimes we want to track usage of a variable or a class. To access the information, right click on a class name or a variable anc choose 'References->Project' (or Workspace). A tree of reference will be displayed for browsing (in another panel). In addition, hightlight for the reference will be shown in source code too.

No comments: