Code cleanup in netbeans

前端 未结 9 1081
感动是毒
感动是毒 2020-12-04 10:55

Is there something similar to the Eclipse cleanup rules (Preferences > Java > Code Style > Clean Up) in NetBeans?

The cleanup rules in eclipse will allow you to clea

9条回答
  •  猫巷女王i
    2020-12-04 11:18

    I don't know a way to do this en mass, but if you delete all imports from a source file and then right click in the source editor, you can select fix imports. This will import all the classes for you alphabetically, asking when it encounters package ambiguities.

    As Soldier.moth pointed out, Netbeans will point out other issues, like casts and override annotations, in line, by use of a light bulb to the left of the source.

提交回复
热议问题