Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-dev] Retrieve javadoc programmatically

Hi,

for the EASE project I would like to provide documentation for code completion proposals. There we allow users to use native java classes from the JDK and eclipse plugins. To display javadoc contents I would like to reuse the additional proposals provided from JDT for classes and methods. I was able to script my way through JDT and get the help for the java.io.File in the following - scripted - way:


project = new org.eclipse.jdt.internal.core.JavaProject(getProject("Java 1"), null)

sig = new java.lang.String("Ljava.io.File;").toCharArray();
proposal = org.eclipse.jdt.core.CompletionProposal.create(9, 0)
proposal.setSignature(sig)

info = new org.eclipse.jdt.internal.ui.text.java.TypeProposalInfo(project, proposal)
info.getInfo(null)


The getinfo() call returns the requested string content. My only problem here is that I always need an existing Java project in the workspace to derive that information from. Is it possible to get rid of the local IProject reference into the workspace?


thanks
Christian


Back to the top