Skip to Content
IntelliJ IDEA Essentials
book

IntelliJ IDEA Essentials

by Jaroslaw Krochmalski
December 2014
Intermediate to advanced
276 pages
5h 54m
English
Packt Publishing
Content preview from IntelliJ IDEA Essentials

Refactoring actions

There are many different refactoring actions available in IntelliJ IDEA. Let's cover the important ones first: Rename, Copy, Move, and Safe Delete.

Rename

This is probably the most commonly used refactoring. The target for the rename action can be any symbol in the source code: class, method, field, method parameter, or local variable.

To rename, just pick the target and press Shift + F6. This action will start the in-place prompt, as shown in the following screenshot:

Rename

If you use the Shift + F6 shortcut twice, the Rename dialog box will offer additional options such as searching within comments and text strings, as shown here:

IntelliJ ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning IntelliJ IDEA: Integrated Development Environment for Java Programming

Beginning IntelliJ IDEA: Integrated Development Environment for Java Programming

Ted Hagos
Optimizing Java

Optimizing Java

Benjamin J. Evans, James Gough, Chris Newland

Publisher Resources

ISBN: 9781784396930