Skip to Main Content
Eclipse Cookbook
book

Eclipse Cookbook

by Steve Holzner
June 2004
Beginner to intermediate content levelBeginner to intermediate
364 pages
7h 38m
English
O'Reilly Media, Inc.
Content preview from Eclipse Cookbook

3.8. Inserting Method Parameter Names

Problem

You forgot the parameters of a method you want to call, and instead of receiving hints in tool tips (see the previous recipe), you want Eclipse to fill in the parameter names in your code for you.

Solution

Select Window Preferences Java Editor Code Assist, and check the “Fill argument names on method completion” and “Guess filled argument names” checkboxes.

Discussion

When you check these checkboxes, code assist automatically fills in names of the parameters passed to that method in your code. For example, say you’ve typed java.util.Arrays.fill, and you press Ctrl-Space to invoke code assist, then you select one of the methods code assist offers you. Code assist will insert names for each parameter into your code, and as you tab between them, it displays their type in a tool tip, as shown in Figure 3-11.

Auto-naming of parameters

Figure 3-11. Auto-naming of parameters

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

Eclipse

Eclipse

Steve Holzner
Official Eclipse 3.0 FAQs

Official Eclipse 3.0 FAQs

John Arthorne, Chris Laffra

Publisher Resources

Supplemental ContentCatalog PageErrata