Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make IntelliJ autocompletion NOT insert the full path in Javadoc

Tags:

My problem is that every time I insert a @link or similar in my Javadoc and complete a class, it inserts the full package path in front of it, even thought the class is already imported. For example if I have

import java.util.List; 

and I write {@link Li in some Javadoc, and then completes that by choosing List<E> in the popup that appears, it still completes it to {@link java.util.List}. I'd actually prefer it to be {@link List} in any case, and then have the class imported automatically in any case. Event though I don't need it in the code.

Now why is that? Well, I read the Javadoc in my Java files, I rarely read my imports.

I use IntelliJ IDEA 13.1.3.

like image 715
beruic Avatar asked Jun 17 '14 14:06

beruic


People also ask

How do I change the build path in IntelliJ?

Open the Project Structure dialog (File | Project Structure Ctrl+Alt+Shift+S ). In Project Settings, select Project and in the Project compiler output field, specify the corresponding path.

How do I create a method comment in IntelliJ?

Create JSDoc commentsPosition the caret before the declaration of the method/function or field to document, type the opening block comment /** , and press Enter . IntelliJ IDEA generates a JSDoc comment with a list of parameters ( @param ) and return values ( @returns ), where applicable.


2 Answers

In Preferences > Code Style > Java > Imports, uncheck "Use fully qualified class names in javadoc".

enter image description here

like image 56
beruic Avatar answered Sep 20 '22 04:09

beruic


In Preferences > Code Style > Java > Imports, uncheck "Use fully qualified class names"

Uncheck 'Use fully qualified class names'

like image 36
kuporific Avatar answered Sep 18 '22 04:09

kuporific