Auto Tire Import Intellisense

There is a small feature in Resharper Intellisense that suggests items that have not been imported yet.

eg. if you type StreamReader

, Intellisense shows me the item StreamReader (in System.IO)

, and if I hit enter, it imports the namespace and everything is fine.

But it looks like this function only works for system types, not types that you wrote yourself.

consider the following example:

namespace Test
{
    internal class Program
    {
        internal static void Main()
        {

        }
    }
}

namespace Test.Util
{
    internal class Helper
    {
    }
}

      

Let's say you want to use your class Helper

in a method Main

. While you are writing Helper

, you will not get an entry in the intellisense dropdown menu like in the example StreamReader

. When you exit the intellisense dropdown, you will receive an import message Import 'Test.Util.Helper' and all other references in the file

where you can import all the missing links.

Is there a way to extend this auto import feature to show my self-styled classes in the intellisense dropdown or is this just something I will need to live with

+3


source to share


2 answers


Jetbrains support:



We fixed this issue in the ReSharper 9.1 branch and a fix will be available after ReSharper 9.1 is released. Unfortunately, we do not have an exact release date.

+1


source


You can always use import completion mode if for some reason normal completion does not prompt you to import items. It is called Ctrl + Alt + Space.



In your example, if you write "Hel" and call Ctrl + Alt + Space, the item will be automatically imported.

0


source







All Articles