Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-287618: Existing namespace aliases are ignored when refactoring and duplicate using statements are added

$
0
0
Reporter Alex Angas (arangas) 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:
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?

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>