vscode-cpptools icon indicating copy to clipboard operation
vscode-cpptools copied to clipboard

Find all references (Experimental Version)

Open csholmq opened this issue 10 years ago • 96 comments

Would be great to have Find all references working. Huge helper in large projects.

csholmq avatar Apr 17 '16 16:04 csholmq

Continuing #404 discussion, couldn't something be achieved with cscope (which seems to be the ctags equivalent for references /call hierarchy)?

I like the current lightweight ctags-based approach, as real "intellisense" is often hard to make work on projects using custom build systems, less error-resilient, and slower especially on network filesystems.

eddy-geek avatar Mar 14 '17 19:03 eddy-geek

We don't use cscope or ctags and are not planning to. We expect the IntelliSense implementation to work.

sean-mcmanus avatar Mar 14 '17 19:03 sean-mcmanus

I was also surprised this feature was not available while trying VSCode again starting today, for the 3rd time in the last 3 years... Given this issue has been opened for over a year, is there a great deal of effort getting it done or is it motivation or priority related? Features like this shouldn't be kicked down the line and I believe the Go project for VSCode has the feature working. Given the length of time this has been opened I just want to make sure this is on developer's minds to get done, with that daily nagging feeling from knowing it's been on the todo list too long.

30 people have thumbs up'd, clearly this issue is important to users.

nevion avatar Jul 12 '17 04:07 nevion

@nevion We have recently started doing work that is expected to enable the Find All References feature, along with other VS 2017 C++ features that are not currently available, such as comments in hover and parameter help. We don't have an ETA.

sean-mcmanus avatar Jul 12 '17 15:07 sean-mcmanus

@sean-mcmanus 'comments in hover' refer to documentation about certain methods present inside comments or something else? If it's the former, will it be tied to certain style like doxygen or standardese?

agauniyal avatar Aug 15 '17 10:08 agauniyal

@agauniyal It refers to showing the comments next to the definition/declaration of code, similar to what VS 2017 (you can try that to see how we expect it to behave). The internal style of the comments won't matter and we'd just show it as a comment.

sean-mcmanus avatar Aug 15 '17 11:08 sean-mcmanus

Really looking forward to this feature. Is there any sort of ETA?

BryanDiLaura avatar Nov 27 '17 19:11 BryanDiLaura

@BryanDiLaura There is no ETA for Find All References. Finding references that occur in different translation units requires additional infrastructure/porting work. Once we have an ETA, we'll post it in a milestone: https://github.com/Microsoft/vscode-cpptools/milestones .

sean-mcmanus avatar Nov 27 '17 22:11 sean-mcmanus

While it's not as awesome as intellisense based symbols/tags, vscode-ag (silver searcher) is pretty fast to do searches. Although I wish it was more configurable, such as only searching cpp/c/h files like the command line version. Currently it searches everything in the folder. It might be an acceptable work around until the intellisense feature is available.

techwoes avatar Mar 07 '18 03:03 techwoes

BTW there is very powerful C++ extension cquery (https://marketplace.visualstudio.com/items?itemName=cquery-project.cquery)

It is blazingly fast, has all IDE features, including this one. I guess it's more reasonable to make this extension an official C++ one aa

Yanpas avatar Mar 09 '18 21:03 Yanpas

What do you mean by official?

agauniyal avatar Mar 09 '18 22:03 agauniyal

Default suggested one with green star label

Yanpas avatar Mar 09 '18 23:03 Yanpas

I'm very interested in this feature. It would be very useful

aenima1891 avatar Mar 23 '18 10:03 aenima1891

RE: cquery

It would be nice if "C_Cpp.intelliSenseEngine" supported "None" or "Disabled". Right now I can't run both VSCode-cpptools and cquery extensions without a lot of performance degradation as both try to do intelligent indexing of the symbols. However, VSCode-cpptools provides useful features beyond just the intellisense such as debugging, so it would be nice if we could disable the intellisense engine.

xgalaxy avatar Mar 29 '18 23:03 xgalaxy

@xgalaxy Setting the intelliSenseEngine to "Tag Parser" and the browse.path to [] should eliminate most indexing of symbols. Is there a reason that is not sufficient? That would only be a per-project fix, but when we expose a global setting for this, then you could set the global setting to be blank as well. We also have issue https://github.com/Microsoft/vscode-cpptools/issues/785 tracking this.

sean-mcmanus avatar Mar 29 '18 23:03 sean-mcmanus

Yes, I switched to cquery too for its find all references, renaming etc. However even with Tag-Parser only you will get duplicate hover-tooltips for all local types. Also I did not find a way to suppress the warning squiggles that the parser could not find the header files.

decimad avatar Mar 31 '18 16:03 decimad

@decimad Yeah, the include path warning isn't currently disable-able, which would be fixed by https://github.com/Microsoft/vscode-cpptools/issues/785 . Duplicate items with tag parser is "by design" -- if cquery has hover support, you can clear the browse.path to reduce the amount of symbols, although we still parse symbols on open file, so there might be some symbols found anyway.

Our typescript is open source, so I believe it would be relatively easy to add a disable setting -- there's a comment in https://github.com/Microsoft/vscode-cpptools/issues/785 that suggests one way to disable the extension via modifying the javascript.

sean-mcmanus avatar Apr 02 '18 08:04 sean-mcmanus

It's been over two years since this issue opened, does this have any sort of priority or ETA? It's not even on the backlog of your milestones.

This feature's presence in other language extensions, the number of thumbs on this issue, and the frequency of duplicate issues highly suggests the demand for fixing this issue -- thus the need for a higher priority than has been given to it. Is there a component that is blocking the development of this feature that is unique to C++?

daltonhildreth avatar Jul 19 '18 01:07 daltonhildreth

@fiblit The feature requires multi-translation unit IntelliSense, which requires a lot of infrastructure work (it's implemented in Visual Studio 2017, but the component hasn't been ported). We may start on the infrastructure work soon, and that work also includes improving our multithreaded processing so IntelliSense operations don't block all other threads. We are aware that is one of the most desired features. We don't have an ETA, but we'll add it to our milestones once we do. The "backlog" milestone is stuff we don't plan to fix.

sean-mcmanus avatar Jul 19 '18 02:07 sean-mcmanus

@sean-mcmanus I can understand that the feature requires some good deal of work to get done.

Can you provide some details on why the VS component in 2017 hasn't or won't be ported? From the outside observer there's alot of shared underlying technologies and provided that on marketplace some extensions cover both, I am interested in hearing some of the deeper details technical or otherwise.

Also I poked this topic about 1 year and 1 week from today. What words can I say to provide kind motivation and understanding that this is not responsible to not have an ETA still?

What are the steps to make it happen? Can the community help, in some way? Does a microsoft project need community based bounties to provide the work time to get it done?

nevion avatar Jul 19 '18 05:07 nevion