search

Home  >  Q&A  >  body text

java - IDEA modifies method annotation template

Problem Description

background

Use the generated method annotation that comes with idea. The operation is as follows:

  1. Find a way

  2. Write "/**" in the method header

need

This generates the default method annotation. But I want to improve this default comment template and write it in the following form:

Attempts that have been made

But after searching for a long time, I still can’t find a way to change the comment template. After searching online, I only found the following two methods:

File header comment template modification:

step

insufficient

As shown in the picture, this modification of the file header is not the method header comment I need

Shortcut key definition modification:

step

insufficient

The template generated using this method, as shown in the figure, has no connection between comments and method parameters:

Do you know much about how to set method headers in IDEA? Thanks.

曾经蜡笔没有小新曾经蜡笔没有小新2748 days ago1107

reply all(1)I'll reply

  • 阿神

    阿神2017-06-12 09:25:05

    If you use the shortcut key method inside the method, the incoming parameter name can appear, but if you use it externally, you cannot bring your own parameters

    reply
    0
  • Cancelreply