2

I was recently upgraded from Visual Studio 2017 / ReSharper 2017.1 to Visual Studio 2017 / ReSharper 2018.3 when the IT department recently had to re-image my work machine and installed updated versions of all the software I use. I've noticed a strange behavior with a feature that I use frequently.

public class Foo { }
public class Bar { }

public class Parent
{
    protected virtual void DoThing1() { }
    protected virtual void DoThing2() { }
    protected virtual void DoThing3(Func<Foo, Bar> callback)
    {
    }
}

public class Child : Parent
{
    public Child()
    {
        DoThing3( /* ReSharper Intellisense here ... */ );
    }

    override /* ReSharper Intellisense here... */
}

While working in classes with overridable members, such as in the Child class illustrated above, I usually type override and the Intellisense menu shows me a targeted suggestion list, prioritizing the overridable members for the type at the top of the list.

Here ReSharper suggests a targeted list of overridable members.

ReSharper suggests overridable Members while in Visual Studio Mode

After upgrading to ReSharper 2018.3, however, the Intellisense menu now shows me a general list containing any and everything it can think of, starting with a list of keywords.

Here ReSharper suggests everything. See the scrollbar on the side?

ReSharper suggests anything it can think of

I have found several ways to work around this problem, but they all break other features that I also use heavily.

Attempt 1

If I go to ReSharper > Options > Environment > IntelliSense > General and select the Visual Studio option, this issue is fixed. However, this breaks the way Intellisense suggests signatures for Lambda expressions.

Here ReSharper suggests some options for the Lamda Expression (ReSharper Intellisense).

ReSharper suggests a few options for fulfilling the Lambda Expression

Here ReSharper provides no options for the Lambda Expression (Visual Studio Intellisense).

ReSharper suggests general options, none specific to the Lambda Expression

Attempt 2

If I leave ReSharper Intellisense enabled (through the process described in Attempt 1) and instead go to ReSharper > Options > Environment > IntellSense > Completion Filters and select the Persist filters state option and select Exclude for Keywords under the C# sub tab, this also fixes the override keyword problem as well as the Lambda Expression problem, but introduces another issue... I now have no Intellisense for keywords lol.

Here, the Intellisense menu suggests no keywords, because they are disabled.

Who needs keywords anyway

Question

Does anybody know of a way to enable overridable Member suggestions, Lambda Expression suggestions, and keyword suggestions as described above within Visual Studio 2017 / ReSharper 2018.3?

Thick_propheT
  • 1,003
  • 2
  • 10
  • 29
  • 1
    I've noticed this problem. I don't know if it's a bug - or just JetBrains tweaking the way intellisense works. I've switched to skipping the 'override' keyword, and just start typing the name of the method I want to override ... it seems to pick it up then. But it's not exactly a fix.. – olitee Feb 05 '19 at 23:31
  • I often have the problem where I know there's a method I want to override, but forget its name, so I'll just type override to get things started. – Thick_propheT Feb 06 '19 at 15:29

2 Answers2

2

There's an ticket filed for this on JetBrains' issue tracker:

https://youtrack.jetbrains.com/issue/RSRP-469670

Maybe if they see that there are annoyed users then the fix comes sooner.

Szabolcs Dézsi
  • 8,743
  • 21
  • 29
0

What works for me is to first write override and then delete the last one or two letters and then ReSharper starts suggesting the overridable methods.

Kevin Bartik
  • 1
  • 1
  • 3