Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Change comments name when rename variables

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
enigma Posted - Jun 06 2007 : 9:30:29 PM
Suggestions: When I choose to rename a certain variable for refactoring, VA should be able to rename the variable and the comments regarding that variable.

Example:
/// <summary>
///
/// </summary>
/// <param name="deleteCommand"></param>

protected void DeleteTableRecord(string deleteCommand)
{
OleDbCommand newcommand = new OleDbCommand(deleteCommand,myAccessConn, tran);
OleDbDataAdapter newadpath = new OleDbDataAdapter(deleteCommand, myAccessConn);
newadpath.DeleteCommand = newcommand;
newadpath.DeleteCommand.ExecuteNonQuery();
}


When I rename "deleteCommand" to "deleteCommand1", the xml comments "<param name="deleteCommand"></param>" must be changed to"<param name="deleteCommand1"></param>" as well
8   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 30 2007 : 4:11:41 PM
That's a mistake on the change list, our mistake.

There are no current plans to show comments in Find References, but Rename and Find References run off the same code, which is where the confusion came from.

The main concern is that adding comments to Find References Results is going to add a lot of "clutter" without actually helping most of the time.
rhummer Posted - Oct 30 2007 : 3:02:11 PM
The changelist for 1614 says Find References and Rename search comments, I'm only seeing Rename searching through comments. Is there a UI option or registry setting to allow this for Find References, or is one going to be added?
support Posted - Oct 29 2007 : 01:54:54 AM
case=3565 is implemented in Build 1614
feline Posted - Jun 08 2007 : 07:26:22 AM
I have put in a seperate feature request for C# XML comments, since they are a well defined "special case"

case=6989
enigma Posted - Jun 07 2007 : 9:10:41 PM
quote:
Originally posted by steinsomers

I second that, but my C++ code with Javadoc-style comments looks like this:
/**
 * Does something if deleteCommand is assertive enough
 * @param deleteCommand one of the list published over there
 */
void DeleteTableRecord(string deleteCommand)

Just one of the formats understood by doxygen. It seems quite a task for the VA team to get it right for everyone. But perhaps there is a standard documentation format for C# (if that is what your code is).


steinsomers,

There is a standard documentation format for c#, so that shouldn't be too difficult to implement my suggestion. Btw, the Vs 2005 does quite a good job in changing variable name in comments, so my suggestion is indeed doable.
enigma Posted - Jun 07 2007 : 9:07:30 PM
Feline,

I get your point. But perhaps you guys can imitate what vs 2005 is doing. At least in c# it checks the /// <param name="deleteCommand"></param> when one wants to make a naming change. This isn't something terribly difficult to implement, I suppose?

Forget about all those difficult intricacies such as parameter referencing thing, I will be perfectly happy if VA can do what vs 2005 can.
feline Posted - Jun 07 2007 : 11:35:04 AM
What happens with the code:

// Beware of people passing in a NULL pointer for deleteCommand
void DeleteTableRecord(string deleteCommand)


Any system that assumes well structured comments will run into all sorts of problems, since even C# XML comments may refer to the parameters by name in the free text part.

You also run into problems when people use "standard" words for parameter names. A human reading the comment can tell the meaning from the context, but that is rather harder for a computer.

Having said all of this we are considering some form of comment scanning:

case=3565

since this would obviously be very nice to have. I know I would like it.
steinsomers Posted - Jun 07 2007 : 08:40:47 AM
I second that, but my C++ code with Javadoc-style comments looks like this:
/**
 * Does something if deleteCommand is assertive enough
 * @param deleteCommand one of the list published over there
 */
void DeleteTableRecord(string deleteCommand)

Just one of the formats understood by doxygen. It seems quite a task for the VA team to get it right for everyone. But perhaps there is a standard documentation format for C# (if that is what your code is).

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