Autocompletion in IDEA with own JAR

If I use autocompletion in IntelliJ, it shows a nice fully detailled description (incl. javadoc info).

Example, if I'm knocking some code into IntelliJ and call a function which uses some parameters, the autocompletion shows the following:

mypackage.class.someFunction(String firstParam, String secondParam, int thirdParam)


Now, I've created some utility classes of my own, I generated JavaDoc for it and I packed the whole thing (that is: javadoc, *.java and *.class) into one single JAR file.
Then I import that JAR file into my LIB-path in IntelliJ, so I can utilize the written functionalities from that JAR file. When writing a call to a function from that JAR file, IntelliJ pops up autocompletion. Very neat, indeed.. but incomplete. Why? Because the autocompletion shows it as following:

mypackage.class.someFunction(String, String, int)

I'm missing the names of the parameters here. And I wish to see them. The question is: how?!

1 comment
Comment actions Permalink

I am not sure why your way doesn't work, however, I know the following way does work for me.

My code is compiled and packed into a jar. That jar is in my class path for a module in my project (not slipped into the Intellij Lib path).

My java doc is generated and sits in a directory. I associate that directory with the entry for my code jar in my class path (See Project Settings/Modules/Libraries - Attach Javadoc)

Once I do this, not only does code completion look the way you want it to, but quick java doc works as well.

I am fairly certain that if you want to pack up the java doc into a jar, you can associate that with the code jar and it will work also, as long as you are careful to pack it up, such that the namespace hierarchies match.

0

Please sign in to leave a comment.