Bug 11942 – Parameter list helper doesn't appear(/exist?)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
visuald
Product
D
Version
D2
Platform
All
OS
Windows
Creation time
2014-01-17T17:29:21Z
Last change time
2018-05-06T19:01:12Z
Assigned to
No Owner
Creator
Manu
Comments
Comment #0 by turkeyman — 2014-01-17T17:29:21Z
In Visual Studio, go into a .c/.cpp file:
Place the cursor within the parameter list of any function call and press Ctrl+Shift-Space; notice that a helper appears detailing the expected parameters.
Do this in the parameter list for a function that has multiple parameters; notice that the parameter the cursor is currently positioned upon is highlighted in BOLD. Move the cursor left/right using the arrow keys, and watch the bold highlight follow the cursor.
Do this in a parameter list for a function with overloads; notice that the helper now says "1 of N", and allows you to cycle through the overloads using the up/down arrow keys.
Begin typing a new call to a function; notice that the helper appears when typing the opening '('.
Begin instantiating a template; notice that the helper appears also for template argument lists when typing the opening '<'.
VisualD doesn't seem to offer this very important helper.
It would be nice if D had the same parameter list helper as C/C++.
Comment #1 by r.sagitario — 2014-03-02T08:35:32Z
This feature is available in Visual D, but it builds on generated JSON information. That means, it does not know about the current context, so can be very wrong for commonly used function names. An additon, a successful build is necessary to display anything. (Use "Build Phobos browse information" for phobos/druntime parameter infos.)
As the JSON output has lost it usefulness for this functionality, I guess I'll have to look into getting this information from the semantic analyzer.
I just gave it a whirl. Big improvement - regular functions are working properly now. But there are some things still not working:
Constructors don't seem to list args?
auto doc = new Document(new Tag("settings"));
auto devs = new Element("devices");
testMat = Material("diffuse_uncompressed_gimp.dds");
None of these new statements offer any parameter info.
to! doesn't work:
to!string(videoDriver)
This shows the helper for 'string's constructor, not 'to'.
Cheers for all your work! It's getting better all the time! :)
Comment #4 by r.sagitario — 2014-04-12T10:11:44Z
Function templates are now supported in 0.3.38, but not constructors.