如何查看哪个单元使用另一个单元的层次结构? (德尔福)
有一个大型项目,我需要查看每个文件在其 USES 子句中引用的单元的层次结构。
前任。
Project Source (program.dpk)
HelperUnit Forms ThirdPartyUnit
MyUtils MyConsts MyDownload TPShellShock TPWhatever
我怎样才能看到这种依赖树?我记得较新的 Delphi 版本中有一些类似的功能,但我不记得它叫什么。它可能是一个插件。
任何有关如何执行此操作的提示都会很棒。我开始编写自己的程序来做到这一点,但我已经浪费了大约 3 个小时,并且仍在研究 pas 文件的解析器。
There is a large project, and I need to see the hierarchy of Units which each file references in it's USES clause.
ex.
Project Source (program.dpk)
HelperUnit Forms ThirdPartyUnit
MyUtils MyConsts MyDownload TPShellShock TPWhatever
How can I see this dependency tree of sorts? I remember there being some feature like this in one of the newer Delphi versions, but I don't remember what it was called. It may have been a plugin.
Any hints on how to do this would be great. I started writing my own program to do it but I've already wasted like 3 hours and am still working on the parser for pas files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
GExperts 内部还内置了一个单元依赖性分析器。查找标有“项目依赖项”的选项。 Delphi 内的专家对当前加载的项目确实有效。
There also is a unit dependancy analyzer built inside of GExperts. Look for the option labled "Project Dependencies". This does work from an expert within Delphi against the currently loaded project.
我不知道 IDE 集成工具可以完成您想要的操作,但您应该看看 单元依赖性分析器,来自 ModelMaker。该工具是免费的。
I don't know a IDE integrated tool to do what you want, but you shall take a look at Unit Dependency Analyzer, from ModelMaker. The tool is free of charge.
您已经通过我们的开源文档工具(称为 SynProject)以自动方式创建了此类图表。
它使用 PasDoc 的内部分支来解析项目单元的接口部分,然后提取注释以获取有关每个类/方法/函数/单元的详细信息。
根据该数据创建单元依赖关系图和类层次结构图。
然后,这些信息被合并到整个技术文档流程中,从需求开始,然后是架构,然后是设计,然后是验证计划,然后是测试,然后是发布。
请参阅http://synopse.info/fossil/wiki?name=SynProject
You've got such graphs created in an automated manner by our Open Source documentation tool, called SynProject.
It uses internal a fork of PasDoc to parse the interface part of your project units, then extract the comments to get detailed info about each class/method/function/unit.
There are both unit dependencies diagrams and class hierarchy diagrams created from this data.
Then this information is merged into a whole technical documentation process, starting from Requirements, then Architecture, then Design, then Validation Plan, then Testing, then Release.
See http://synopse.info/fossil/wiki?name=SynProject
Icarus 是另一个分析“使用”依赖性的工具;它有一个很棒的功能,可以列出不需要出现在 use 子句中的单位。
http://www.peganza.com/
它是免费的。
Icarus is another tool to analyzing your "uses" dependencies; it has a great feature that lists units that don't need to be in your uses clauses.
http://www.peganza.com/
It's free.