What does "Insert General Prefixes Automatically" do in Eclipse?

I was looking for a way to improve autocomplete in Eclipse, and I found this preference for "embed common prefixes automatically" in the preferences window, under Java → Editor → Content Assist.

I wonder what he does, because I did not feel any difference. Help says:

If enabled, code help automatically inserts a common prefix for all possible terminations, similar to the Unix shell extension. This can be reused even if the code help window is displayed.

+7
source share
1 answer

It is used only in a relatively small number of cases.

Imagine you have an interface with methods

public interface Farm { public int getNumberOfDucks(); public int getNumberOfChickens(); public int getNumberOfGeese(); } 

then if you enable this option and enter

 farm.getN<control-space> 

it will be autocompleted until

 farm.getNumberOf 

before you see the menu. Without it, he will immediately show you the menu without filling in anything.

It works only for members, not classes.

+14
source

All Articles