javadoc

Intellij generate javadoc for methods and classes

隐身守侯 提交于 2019-11-30 13:07:09
问题 Is it possible to set up Intellij to generate javadoc for methods and classes, automatically, with @author and @since date ? I had this feature in Eclipse. I know, that files have templates and also i can manually semi-automatically add javadoc to selected method/class. But i want the generation to be automatic for every generated method/class/enum/interface/field etc. This is useful for e.g. "extract method", "override/implement", "create getter/setter" etc. This would save hundreds of

Search JavaDoc in Eclipse

别来无恙 提交于 2019-11-30 13:06:18
问题 Is there a way to search in javadoc comments only (via Eclipse)? I just want to find text within a javadoc comment... 回答1: The only way I can think of is to use Eclipse File Search dialog for all .java files and use this regular expression as input: "(?s:/\*\*([^\*]|\*[^/])*?###INPUT###.*?\*/)" and replace the ###INPUT### with what you are searching for. See this other question about this regex. 回答2: If the javadoc is in source files that are in your workspace then you can use 'File Search'.

Overridden methods in JavaDoc

别来无恙 提交于 2019-11-30 10:41:42
I'm documenting a Java program that I have developed, and wanted to know if JavaDoc will be generated for an inherited method (which is overridden) if I just document the superclass? If I have a class called Vehicle with a drive() method in, and a sub-class called Car with the drive() method overridden, will the documentation for the Vehicles drive method be included in the Cars drive method if no Javadoc is put in the Car class? [I] wanted to know if JavaDoc will be generated for an inherited method (which is overridden) if I just document the superclass? Yes. If you don't have javadoc

Autocompletion of @author in Intellij

偶尔善良 提交于 2019-11-30 10:15:42
问题 I'm migrating from Eclipse to Intellij Idea. One thing I couldn't figure out yet is autocompletion of the @author JavaDoc tag. When typing @a in Eclipse, there are two proposals: @author - author name @author How do I achieve the first proposal in Intellij (is it even possible?)? And if it's possible, how do I change the template of what is inserted for the author name placeholder? 回答1: You can work around that via a Live Template. Go to Settings -> Live Template, click the "Add"-Button

JavaDoc for private / protected methods? [closed]

烈酒焚心 提交于 2019-11-30 07:49:18
Should I write JavaDoc for private or protected methods? And what about private variables? I see class examples on my Java book and the private variables are JavaDoc'ed. So I can't understand if it is a good practice to JavaDoc the private (or protected ) methods. AlexWien Yes you should write JavaDoc for private methods, and even when it is only for yourself. In 3 years when you have to change the code, you will be happy that you documented it. If you leave the company, or have to work on another project, your co-workers will be happy to have a documented code. Undocumented code has much

Javadoc bug: @link can't handle Generics “<>”

百般思念 提交于 2019-11-30 07:19:33
问题 Consider a static method in a class, which I have documented it using javadoc: /** * Description here. * * @param names - The parameters of the impression request. * @param ids - An intent object to enrich. * @param prefix - A prefix. */ public static void parse(Map<String, String> names, String ids, String prefix) ... In order to avoid duplicating the description in the overloaded versions of the method, I would like to use a javadoc @link : /** * Overloaded version with default prefix. * {

How to generate a PDF from JavaDoc (including overview and package summaries)

自作多情 提交于 2019-11-30 07:05:36
问题 I have written extensive JavaDoc documentation on my application, and added lots of useful info at overview.html and package.html files (including links on the former to illustrations in doc-files/ ). Maven's Javadoc plugin nicely uses the standard javadoc tool to generate the classic JavaDoc frameset, but now I need to generate a PDF with the whole documentation. AurigaDoclet generates very pretty PDFs, and I was able to make DocFlex work also. However, both ignore my overview.html and

Why does the Double.valueof javadoc say it caches values, when it doesn't?

强颜欢笑 提交于 2019-11-30 06:01:42
In OpenJDK, for the method: public static Double valueOf(double d) The javadoc says: Returns a Double instance representing the specified double value. If a new Double instance is not required, this method should generally be used in preference to the constructor Double(double), as this method is likely to yield significantly better space and time performance by caching frequently requested values. Here's the actual code: public static Double valueOf(double d) { return new Double(d); } The cache is a lie! What's going on here? The method exists for many types: Integer , Long , BigDecimal and

Intellij generate javadoc for methods and classes

女生的网名这么多〃 提交于 2019-11-30 05:36:07
Is it possible to set up Intellij to generate javadoc for methods and classes, automatically, with @author and @since date ? I had this feature in Eclipse. I know, that files have templates and also i can manually semi-automatically add javadoc to selected method/class. But i want the generation to be automatic for every generated method/class/enum/interface/field etc. This is useful for e.g. "extract method", "override/implement", "create getter/setter" etc. This would save hundreds of manual actions. I'm using IntelliJ Idea 9.0 BETA Community Edition, #IC-90.96. TIA. It's not possible at the

How do I create a jar distributable for javadocs?

主宰稳场 提交于 2019-11-30 04:56:14
I've created an API that I release as a JAR file. It's proprietary so I had to strip the source files out of it. I currently include a separate /doc folder which contains the output of Eclipse's export-to-javadoc wizard. Not bad, but I'd like to go one step further. I'd like to distribute the javadocs as a jar file that can be easily dropped into a future project which includes the jar file for my API. I know I've seen it done this way several times with other distributions I've used, but I haven't had any luck searching. End goal is to allow future developers to have easy access to hover over