IntelliJ getter / setter格式 [英] IntelliJ getter/setter format

查看:141
本文介绍了IntelliJ getter / setter格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何让IntelliJ在这一行上生成getter / setter:

How can you get IntelliJ to generate getter/setters on one line like this:

public String getAbc() { return abc; }

而不是

public String getAbc() {
   return abc;
}

??

推荐答案

getter和equals / hashcode都没有模板。这些在IDEA中是硬编码的。

There are no templates neither for getters nor for equals/hashcode. These are hardcoded in IDEA.

来源

你可以在这个 IntelliJ Wishlist

这篇关于IntelliJ getter / setter格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆