How to “automatically” remove unused units from uses clause?

瘦欲@ 提交于 2019-11-28 17:55:06

问题


Does anyone know about a utility, that can automatically detect and remove unrequired units from the uses clause?

Preferably it ..

  • can be run against a unit and/or a project
  • is free and works with Delphi 2010

Thanks in advance.


回答1:


Try using the "Uses Unit Cleaner" Wizard from CnPack you can download from here

Another option is use ICARUS.

ICARUS is a small subset of Pascal Analyzer. It parses Delphi or Borland Pascal source code and generates a list of unneeded unit references in your uses lists

alt text http://www.peganza.com/images/IcarusScreen.jpg




回答2:


ICARUS from Peganza does something similar.



来源:https://stackoverflow.com/questions/2200250/how-to-automatically-remove-unused-units-from-uses-clause

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!