本文整理汇总了Python中Project.Project.find_all_descendants方法的典型用法代码示例。如果您正苦于以下问题:Python Project.find_all_descendants方法的具体用法?Python Project.find_all_descendants怎么用?Python Project.find_all_descendants使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Project.Project
的用法示例。
在下文中一共展示了Project.find_all_descendants方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: find_descendants
# 需要导入模块: from Project import Project [as 别名]
# 或者: from Project.Project import find_all_descendants [as 别名]
def find_descendants():
"""
retrieves descendants of class at point by running a Unix find.
simple huh?
"""
fname=lisp.buffer_file_name()
a = Project(fname)
thing, start = thing_at_point(RIGHT1, LEFT1)
descs = a.find_all_descendants(thing)
ready_output()
for item in descs:
lisp.insert(item)
示例2: Project
# 需要导入模块: from Project import Project [as 别名]
# 或者: from Project.Project import find_all_descendants [as 别名]
os.system('mkdir /tmp/test/bla/bla')
cmd = 'echo "sourcepath \\"asdasf\\"\" > /tmp/test/prj.el'
os.system(cmd)
print a.find_prj_el("/tmp/test/bla/bla")
try:
print a.find_prj_el("/tmp")
except Exception:
print "exception raised"
print a.get_src_dir(currdir + "/./test")
t = Project(currdir + "/./test")
print "top src dir " + t.top_src_dir
print t.find_all_descendants("A")
print t.run_command('ls')
t = Project(currdir + "/./test")
print "top src dir " + t.top_src_dir
print t.find_file_for_thing("C", currdir + "/test/test/bla/B.java")
t = Project(currdir + "/./test")
print "top src dir " + t.top_src_dir
type, pos = t.find_declaration_type("anani", currdir + "/test/test/bla/B.java", 423)
os.system("cp " + currdir + "/test/lib/commons-logging.jar /tmp/")
t = Project(currdir + "/./test")
print t.top_src_dir
t.unjar()