<p>I'm specifically interested in tools that can be plugged into Vim to allow CScope-style source browsing (1-2 keystroke commands to locate function definitions, callers, global symbols and so on) for languages besides C/C++ such as Java and C# (since Vim and Cscope already integrate very well for browsing C/C++). I'm not interested in IDE-based tools since I know Microsoft and other vendors already address that space -- I prefer to use Vim for editing and browsing, but but don't know of tools for C# and/or Java that give me the same power as CScope.</p>

<p>The original answer to this question included a pointer to the CSWrapper application which apparently fixes a bug that some users experience integrating Vim and CScope. However, my Vim/CScope installation works fine; I'm just trying to expand the functionality to allow using Vim to edit code in other languages.</p>

[{'answer_id': 65544, 'author': 'Lucas Oman', 'author_id': 6726, 'author_profile': 'https://Stackoverflow.com/users/6726', 'pm_score': -1, 'selected': False, 'text': '<p>This may be what you\'re looking for:</p>\n\n<p><a href="http://www.vim.org/scripts/script.php?script_id=1783" rel="nofollow noreferrer">http://www.vim.org/scripts/script.php?script_id=1783</a></p>\n\n<p>You can also mimic some CScope functionality in your own .vimrc file by using the various flavors of <a href="http://vimdoc.sourceforge.net/htmldoc/map.html" rel="nofollow noreferrer">map</a>.</p>\n'}, {'answer_id': 164864, 'author': 'alps123', 'author_id': 22337, 'author_profile': 'https://Stackoverflow.com/users/22337', 'pm_score': 3, 'selected': True, 'text': '<p>CScope does work for Java.</p>\n\n<p>From <a href="http://cscope.sourceforge.net/cscope_vim_tutorial.html" rel="nofollow noreferrer">http://cscope.sourceforge.net/cscope_vim_tutorial.html</a>:</p>\n\n<blockquote>\n  <p>Although Cscope was originally intended only for use with C code, it\'s\n  actually a very flexible tool that works well with languages like C++\n  and Java. You can think of it as a generic \'grep\' database, with the\n  ability to recognize certain additional constructs like function calls\n  and variable definitions. By default Cscope only parses C, lex, and\n  yacc files (.c, .h, .l, .y) in the current directory (and\n  subdirectories, if you pass the -R flag), and there\'s currently no way\n  to change that list of file extensions (yes, we ought to change that).\n  So instead you have to make a list of the files that you want to\n  parse, and call it \'cscope.files\' (you can call it anything you want\n  if you invoke \'cscope -i foofile\'). An easy (and very flexible) way to\n  do this is via the trusty Unix \'find\' command:</p>\n</blockquote>\n\n<pre><code>find . -name \'*.java\' &gt; cscope.files\n</code></pre>\n\n<blockquote>\n  <p>Now run \'cscope -b\' to rebuild the database (the -b just builds the\n  database without launching the Cscope GUI), and you\'ll be able to\n  browse all the symbols in your Java files. Apparently there are folks\n  out there using Cscope to browse and edit large volumes of\n  documentation files, which shows how flexible Cscope\'s parser is.</p>\n</blockquote>\n'}, {'answer_id': 7197831, 'author': 'Andrew', 'author_id': 379428, 'author_profile': 'https://Stackoverflow.com/users/379428', 'pm_score': 3, 'selected': False, 'text': '<p>Claiming that Cscope supports Java is an extreme stretch.  It seems to treat a method like a function, so it has no idea that A.foo(), A.foo(Object) and B.foo() are all different.  This is a big problem with a large code base (including third-party libraries) with many same-named methods.  (I haven\'t looked at the Cscope source, but this is what I found trying the latest Cscope, version 15.7a-3.3 from Debian unstable.)</p>\n\n<p>I tried Cscope on a large Java project, and it was not at all useful to me due to this limitation.  It\'s sad that we cannot get a quick answer to a basic question like "who calls this method", using free software outside of the big IDEs, but we may as well accept it.  (I would love it if I\'m wrong.  I resort to hacks like commenting out the method and recompiling.)</p>\n'}, {'answer_id': 18357900, 'author': 'Yike Lu', 'author_id': 1197961, 'author_profile': 'https://Stackoverflow.com/users/1197961', 'pm_score': 0, 'selected': False, 'text': '<p>I agree with Andrew - trying to get a call hierarchy for a method returns all calls of the same name, even if they are from a different class.</p>\n\n<p>You can use Eclim to plug Eclipse into VIM</p>\n\n<p><a href="http://eclim.org/" rel="nofollow">http://eclim.org/</a></p>\n\n<p>which supportrs call hierarchy</p>\n\n<p><a href="http://eclim.org/vim/java/inspection.html#call-hierarchy" rel="nofollow">http://eclim.org/vim/java/inspection.html#call-hierarchy</a></p>\n'}, {'answer_id': 32697656, 'author': 'Evan', 'author_id': 3179857, 'author_profile': 'https://Stackoverflow.com/users/3179857', 'pm_score': 2, 'selected': False, 'text': '<p>A bit late to the party here, but my <a href="https://github.com/eapache/starscope/" rel="nofollow">https://github.com/eapache/starscope/</a> project provides a nice framework for generating cscope databases for more languages. Currently it supports Ruby and Go, and Javascript is in progress. Adding Java/C# shouldn\'t be that difficult.</p>\n\n<p>Edit: Javascript is now fully supported.</p>\n'}]
['https://Stackoverflow.com/questions/65456', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/8998/']