using alias in imports

Is it possible to have ReSharper insert a type reference using the alias
instead of importing the entire target namespace?

For instance, when completing a class name using the "Smart Type" code
completion I would like to have the following happen:

Before:

...
MyN]]>

After:

using MyNewClass = n1.n2.n3.MyNewClass;
...

MyNewClass


Currently it does this:

using n1.n2.n3;
...

MyNewClass


Kind regards
Thomas Koch



1 comment
Comment actions Permalink

We probably will introduce such option in the future. We had a few requests to add it.

--
Valentin Kipiatkov
Chief Scientist, Vice President of Product Development
JetBrains, Inc
http://www.jetbrains.com "Develop with pleasure!"


Is it possible to have ReSharper insert a type reference using the
alias instead of importing the entire target namespace?

For instance, when completing a class name using the "Smart Type" code
completion I would like to have the following happen:

Before:

....
MyN<smart type>
After:

using MyNewClass = n1.n2.n3.MyNewClass;
....
MyNewClass

Currently it does this:

using n1.n2.n3;
....
MyNewClass

Kind regards
Thomas Koch


0

Please sign in to leave a comment.