user2708074
user2708074

Reputation:

javadoc "@author" not showing?

Whenever I type in "Printing" and hit CTRL Q in intelliJ I can only see the "Summary" and I cant see "Bob" . . . what am I doing wrong?

package printing;
 /**
 * @author Bob
 * <b>Summary</b>
 */
public class Printer {
//stuff
}

***Note: I am just learning how to use the "javadoc" so I would appreciate an explanation.

EDIT: I cant even see "Summary" unless I take out the "@author"

Upvotes: 7

Views: 10046

Answers (5)

coder abhishek
coder abhishek

Reputation: 1

When you click on generate Javadoc then you will find some options .

  1. Go to below the output directory .
  2. Tick the author option .

// this is for intellij Idea.

Upvotes: 0

Pedro Molina
Pedro Molina

Reputation: 1474

If you do in command line you can use this:

javadoc -d javadoc -author -version  YourClass.java

Change the name of the .java to your class name. Is necessary add -author if you want to show the author tag and the same with the version -version

Remember, the -d argument is used to define the folder and depend of your actual path, so if you are in C:\Users\joselito your javadoc folder has to be in C:\Users\joselito\javadoc

Upvotes: 1

rocksteady
rocksteady

Reputation: 2550

When javadoc is used from the console, you can add the -author and -version options to the call like this (-d sets the output directory):

javadoc src/main/java/com/*.java -d src/docs/javadocs/ -author -version

Author and version are displayed using those settings.


The javadoc help (by just typing javadoc) shows the following - as AlexR already mentioned - (shortened):

...
Provided by Standard doclet:
  -d <directory>                   Destination directory for output files
  -use                             Create class and package usage pages
  -version                         Include @version paragraphs
  -author                          Include @author paragraphs
...

Upvotes: 1

Ashutosh Jindal
Ashutosh Jindal

Reputation: 18869

I can reproduce this behavior and have raised an issue to track this : http://youtrack.jetbrains.com/issue/IDEA-114499

Here is the bit of code I used:

package printing;

/**
 * @author Simba
 * @version 1
 * @see java.util.Arrays
 * @since 1
 */
public class Printer {
}

And the resulting documentation:

enter image description here


However, if you try to generate the javadoc via Tools -> Generate JavaDoc with the following settings :

enter image description here

then, the resulting generated javadoc does show the author tag:

enter image description here

therefore proving that the javadoc itself is sound and that it is IntelliJ that does not display it.

Upvotes: 2

AlexR
AlexR

Reputation: 115328

Sounds like a problem/feature of IntelliJ. Eclipse shows whole javadoc including @author. Other possible problem is a presence of <b>Summary</b> right after @author.

So, try to remove the summary and see what happens. Try also to really generate javadoc, e.g. run javadoc utility from command line and see what happens. I am sure that in this case Bob will appear. Good luck.

Upvotes: 2

Related Questions