You are not logged in.

#1 2018-06-15 21:38:22

alexanders916
Member
Registered: 2017-05-30
Posts: 42

[SOLVED] IntelliJ IDEA not reading/parsing java docs

Hello guys,
After noticing that IDEA doesn't display any information on method parameters, like displaying generic method parameters names, I think it doesn't parse any java docs:

JFrame frame = new JFrame("Frame");
frame.setSize(int i1, int i2); // Instead of frame.setSize(int width, int height)

or

String.format(String s, Object... objects); // Instead of String.format(String format, Object... args)

It's kinda exhausting to look up the java docs on the internet and also autocomplete loses a big functionality with this behaviour.
I installed

openjdk8-doc

and already pointed to "/usr/share/doc/java8-openjdk/api" but nothing happends. I already invalidated the IDE's cache so it indexes the source/(docs?) again, but even after that nothing really happends.
What should I do, or what did I forget to install/look up?

Last edited by alexanders916 (2018-06-15 21:49:00)

Offline

#2 2018-06-15 21:41:40

RoundCube
Member
Registered: 2016-05-14
Posts: 42

Re: [SOLVED] IntelliJ IDEA not reading/parsing java docs

There is also an openjdk8-src package, maybe it helps. Let us know.

Offline

#3 2018-06-15 21:44:23

alexanders916
Member
Registered: 2017-05-30
Posts: 42

Re: [SOLVED] IntelliJ IDEA not reading/parsing java docs

That was a fast one, thank you! (What is the docs package for, when actually the src is needed?)

Last edited by alexanders916 (2018-06-15 21:45:19)

Offline

#4 2018-06-16 10:10:13

hakunamatata
Member
Registered: 2016-03-31
Posts: 36

Re: [SOLVED] IntelliJ IDEA not reading/parsing java docs

I am using OpenJDK (instead of the bundled JRE) with IntelliJ IDEA (Ultimate) and have the same problem. These are the steps I have tried:

  1. Install the openjdk8-src and openjdk8-doc packages

  2. Under File > Project Structure > SDKs > 1.8 > Documentation Paths add /usr/share/doc/java8-openjdk/api

  3. Under File > Project Structure > SDKs > 1.8 > Sourcepath add /usr/lib/jvm/java8-openjdk/src.zip

  4. Under File > Invalidate Caches / Restart select Invalidate and Restart

I am still not able to "fix" the autocompletion (Ctrl + Space). Anything I am missing here?

EDIT: Nevermind I figured it out (updated steps to include solution).

Last edited by hakunamatata (2018-06-18 11:36:09)

Offline

Board footer

Powered by FluxBB