• Menu
  • Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

JavaBeat

Java Tutorial Blog

  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us
  • Java
    • Java 7
    • Java 8
    • Java EE
    • Servlets
  • Spring Framework
    • Spring Tutorials
    • Spring 4 Tutorials
    • Spring Boot
  • JSF Tutorials
  • Most Popular
    • Binary Search Tree Traversal
    • Spring Batch Tutorial
    • AngularJS + Spring MVC
    • Spring Data JPA Tutorial
    • Packaging and Deploying Node.js
  • About Us

Eclipse Tips : Rename Variable (ALT + SHIFT + R)

April 17, 2014 //  by Krishna Srinivasan

Eclipse provides cool short cut key for renaming the variables across within a class or entire workspace. If you are not aware of this feature, you would use “find” option and replace the variable with new name. But, this will lead to a problem of not renaming all the references. You can easily rename the variables by typing the short cut ALT + SHIFT + R in your Eclipse. There are two ways to to this:

  1. Move the curson over variable name and type CTRL + 1 for quick fix which would suggest the option to change the variable in a file or workspace. You just select the desired one to start rename the variable.
  2. Second option is to directly type ALT + SHIFT + R to rename the variable.

Look at the below screenshots which clearly describes how to do the renaming.

1. Short Cut Key : CTRL + 1

When you type the short cut key CTRL + 1, it will display the suggestion box like this one below.

Eclipse Rename Variable using CTRL + 1
Eclipse Rename Variable using CTRL + 1

2. Short Cut Key : ALT + SHIFT + R

When you type the short cut key ALT + SHIFT + R, it will change the editor like shown below to allow the editing variable names.

Eclipse Rename Variable using ALT + SHIFT + R
Eclipse Rename Variable using ALT + SHIFT + R

Category: EclipseTag: Eclipse Tips

About Krishna Srinivasan

He is Founder and Chief Editor of JavaBeat. He has more than 8+ years of experience on developing Web applications. He writes about Spring, DOJO, JSF, Hibernate and many other emerging technologies in this blog.

Previous Post: « Eclipse Tips : How To Create Custom Code Template In Eclipse
Next Post: How To Get Image Format Using Java »

Primary Sidebar

Follow Us

  • Facebook
  • Pinterest

FEATURED TUTORIALS

How to Initialize an Array in Java

Introduction to Java Server Faces (JSF)

Introduction to Java 6.0 New Features, Part–1

Java 6.0 Features Part – 2 : Pluggable Annotation Processing API

Introduction to Java Server Faces(JSF) HTML Tags

JavaBeat

Copyright © by JavaBeat · All rights reserved
Privacy Policy | Contact