Aditya
Aditya

Reputation: 43

What is the shortcut key for generating the return data type for a statement written in Java in the Eclipse?

I was trying to apply the shortcut key to display the return data type for a statement written in Java in the Eclipse

Assume the below statement

driver.getTitle();

By applying some shortcut key I need to get the below result

String title = driver.getTitle();

Upvotes: 0

Views: 2933

Answers (2)

user10527814
user10527814

Reputation:

For Windows/Linux is ALT + SHIFT + L.

For Macos is ALT + CMD + L

Alternative

For Windows/Linux select the statement then press CTRL + 1. From the popup menu select "Assign statement to local variable".

Upvotes: 1

Nicholas K
Nicholas K

Reputation: 15443

This will do the trick :

Alt + Shift + L

To get more options for extraction use : Alt + Shift + T

Complete list of eclipse shortcuts can be found here.

Upvotes: 1

Related Questions