-
Notifications
You must be signed in to change notification settings - Fork 830
Add static members to the extended completion #3949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add static members to the extended completion #3949
Conversation
|
|
||
| let thisRequiresQualifierAccess = | ||
| if entity.IsFSharp && Symbol.hasAttribute<RequireQualifiedAccessAttribute> entity.Attributes then | ||
| if (entity.IsFSharp && Symbol.hasAttribute<RequireQualifiedAccessAttribute> entity.Attributes) || entity.IsClass then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should count value types and simple types that may have static members as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know :) The problem that static members should always be prefixed with the type (any type) name, but module values - if the module is RQA.
|
@vasily-kirichenko Do we need all members? I remember ReSharper adding such completion for properties/fields only and am OK with it this way. I don't think I'd call a method this way from completion. |
|
Fixed. @auduchinok why not? |
|
@vasily-kirichenko I'm a bit afraid of how many members there may be when lots of assemblies are referenced. Probably a good compromise would be to make it optional. |
|
We'll do some acceptance testing on projects with a bunch of assemblies before pulling this. I imagine perf would be proportional to how it is today (unless there are tons of solutions out there which use crazy amounts of static members compared with instance members, which I doubt is very common). |
|
It's ready. |
|
Why are we showing static members? Surely these should only show after you’ve dotted into the type that has the static members? |
|
@saul, it is the same idea of having the namespaces open when you put a type name from a namespace which is not in scope. Since F# has few places where static member needs the explicit prefix (in instance members of a same class) and in more general cases (like looking for an extension method which is not in scope), I think that feature is useful. |
|
@vasily-kirichenko thanks for that feature! is there a special handling for the extension methods already or can we consider adding it? Here is what Resharper does in C# code, here it shows extension methods that are not in scope. I tried the same in recently updated VS2017 and it doesn't have that, but maybe I need to install a nighlty? |
|
@smoothdeveloper extention members are not supported. To do it we need to collect all of them in a separate list in assembly content cache and mix into after-dot completion. |
|
@saul because ReSharper does this and it would be great to be on par with C# completion in Rider. Personally I cannot say if this feature is useful or not, will see. |
|
Ooookey, it's ready. |
KevinRansom
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is neat. Thank you
This reverts commit ae6f593.


This fixes #3948