| Author | 
                
                  Topic   | 
                  | 
              
              
                | 
                 mbobka 
                Ketchup Master 
                     
                 
                
                Russia 
                86 Posts  | 
                
                  
                    
                      
                       Posted - Jun 29 2006 :  04:00:12 AM
                        
                        
                      
  | 
                     
                    
                       
class ABC {
public:
	void FunctionA( int aaa );
};
void ABC::FunctionA( int aaa ) {
	int ccc = 10;
	aaa = ccc;
}
  If I try to change signature of FunctionA, to "void FunctionA( char bbb, int aaa )", then:
 
 
class ABC {
public:
	void FunctionA( char bbb, int aaa );
};
void ABC::FunctionA(  char bbb, int bbb  ) 
{
	int ccc = 10;
	bbb = ccc;
}
  As you see all "aaa" will be changed to "bbb" in the implementation, but the signature in the class declaration is valid. Ctrl-Z (Undo) returns all bbb to aaa, and makes code valid.
  Also, you can see mysterious second space inserted before "char bbb" in implementation. | 
                     
                   
                 | 
              
              
                | 
                 support 
                Whole Tomato Software 
                      
                 
                
                5566 Posts  | 
                
                  
                    
                      
                       Posted - Jun 29 2006 :  11:54:24 AM
                        
                        
                      
  | 
                     
                    
                       VA X thinks you are renaming aaa to bbb and changing its type, then adding a new parameter called aaa. VA X should be smart enough to realize you are only inserting a parameter. 
  VA X appears to work correctly if you inserts parameters *after* existing parameters.
  We'll make VA X smarter so it detects an insert prior to an existing parameter, or we'll prevent the complex refactoring and force you to do it in multiple steps.
  case=1513
  Workaround is to refactor in two steps: 1) Change signature and insert all new parameters *after* existing parameters. 2) Change signature to reorder parameters.
 
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 khb 
                Tomato Guru 
                      
                 
                
                Germany 
                337 Posts  | 
                
                  
                    
                      
                       Posted - Jun 30 2006 :  08:51:33 AM
                        
                        
                      
  | 
                     
                    
                       I also have some thoughts regarding Change Signature. After adding a function parameter on the rightmost side of the signature, a message box appears that claims: "Removal and/or reordering of parameters detected...". Well, I just added a parameter, so the message is a bit misleading. Moreover, when adding a parameter with a default value on the rightmost side of the signature, no message box needs to be displayed as everything should work like before.
  Regards, Marcus. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 support 
                Whole Tomato Software 
                      
                 
                
                5566 Posts  | 
                
                  
                    
                      
                       Posted - Jun 30 2006 :  6:00:15 PM
                        
                        
                      
  | 
                     
                    
                       Suggestion to eliminate warning when adding a parameter with a default value in C# and C++ is...
  case=1528
  Problem of misleading warning is...
  case=1529 | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 support 
                Whole Tomato Software 
                      
                 
                
                5566 Posts  | 
                
                  
                    
                      
                       Posted - Jul 05 2006 :  2:18:31 PM
                        
                        
                      
  | 
                     
                    
                       Fix for case 1513 is in build 1528.
  Change Signature does not mangle existing parameters when inserting new ones. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 support 
                Whole Tomato Software 
                      
                 
                
                5566 Posts  | 
                
                  
                    
                      
                       Posted - Aug 12 2006 :  11:23:15 PM
                        
                        
                      
  | 
                     
                    
                      |  Case 1529 is fixed in build 1532. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 TheRawGod 
                Junior Member 
                   
                 
                
                11 Posts  | 
                
                  
                    
                      
                       Posted - Aug 18 2006 :  09:14:26 AM
                        
                        
                      
  | 
                     
                    
                       And what about those spaces inserted after opening and before closing braces when changing signature / creating implementation?
 
 
class A
{
  int MemberA(int b);
};
  after creating implementation it would look like:
 
 
int A::MemberA( int b )
{
  
}
  Are those spaces a desired behaviour? Maybe it's worth allowing user to specify somehow on settings pages whether to insert them and how many?:)
  Mentioned refactoring features are really handy but the fact that I have to remove those spaces is very annoying as usually deleting spaces requires about the same time I would spend doing copy/pasting in case of creating implementation that makes the latter refactoring functionality almost useless:(
  WinXP SP2, MSVS2005, VAX 1532. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 rhummer 
                Tomato Guru 
                      
                 
                
                USA 
                527 Posts  | 
                
                  
                    
                      
                       Posted - Aug 18 2006 :  09:23:50 AM
                        
                        
                      
  | 
                     
                    
                      |  TheRawGod:  You can customize the formating of Create Implementation in the autotext entry called "Refactor Create Implementation" | 
                     
                    
                        Tools Engineer - Raven Software VS2005 SP2/VS2008 SP1 - VAX <LATEST> - Win 7 x64
  | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 TheRawGod 
                Junior Member 
                   
                 
                
                11 Posts  | 
                
                  
                    
                      
                       Posted - Aug 18 2006 :  09:30:16 AM
                        
                        
                      
  | 
                     
                    
                       Ah, sorry for stupid question:(
  Just tried and that worked fine. Thanks. | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                | 
                 sean 
                Whole Tomato Software 
                      
                 
                
                USA 
                2817 Posts  | 
                
                  
                    
                      
                       Posted - Nov 18 2013 :  3:15:08 PM
                        
                        
                      
  | 
                     
                    
                       Change Signature was overhauled in build 2007. case=1528 is fixed in build 2007 | 
                     
                    
                        | 
                     
                   
                 | 
              
              
                |   | 
                
                  Topic   | 
                  |