在右键菜单中有Source-> generate Getters and Setters.在选择选项时,用户可以选择需要生成getter和setter的变量.我想要类似的东西.
Source-> generate increment code.
用户可以从其类属性中填充的列表中选择变量名称.生成的方法看起来像
private Integer abc;
public void incrementAbc(){
abc++;
}
Run Code Online (Sandbox Code Playgroud)
我正在考虑扩展popupmenu插件以在菜单中创建选项.但是如何让代码在用户选择时自动生成.是使用快速代码模板的答案.我是插件新手,我很困惑.请帮忙.