当它不自动执行时,如何强制Eclipse提示您创建一个getter和setter? [英] How do you force Eclipse to prompt you to create a getter and setter when it doesn't do it automatically?

查看:199
本文介绍了当它不自动执行时,如何强制Eclipse提示您创建一个getter和setter?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



Eclipse提示我自动为其中一个创建一个getter和setter。



我如何让它对于忘记的另一个做同样的事情?

解决方案

编辑器视图 - >右键单击 - >源 - >生成getter和setters


I added two private fields to my Java class.

Eclipse prompted me to automatically create a getter and setter for one of them.

How do I get it to do the same for the other one that it 'forgot' about?

解决方案

editor view -> right click -> source -> generate getters and setters

这篇关于当它不自动执行时,如何强制Eclipse提示您创建一个getter和setter?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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