views:

349

answers:

2

Is anyone familiar with a tool that generates code stubs with meaningful names from class and javadoc?

The real question should've been "I have classes without debug information and a matching javadoc, but my IntelliJ IDEA 8.0.1 (please, no IDE wars) doesn't take into account the javadoc and shows me "void setLocation(Object object, String str1, int i1, int i2);" instead of "void setLocation(Object component, String name, int x, int y);" - which makes a HUGE difference, both to auto-completion and ease of use". If this can be answered, I'd be satisfied as well.

+3  A: 

I suggest to file a bug against IDEA along these lines: If a class has no debug information but has JavaDocs, IDEA should use the JavaDoc to determine the names of the parameters.

Btw. Eclipse has the same problem. :)

Aaron Digulla
there is one already, but it's not been handled for 2 versions - with no real target release.
Ran Biron
Add a comment and a vote to the bug so the developers see that someone wants this.
Aaron Digulla
A: 

Go to Project Structure (in 8.x that's Ctrl+Alt+Shift+S) -> Modules -> (select the module you're coding) -> Dependencies. Select the dependency (either JAR file or directory) that contains the third party component. Click on the "Edit..." button, a new window will pop up. If you have a JAR file or a folder on your computer with the javadocs, select "Attach JavaDoc..." and point IDEA to the location. You can also point it to an online API using "Specify JavaDoc URL..." - just give it the root of the javadoc-generated output. Select OK and close all the other dialog windows.

Go back to the editor, and highlight a method in the third party component. If you press Ctrl+Q, you should see a javadoc popup with full parameter descriptions.

Pavel