Autocomplete Parameter names in Eclipse without source

I work with my own library with JavaDocs, but not with the source code. I linked JavaDocs to the jar library, but I still cannot get the useful names for the autocomplete parameters (they are called arg0, arg1, arg2, etc.). Is there any way to fix this without source code?

+4
source share
5 answers

Parameter names, such as local ones, are deleted when the source code is compiled to byte code. Even if you have @param elements in Javadoc, they are not guaranteed in any order, and some may even be missing. I don't think there is a reliable way for the IDE to recover which @param matches which parameter uses only Javadoc.

+1
source

I do not believe that Eclipse can do much more with javadocs attached than the browser dots on the right page.

I would suggest looking for a program that can recreate the original jar (only stubs) from the JavaDoc files, and then attach it to your proprietary file. Eclipse should then get the information you want from it.

+1
source

No, variable names are lost at compile time.

0
source

I would recommend installing JD-Eclipse :

This is a Java Decompiler and allows you to look into classes in which you do not have a source / JavaDoc. Looking at the source, you can determine why unnamed parameters are used.

0
source

I think Eclipse has this feature from version 3.2 (see this bug ). I just tried the Oracle jdbc driver (no source, but javadoc). Before attaching javadoc to the jar, I only have arg1,... to complete the parameter. After joining javadoc, I have both javadoc and the correct completion of the parameter name.

But ... this only works if you attach javadoc as "javadoc in the archive" and does not work when you use the javadoc url.

0
source

All Articles