0

I did this for cscope to add Java capability

  find ./ -name *.java > cscope.files

Yet when I do this and suppose I want to look for a symbol , I get all references to this symbol in java only. I also want it to display the references in the C code which is present in this project. no it only shows java references to symbol i look. So now I have to delete this file cscope.files so I can look c references to this symbol. Hm , Any Help or anyone who has a idea. Regards Vaishali

1 Answers1

3

Well it looks like you're only finding files with the .java extension for a start:

How about:

find . -iname '*.java' -or \\
       -iname '*.cpp' -or  \\
       -iname '*.c' -or    \\
       -iname '*.h' -or    \\
       > cscope.files
Benj
  • 31,668
  • 17
  • 78
  • 127
  • How about adding config files , which have no extention. Does cscope do that. I tried but this didnt work. – Vaishali Dhakate May 04 '12 at 09:04
  • @VaishaliDhakate - Unless you're specifically talking about cscopes grep function, cscope isn't going to know how to parse those anyway so you're better off just using grep for those. – Benj May 07 '12 at 10:44
  • Oh u mean this wont help. Looks like it is giving me the searches with all inclusive results. But I feel a lil doubtful at time. Plz clarify what u say I didnt get. – Vaishali Dhakate May 07 '12 at 13:52
  • @VaishaliDhakate I'm talking about your config files, cscope won't know what to do with those. – Benj May 07 '12 at 16:35
  • find . -iname '\*.java' -or -iname '\*.cpp' -or -iname '\*.c' -or -iname '\*.h' > cscope.files – Vaishali Dhakate May 21 '12 at 02:42