Bug 13213 – Make 'go to definition' play nicer with extern(C)
Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
visuald
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2014-07-27T08:49:00Z
Last change time
2014-12-21T02:04:19Z
Assigned to
nobody
Creator
turkeyman
Comments
Comment #0 by turkeyman — 2014-07-27T08:49:51Z
In C/C++, there are 2 features, 'go to declaration' (ctrl-alt-F12) and 'go to definition' (F12), one generally takes you to the header file, the other takes you to the code.
In VisualD, there only seems to be 'go to definition' (F12), this makes sense for D code, since there are no headers, but it's not so helpful with extern(C) functions.
It is very common to have VisualD projects alongside C/C++ projects.
Would it be possible to detect extern(C) functions, and make 'go to definition' go to the function definition in the C code instead of the D prototype?
For completeness, it would be nice to offer 'go to declaration' (ctrl-alt-F12) also in these cases, which would go to the prototype in the D code, just like jumping to the header in C.
Comment #1 by r.sagitario — 2014-12-20T11:02:23Z
I added "Goto Declaration" and made "Goto Definition" check the Object Browser for forward declared symbols. This allows jumping to C/C++ code aswell (but not those C files that are part of the D project, because they don't appear in the object browser).
See https://github.com/D-Programming-Language/visuald/releases/tag/v0.3.40-beta4
Comment #2 by r.sagitario — 2014-12-20T13:43:14Z
removing keyword "symdeb", this it not related to debug info.
Comment #3 by turkeyman — 2014-12-21T02:04:19Z
Very awesome!
I can confirm that it is working well. Thanks Rainer!