Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6643217
  • 博文数量: 915
  • 博客积分: 17977
  • 博客等级: 上将
  • 技术积分: 8846
  • 用 户 组: 普通用户
  • 注册时间: 2005-08-26 09:59
个人简介

一个好老好老的老程序员了。

文章分类

全部博文(915)

文章存档

2022年(9)

2021年(13)

2020年(10)

2019年(40)

2018年(88)

2017年(130)

2015年(5)

2014年(12)

2013年(41)

2012年(36)

2011年(272)

2010年(1)

2009年(53)

2008年(65)

2007年(47)

2006年(81)

2005年(12)

分类: Java

2011-06-07 21:14:00

JAutodoc is an Plugin for automatically adding Javadoc and file headers to your source code. It optionally generates initial comments from element name by using for Javadoc and file headers. FeaturesJAutodoc has the following features:

Mode
  • Complete existing Javadoc
    Existing Javadoc will not be touched. Only missing tags will be added and so far undocumented elements will be documented.
  • Keep existing Javadoc
    Existing Javadoc will not be touched. Missing tags will not be added, but so far undocumented elements will be documented.
  • Replace existing Javadoc
    Existing Javadoc will be totally replaced by the generated Javadoc. Be sure, if you use this option.
Visibility
  • Public, protected, package or private
    Decide for which visibilities you like to create Javadoc.
Filter
  • Comment Types, Fields, Methods or Getter/Setter only
    Decide for which kind of members you like to create Javadoc.
Options
File Header
  • Add/Replace file header
    You can specify a file header that will be added to your source, if no header exists. Optionally, existing headers can be replaced. With option Multi comment header checked, multiple comments at the beginning of the source can be replaced.

    Inside header text the Velocity Template Language () and pre-defined can be used.

    Note: In order to use dollar signs inside the header template (e.g. for SVN/CVS properties like $id$) you have to escpape these signs by an backslash (\$).
Package Javadoc
  • Edit Template
    You can specify the initial content of package.html or package-info.java, which can be added via context menu of package nodes in the Package Explorer.

    Like for headers the Velocity Template Language () and pre-defined can be used inside the template.

  • Use package-info.java
    Use package-info.java instead of package.html
ReplacementsWhen creating comments from element name, shortcuts inside of fields, methods and parameters can be replaced by another text. For example "set" will be replaced by "Sets the" or "db" can be expanded to "Database".

These replacements can be added, deleted or changed via the preferences. The scope of an replacement can be "Field", "Method" or "Both". Use "Field" for fields and parameters. Optionally only the prefix (Prefix) or every occurrence (All) of the shortcut can be replaced.

Note: Shortcuts are case insensitive. They are detected by changes between upper and lower case letters inside the element name (e.g. setDbName).

Usage
  • For source files opened in Editor Javadoc can be added for all or only for selected members. In this case the modified source file will not be saved automatically to disk.

    If the cursor is inside the declaration of an field or method, only this element will be documented. To create a type comment point to the name of the type. Otherwise all members of the current source file will be documented.

    Selecting the menus with "..." will open an Options Dialog where it's possible to overrule the current project/workspace settings. These settings will only be effective for the current compilation unit and only for this Eclipse session.

  • In Package Explorer you can select one or more source file(s) in order to add Javadoc. Alternatively, you can select a package and add Javadoc for all package members or you can do it for the complete project.

    Caution: Source files which are not opened in the editor will be saved directly to disk.
  • When using the Options Dialog in Editor it's possible to see a Preview of all changes.


Task SearchJAutodoc allows to search for tasks like missing Javadoc, file headers or special tags.

Most of the options are self-explaining. Here's the rest:
  • Generated Javadoc
    Search for Javadoc comments that exactly match the one generated by JAutodoc.
  • Outdated file header
    Search for file headers that do not match the one generated by JAutodoc.
  • Search For Missing Tags
    Search for missing tags like @author. Add a minus to the tags name, if existing tags without message should not be reported or a plus, if only existing tags without message should be reported (e.g. @deprecated without a description).

Changes

JAutodoc comes with the Template Engine 1.5, which is available under the


and unzip the file to the Eclipse directory or use the Update Site


.

阅读(1571) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~