tags:

views:

42

answers:

2

How do you supress renaming on code rush temporarily because each time I rename a local variable it has this green box on it and even changes my commented code (that uses the local variable I am using)

Example:

Consider this method:

public static tblBadorder GetBadOrderByBadOrderID(int badOrderID)
{

    tblBadorder User = db.Select.From<tblBadorder>().Where("BadOrderID").IsEqualTo(badOrderID).ExecuteSingle<tblBadorder>();
    return User;

}

If I accidentally hit rename on "tblBadorder" ( I hit CTRL + ` )

tblBadorder User = db.Select.From<tblBadorder>().Where("BadOrderID").IsEqualTo(badOrderID).ExecuteSingle<tblBadorder>();

I would click away from the variable type to prevent renaming, However If I want to change the User type to "tblOrders":

tblOrders User = db.Select.From<tblBadorder>().Where("BadOrderID").IsEqualTo(badOrderID).ExecuteSingle<tblBadorder>();

The rename binding and the green box wont disappear. Hence If I do this It would change the name of tblBadorder Class and other files that reference to it.

+1  A: 

Simply press Enter key to commit your changes.

Alex Skorkin
I don't want to commit changes, I want to suppress and disable the renaming.
geocine
+1  A: 

Isnt this a Doctor, it hurts when I do this issue?

How are you triggering the rename - is it possible to prevent that from happening? If you could explain that, it might lead to better answers.

This would be the best approach.

The nuclear option is to disable rename via: Editor \ Refactoring \ Catalog

The middle way is to find the binding (IDE|Shortcuts) that triggers it and disable that.

Ruben Bartelink
i will post an example above
geocine
@geocine: In that case (I still dont get the point and dont think anyone else does...), I submit the above as the best solution - either be careful with keystrokes, unbind the offending keystrokes from the undesired actions or disable the undesired actions. One other thing is that you might want to switch off the 'auto invoke when there's only one choice on the menu' setting in the options dont have CR to hand to locate it but I'm sure you'll find it)
Ruben Bartelink
Here's an option Ruben mentioned... Follow these steps to get to the Smart Tags options page:1. From the DevExpress menu, select "Options...".2. In the tree view on the left, navigate to this folder: Editor3. Select the "Smart Tags" options page.4. Select the "Show available provider on a menu" in the "When the smart tag key is pressed" section.
Alex Skorkin