Closed GoogleCodeExporter closed 9 years ago
I have handled the problem by revising ProjectManage.py
def get_cscope_files_list(rootdir):
file_list = []
if (not os.path.isdir(rootdir)):
print "Not a directory:", rootdir
return file_list
for root, subFolders, files in os.walk(rootdir):
for f in files:
f = os.path.join(root, f)
if (re.search('\.(h|c|H|C|hh|cc|cpp|hxx|cxx||l|y|s|S|pl|pm|java)$', f) != None):
file_list.append(f)
if (re.search('include',f)!=None and re.search('\/[^.]+$',f)!=None):
file_list.append(f)
return file_list
2 lines are added to recognize CPP header file, perhaps it only works in linux.
More robust methods expectd!
if (re.search('include',f)!=None and re.search('\/[^.]+$',f)!=None):
file_list.append(f)
Original comment by wwthu...@gmail.com
on 23 Oct 2011 at 2:56
Suppose the directory contains files like README, they might get added with
your approach.
For example if a directory has two files: x.c and README, then we want only x.c
to be put into cscope.files. We have similar output when using cscope-indexer.
I don't think its really a bug. But if there is a need to include more files
then its better to modify cscope.files directly and just to "open project" from
seascope.
Original comment by anil.om...@gmail.com
on 26 Oct 2011 at 8:19
Thanks for your advice.
In C++ programming, There is a convention of adding "-*-c++-*-" in the first
line of source code. Maybe seascope should consider it for automation sake.
Original comment by wwthu...@gmail.com
on 27 Oct 2011 at 1:46
Inspecting deep into files to detect file-type is going to be expensive and
slow the speed of scanning files. For now i will stick to cscope-indexer
equivalent behaviour.
Probably we should have mechanism to execute a custom-script if file is not of
standard prefix (for deciding inclusion into file list). Will think about it.
Original comment by anil.om...@gmail.com
on 30 Oct 2011 at 9:08
Original comment by anil.om...@gmail.com
on 5 Dec 2011 at 10:06
Original issue reported on code.google.com by
wwthu...@gmail.com
on 22 Oct 2011 at 1:06