是否有一个软件(或 Eclipse 插件),
给定一个目标,是否允许我将目标依赖关系视为树?
该树不需要是图形的,可以是基于文本的——只是一个可以帮助我遍历某人的 ant 文件网格来调试它们的工具。
不需要是 Eclipse 插件。然而,当单击一个节点时,将该目标的源扔到编辑器上会很好。
我想要同样的东西,但是,像 David 一样,我最终只写了一些代码(Python):
from xml.etree import ElementTree
build_file_path = r'/path/to/build.xml'
root = ElementTree.parse(build_file_path)
# target name to list of names of dependencies
target_deps = {}
for t in root.iter('target'):
if 'depends' in t.attrib:
deps = [d.strip() for d in t.attrib['depends'].split(',')]
else:
deps = []
name = t.attrib['name']
target_deps[name] = deps
def print_target(target, depth=0):
indent = ' ' * depth
print indent + target
for dep in target_deps[target]:
print_target(dep, depth+1)
for t in target_deps:
print
print_target(t)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)