JavaPerspective.com > Intermediate Tutorials > 1. The Eclipse IDE > 1.3. Tips about Eclipse > 1.3.1. How to use autocomplete
1.3.1. How to use autocomplete
Last updated: 25 January 2013.
In Eclipse, you can get autocomplete proposals by typing Ctrl+Space. For example, if you type the letter A and Ctrl+Space, you will get a list of items starting with A to choose from, including all the items from the Java API. You can get autocomplete proposals for variables, methods, classes, interfaces and so forth. Particularly, the autocomplete feature of Eclipse can do the necessary imports for you. For example, if you type buffered and Ctrl+Space, you can choose the class BufferedWriter in the proposals by clicking it or by hitting Enter. Then the appropriate import will be done for you as well. The picture below shows the list of proposals:
Here is what you get when you choose the class BufferedWriter:
As you can see, the import has been done as well (java.io.BufferedWriter). You can also get proposals for a variable name. For example, if you type a space character after BufferedWriter and then type Ctrl+Space, here is what you get:
Hit Enter to select a proposal. Finally, if you type Ctrl+Space after the keyword new as shown below, you will get a list of constructors to choose from: