Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Refactoring: Extract method

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 07 2006 : 07:40:14 AM
When using the 'Extract method' feature, the 'ref' and 'out' keywords are wrongly positioned. Instead of before the identifier it is positioned after it.

Expected:
void MyMethod( ref object obj, out int x )

Actual result:
void MyMethod( object ref obj, int out x )

The actual result does not compile and I need to manual switch it.
6   L A T E S T    R E P L I E S    (Newest First)
support Posted - Aug 12 2006 : 11:21:58 PM
Case 2014 is fixed in build 1532.
feline Posted - Aug 09 2006 : 9:03:48 PM
i am seeing the same thing in VS2003. i think the formatting upset is partly a result of the IDE's formatting ability being upset by "ref" being in the wrong place.

case=2014
mspa Posted - Aug 09 2006 : 03:25:21 AM
I found out the reason why the keyword 'void' was truncated to 'oid' and it is reproducable.

I started with the following exact code

namespace VAX_Test
{
   class Class1
   {
      static void Main(string[] args)
      {
         String myString;
         String myCloneString = myString.Trim();
      }
   }
}

Where each bracket is directly followed each other on the next lines. When you put one extra linefeed between the brackets the keyword 'void' is not truncated

namespace VAX_Test
{
   class Class1
   {
      static void Main(string[] args)
      {
         String myString;
         String myCloneString = myString.Trim();
      }
           // <-- notice the extra linefeed
   }
}
mspa Posted - Aug 09 2006 : 03:18:29 AM
I was using VAX 1524 and indeed C# as the language. I have upgraded to VAX 1531 but still have the same problem.

How to reproduce:

Start with something like

   String myString;
   String myCloneString = myString.Trim();


Select the bottom line and extract a method, the result is as followed

oid MyCloneMethod(String ref myString)
{
String myCloneString = myString.Trim();
}
	}
}


As seen some begin characters have disappeared and the 'ref' keyword is positioned at the wrong position (should be before 'String'), also the layout if messed up.
feline Posted - Aug 08 2006 : 6:11:14 PM
what language and IDE are you using? i am guessing some form of C#

do you have a short example piece of code you can post to illustrate this effect?

if you are using 1530 you may want to upgrade to 1531, it contains a lot of bug fixes for refactoring.
mspa Posted - Aug 07 2006 : 07:57:23 AM
Additional information:

Also the code generated calling the extracted method does not include the 'ref' and 'out' keywords.

Expected:
MyMethod( ref MyObject, out MyInteger )

Actual result:
MyMethod( MyObject, MyInteger )

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