如何在 IntelliJ IDEA 中自动创建方法时粘贴自定义代码?

How to paste custom code when I create a method automatically in IntelliJ IDEA?

在 IntelliJ IDEA 中,我可以自动创建一个方法。 我写方法名,如果不存在,IDE提示创建。

我希望 IDEA 在主体中粘贴代码 //TODO: write method ${nameOfMethod},当它自动创建新方法时。我该怎么做?

我找到了解决办法。 解决方案:

  1. 打开设置。
  2. 打开文件和代码模板。
  3. 打开新方法体。
  4. 粘贴代码://TODO: to write the method ${METHOD_NAME}