Header javaperspective.com
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:

picture showing the eclipse IDE 15


Here is what you get when you choose the class BufferedWriter:

picture showing the eclipse IDE 16


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:

picture showing the eclipse IDE 17


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:

picture showing the eclipse IDE 18


You are here :  JavaPerspective.com  >   Intermediate Tutorials  >   1. The Eclipse IDE  >   1.3. Tips about Eclipse  >   1.3.1. How to use autocomplete
Next tutorial :  JavaPerspective.com  >   Intermediate Tutorials  >   1. The Eclipse IDE  >   1.3. Tips about Eclipse  >   1.3.2. How to generate getters and setters

Copyright © 2013 - 2016. JavaPerspective.com. All rights reserved.  ( Terms | Contact | About ) 
Java is a trademark of Oracle Corporation
Image 1 Image 2 Image 3 Image 4 Image 5 Image 6 Image 7