Reporter | Alex Angas (arangas) |
---|---|
Created | Jan 6, 2012 3:57:02 AM |
Updated | Jan 6, 2012 3:57:02 AM |
Priority | Normal |
Type | Usability Problem |
Fix versions | No Fix versions |
State | Submitted |
Assignee | Sergey Shkredov (serjic.shkredov) |
Subsystem | Refactoring |
Affected versions | 6.1 |
Fixed in build | No Fixed in build |
In some cases types can have exactly the same name and need to be differentiated with aliases. An example is when mapping from a proxy type to the 'actual' type. Unfortunately ReSharper ignores existing aliases and adds its own using statements regardless.
For example, I have an alias defined with the following statement:
and refer to objects using the alias as follows:
If I now perform some refactoring that involves the ShoppingCart type, ReSharper will add exactly the same using statement again but without the alias. I then have to remove the using statement it has added, and clean up the refactored references to use the alias already defined. This is extremely frustrating.
Can ReSharper please make use of existing aliases?
For example, I have an alias defined with the following statement:
using Model = MyNamespace.MyEntities.Model;
and refer to objects using the alias as follows:
private List<Model.ShoppingCart> _cart;
If I now perform some refactoring that involves the ShoppingCart type, ReSharper will add exactly the same using statement again but without the alias. I then have to remove the using statement it has added, and clean up the refactored references to use the alias already defined. This is extremely frustrating.
Can ReSharper please make use of existing aliases?