如何自动为我们在 eclipse rcp 中编写的方法生成注释?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/6055947/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 20:10:41  来源:igfitidea点击:

how to automatically generate comments for methods written by us in eclipse rcp?

eclipsecomments

提问by yayayokoho3

My question is that, How can the comments or comment-blocks related to the methods added by us into our RCP application as soon as a new method is added.

我的问题是,一旦添加了新方法,与我们添加到 RCP 应用程序中的方法相关的注释或注释块如何。

回答by Arne Deutsch

In the preferences:

在首选项中:

Java -> Code Style -> Code Templates

At the bottom there is a checkbox Automatically add comments for new methods and types.

在底部有一个复选框Automatically add comments for new methods and types

If you have an existing method you can go to the (empty) line just before the method, type /**<ENTER>and the comment is generated.

如果您有一个现有的方法,您可以转到该方法之前的(空)行,键入/**<ENTER>并生成注释。