0

我正在使用 Google Eclipse 插件来创建一个应用引擎连接的 android 应用程序。在 android 项目中,我只能看到关于我的端点方法的一般无意义的评论。有没有办法让我的自定义评论显示?

(回想一下,在 Eclipse 中,您可以通过将鼠标放在方法名称上来查看方法的 Java 文档。)

这是一个通用注释的示例:

Create a request for the method "register".
This request holds the parameters needed by the Pouton server.  After setting any
optional parameters, call the `Register.execute()` method to invoke the remote operation.
4

1 回答 1

0

更改 Endpoint 方法的 Javadoc 就像更改任何其他方法的 Javadoc...有关更多信息,请参阅Oracle Javadoc 文档

基本上,您必须.java使用 Endpoint 的源代码访问该文件(如果您自动生成 Endpoint,该文件将具有 name YourClassEndpoint.java),并且您只需转到要更改 Javadoc 的方法,并且更改方法上方的注释。

像这样:

/**
 * Here is your generic comment, just delete this text and add your own...
 * It can be as long as you want...
 *
 * @param Here the explanation of the parameter "bar1".
 * @param Here the explanation of the parameter "bar2".
 * @return Here the explanation of the returned value.
 */
public Foo someMethod(Bar bar1, Bar bar2) {
    //...
}

只需在方法顶部添加这种注释,Eclipse(和其他工具)就会知道这些注释代表 Javadoc 并将正确显示它......

于 2013-06-12T17:24:16.703 回答