Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactor: Renaming enumeration values

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
mspa Posted - Aug 21 2006 : 07:41:39 AM
MSVC 2003, C#, VAX 1532.

When I want to rename an enumeration value using refactoring, I expect that also each reference I use of this value is renamed. However those are not found and not renamed.

However a lot of other incorrect references are found. When I have an enumeration value 'Console' and want to rename it, each call to Console.WriteLine() is also found.
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 07 2007 : 12:38:30 AM
case=2188 is fixed in Build 1559
feline Posted - Sep 02 2006 : 12:25:24 PM
i tried the namespace, but it seems you cannot create a new namespace inside a class. it makes sense, but was not helpful.

the class in question has 9 enum's in it already, some of which want to have overlapping names. i may try wrapping them in stuctures / classes next time i have to edit them, at least i know that will compile
jpizzi Posted - Aug 29 2006 : 01:20:12 AM
An alternative to "individual namespaces" is a class/struct (yea, it is essentially the same).
feline Posted - Aug 26 2006 : 1:35:58 PM
speaking as a full time C++ programmer, "how can i tell what i am doing"?

over time the way C# handles its enum's is definitely growing on me, especially since i keep on getting name conflicts with my enum values. *considers* actually inspired by this i probably need to wrap each of my problem enum's in their own individual namespaces.

from a purely practical, helping VA to work point of view the problem is that the code that does the enhanced syntax colouring is quite limited, it has to be in order to run fast enough to do real time colouring. as a result duplicate names tend to confuse it, leading to strange and confusing colouring.

which is at odds with your very sensible enum names. sometimes the best answer is not all that obvious
mspa Posted - Aug 22 2006 : 03:17:32 AM
That's the reason I wanted to rename the enumeration value using refactoring

Actually I agree that the name of the enumeration value is not the best but on the other hand what is so against naming enumeration values the same as existing classes that have nothing to do with it.

To clearify, the enumeration is used to specify how output is shown to the user:

enum DisplayOption
{
   Console,
   Dialog,
   Both
}
feline Posted - Aug 21 2006 : 7:19:11 PM
i am seeing the same thing here

case=2188

i can understand why the parser is getting confused with this. did you inherit this code from someone else? it seems like a rather confusing name to have selected, even allowing for how you reference enum's in C#

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000