Organize imports deletes imports which are reqired for javadoc
Answered
Imports for classes which are mentioned in javadoc (using @link) are being deleted when I let intellij organize the imports (Ctrl+Alt+O) which generated a code inspection error. Is this a bug or is there any way to configure this?
Please sign in to leave a comment.
You should use fully qualified class name in @Link annotation without importing the class via the import statement.
I was using @link and not @Link (which should be ok according to oracle documentation). With @Link everything seems to work fine. Thanks!
Still not solved: while using "@Link" does not generates an error in the IDEA, it is not recognized by the maven-javadoc-plugin, so I have to use @link in order to build my project - which generates an error in the IDEA... Is there any way to make intellij accept "@link"?
Hello,
{@link package.class#method} works fine on my machine. What IDE version do you use?
I have updated Intellij and invalidated the cache and the issue seems to disappear. Thanks anyway for checking.
You are welcome!