






Hotspots: Admin Pages | Turn-in Site |
Current Links: Case Final Project Summer 2007
Ways to Speed Up Your Coding in VisualWorks
REFACTOR YOUR CODE IN A COUPLE OF SECONDS
Instead of rewriting the piece of code or even copy and pasting, here's a simpler way I discovered while coding in VisualWorkds IDE
First start up your browswer from the main console screen by choosing Browse menu:
Browse>>System
amd then left-clicking the mouse. You can also hit F5 on your keyboard after the console is higlighted.(see below)

start.bmp
Then highlight the piece of code you want to REFACTOR. If there are local variables, make sure you highlight the declarations.
Instance variables are acknowledged automatically. So you can highlight instance variables and still proceed with refactoring.
Then right click the mouse and go up to Refactor and then click "Extract Method" (see below)

refactor.bmp
then type in the selector (message) you want this piece of code to be under(shown below).

selectMethod.bmp
then click "OK" button. You are done.

replaced.bmp
Check to make sure the new message (method) has been created.
and then check to make sure that the message is called from the code where the original code was extracted (as shown below)

end.bmp
DO NOT try to refactor code into already existing message. It seems to overwrite the previous message, posing a grave risk of loss of code.
Links to this Page
- Case last edited on 29 July 2009 at 11:50 pm by c-76-97-208-233.hsd1.ga.comcast.net
- Index of Individual Cases last edited on 28 July 2009 at 3:01 pm by lwc029.ats.gatech.edu