R#2.0: Uppercase-Problem when renaming lowercase members
Hello,
I have reported this bug back in build 231. It's priority has been set
to "high" but it hasn't been completely fixed yet - see tracker number
21566.
When I rename something with shift-f6, the dialog always recommends the
first letter of the new name to be upper case. That's quite annoying
when renaming things that should be lower case because I always have to
move the cursor to the beginning of the line and change it back to lower
case before I can do the real renaming.
The problem exists with pretty much everything.. methods, properties,
delegates, events, class names and even NAnt properties. It has only
been fixed for fields already!
Couldn't the renaming-dialog just recommend the current name of the
member instead of making *any* incorrect guesses? That would be the
easiest and best thing to do, I guess!
Here are a few examples of what ReSharper recommends when you use
shift-f6 on a member:
class MyClass {
private void aaa() {} // it recommends "Aaa"
protected int bbb { get { return 0; } } // "Bbb"
private delegate void ccc(); // "Ccc"
private event ccc ddd; // "Ddd"
}
class eee {} // "Eee"
]]>
Would be great if someone would look into this and fix it. It makes me
think the "f" word every time I rename something!
thanks,
Max
Please sign in to leave a comment.
C
standards are that all class names, method names, and property names
start with a capital letter, so ReShaper is absolutely correct in doing what
it's doing.
"Markus Stoeger" <spamhole@gmx.at> wrote in message
news:e5i138$trl$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
Paul Bradshaw wrote:
Not where I work. Private stuff gets "camelCased" (except of private
nested classes). Anyway, it shouldn't mind the style, or at least make
it configurable.
Max
Imho it is still bad practice to throw away a whole set of guidelines and
create your own private guidelines. You should buy the person responsible
for creating these guidelines and conventions the book "Framework Design
Guidelines".
I personally prefer that ReSharper does not aid developers in continuing
their bad practices.
--
Gabriel Lozano-Morán
The .NET Aficionado
http://www.pointerx.net
"Markus Stoeger" <spamhole@gmx.at> wrote in message
news:e5iiv9$j74$1@is.intellij.net...
>> C# standards are that all class names, method names, and property names
>> start with a capital letter
>
>
I totally agree.
"Gabriel Lozano-Morán" <jb-newsgroups@pointerx.net> wrote in message
news:e69tog$kbq$1@is.intellij.net...
>
>
>
>
>> Paul Bradshaw wrote:
>>> C# standards are that all class names, method names, and property names
>>> start with a capital letter
>>
>> Not where I work. Private stuff gets "camelCased" (except of private
>> nested classes). Anyway, it shouldn't mind the style, or at least make it
>> configurable.
>>
>> Max
>
Gabriel Lozano-Morán wrote:
Hi Gabriel,
I did some googling and must admit that it really looks like that all
methods should be PascalCased , even if they are private. mmkay..
looks like we missed something ;o)
Actually we don't have a single person responsible for creating such
guidelines. We find that it's best for the developers to let them code
how they are used to (unless they have really weird coding styles ;-)..
e.g. let them decide if they put their opening braces on the same or
next line and such. That actually really doesn't matter at all and is
only personal preference. I wouldn't want to sit in a pink room either
just because someone else thinks the color looks better.
Yet we have a very common coding style within the team anyway (the most
non standard thing I found are those darn private methods). What's
interesting is, is that everyone on the team seems to have slipped into
using camelCase for private methods.. me too, I also took it for granted
since we started with C# a few years ago....
Though I still think that there should be a setting in R# where this
behaviour could be configured (or simply switched off) as there are like
100 other settings concerning coding styles too. You can even configure
if you want "a.b.foo()" or "a . b . foo()".. I'd definitely assign
that to the weird coding style category ;o)
Also R# applies that upper-casing to property and target names in NAnt
scripts.. thats certainly not standard and just looks silly.
Max.. having refactored NAnt scripts the whole day today and probably
spending the next few days renaming C# private methods.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconnamingguidelines.asp