10.02.2013 Views

SlickEdit User Guide

SlickEdit User Guide

SlickEdit User Guide

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Quick Refactoring<br />

QUICK REFACTORING<br />

Refactoring is a code editing technique used to “clean up” and improve the understandability of source<br />

code without affecting the code’s external behavior. Quick Refactoring is a feature set that provides several<br />

fast and easy-to-use refactoring methods:<br />

• Quick Rename – Rename a symbol under the cursor or any symbol selected in the Defs or<br />

Symbols tool windows.<br />

• Quick Extract Method – Create a new method using currently selected lines as the body and any<br />

undeclared variables as parameters.<br />

• Quick Modify Parameter List – Use to add, delete, and re-order parameters for a selected function.<br />

• Quick Replace Literal with Constant – Replace a selected literal with a constant.<br />

Quick Refactoring performs refactorings using Context Tagging® rather than a formal language parser.<br />

Quick Refactorings are supported for C++, C#, Java, and Slick-C®.<br />

Available Refactorings<br />

To access Quick Refactoring, from the main menu, click Tools > Quick Refactoring. Quick Refactoring<br />

menu can also be accessed from the right-click context menus in the Symbols and Defs tool windows.<br />

TIP Refactoring operations can modify more than one file. You can undo all of the refactoring<br />

modifications in one step by clicking Edit > Undo Refactoring.<br />

Quick Rename<br />

Quick Rename uses the Context Tagging® to rename a symbol under the cursor or any symbol selected in<br />

the Defs or Symbols tool windows. This operation works for all tagged languages. Quick Rename does not<br />

treat renaming classes, constructors, and destructors as a special case. Quick Rename will rename all of<br />

the overloads of a function. Quick Rename does not rename overridden methods (in parent and child<br />

classes).<br />

Quick Extract Method<br />

After selecting a set of lines, Quick Extract Method creates a new method with the selected lines as the<br />

body. It discovers any undeclared variables and creates them as parameters to the new method. The<br />

extracted method is created in the same scope as the original method.<br />

<strong>SlickEdit</strong>® <strong>User</strong> <strong>Guide</strong> 321

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!