Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Extract Method improvment

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
TomJons Posted - Nov 05 2018 : 10:36:28 AM
Hi,

Consider adding some features in Extract Method context:
- now I can only manipulate on method name and its destination (in class, outside,... )

1)I can't change shown method signature (types, names of parameters, nothing)
2)I can't see full extracted method body - maybe VA Team can provide another window below of "preview of method signature" called "preview of method body" - of course editable?


Why it will be useful?
- user can see what it will generate
- user can replace unrecognized types with valid types (example: value xxx is used in extracted area, but it was declared as auto, in extract method it is visible as type _Ty instead of valid type name)
- user can adjust code before extracting

Kind regards,
Tom
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Nov 06 2018 : 07:36:42 AM
We are considering adding a preview of the extracted code to the extract method dialog:

case=78447

For auto variables having an unknown type, if or when you next run into this problem in your main solution, can you please try placing the caret into the auto variable where it is being used, and then look at VA's Context and Navigation fields, which are normally shown at the top of the editor window, and are where the alt-m list appears from. VA should be showing the type of the variable here, which it has worked out.

Can you also try pressing Alt-Shift-G for the Goto Related menu, on the variable, and see if VA correctly understands this variable and its type? If VA is confused by the auto variable type, then this will show up in Extract Method, but this should be a simpler method of checking if VA understands the type of the auto variable or not.
TomJons Posted - Nov 06 2018 : 03:24:55 AM
Unfortunately I can not reproduce this behavior on the small piece of code.

For the code preview I think it will be useful to see how it will look like. User can check if everything is on place.

Of course user can check it after extracting but it requires jumping on code.

Thx for your answer
feline Posted - Nov 05 2018 : 2:39:25 PM
We are considering adding the ability to edit the signature of the code, when doing an extract method:

case=3462

For the code that is going to be extracted, you know what this code is because you had to manually select it before triggering Extract Method. What sort of adjustments are you thinking of making before the code is extracted?

For the auto variable not having a known / correct type, do you have a situation where you can trigger this on demand? If VA can work out the type of the auto variable then the correct type should be used when VA extracts the code. It sounds like VA is not able to work out the type of the auto variable in your code, and I am wondering why.

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