R#5.1 IntelliSense Filter members by [EditorBrowsable] attribute and overloads
I'm using the setting in Options | IntelliSense | Completion Appearance to Filter members by [EditorBrowsable] attribute.
If I start typing this code:
var command = new SqlCommand();
command.Parameters.
I expect to see the Add method appear. But it doesn't.
If I use Visual Studio's IntelliSense by suspending ReSharper and in Options | Text Editor | All Languages | General enabling Auto list members and Hide advanced members, I do get the Add method.
I suppose the reason is that there are 6 overloads of SqlParameterCollection.Add of which two have their EditorBrowsable attribute set to EditorBrowsable.Never. Using Visual Studio's IntelliSense I do see the Add method, and it shows me four overloads. Using ReSharper's IntelliSense, it doesn't show me the Add method at all.
This occurs in both ReSharper 5.1.1 and 5.1.2.
Can you reproduce this behavior and if so, can you confirm it is not supposed to work like this?
Please sign in to leave a comment.
A quick check with a self created class in which one overload has the EditorBrowsable.Never attribute shows R# does not remove all overloads of the method from Intellisense like I suggested in my original post. In fact, it shows all overloads, including the one it shouldn't show!
I have a Class Library project with a ClassWithHiddenMembers class in it:
In a test application, I use
The ReSharper IntelliSense shows methods NoOverloadHidden and OneOverloadHidden, both with two overloads.
After selecting method OneOverloadHidden, it shows both overloads, including the hidden one.
Visual Studio IntelliSense shows methods NoOverloadHidden and OneOverloadHidden, both with one extra overload.
After selecting method OneOverloadHidden however, it only shows the not hidden overload.
This also seems like a bug. Maybe I should have posted this in a separate thread, but I tried this out because of my problem in this thread's first post, so I'll just keep it here.
Hi
if you open Resharper -> Options you will find Environment ->IntelliSense -> Completion Appearance where there is the last option named "Filter membery by [EditorBrowsable] attribute" which is deactivated by default.
Perhaps this is what you are looking for?
Best regards,
Sven
Hello Dick,
This sure seems to be a bug, so I've added a bug report at http://youtrack.jetbrains.net/issue/RSRP-206067
and you can monitor its status. Thank you!
Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"