Add this. to member variables/methods in IntelliJ Idea

前端 未结 4 1538
死守一世寂寞
死守一世寂寞 2021-01-01 12:46

Is there a way in IntelliJ Idea to force this. to be automatically placed into code on a format or save or at the very least show an error if it should be in there?

4条回答
  •  鱼传尺愫
    2021-01-01 12:55

    There is a code inspection option available for this (File > Settings > Editor > Inspections):

    You can turn this inspection on to get warnings.

    The code cleanup option can be used from menu (Analyze > Code Cleanup...)

提交回复
热议问题