Question

I have had problems getting Content Assist in Eclipse to work with Guava. This assist works fine for code which has source I have loaded into projects (such as JFreeChart), but I cannot find source code for Guava. I have tried putting all three jars into the build path (guava-14.0jar, guava-14.0-javadoc.jar, guava-14.0-sources.jar), and have pointed the Javadoc location to a folder on the hard-disk with guava-14.0-javadoc.jar. With any combination of these, I get "Note: This element has neither attached source nor attached Javadoc and hence no Javadoc can be found." from a hover. Any ideas?

Était-ce utile?

La solution

In Eclipse, you have to point the Javadoc location to the guava-14.0-javadoc.jar file itself, and not to the folder containing it.

In your project properties, go to Java Build Path, tab Libraries, find the entry for the guava jar and click on the little triangle on the left to unroll the jar options. Click on "Javadoc Location" and chose the "Edit..." button. Then choose "Javadoc in archive" and "External file". Write the jar file path or use the Browse button to find the jar.

You don't need to put the javadoc and the source jar in the build path.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top