# Organizing existing import statements

The Java editor can help you improve the existing import statements inside a compilation unit.

1. Do one of the following while editing your Java code:
   - Select Source > Organize Imports from the pop-up menu in the editor
   - Select Source > Organize Imports from the menu bar
   - Press Ctrl+Shift+O
2. The Java editor generates a complete list of import statements, as specified by the import order preference, and new import statements replace the old ones.

Note: Source > Organize Imports also works on whole packages or projects - just select them in the Package Explorer.

Java editor

Adding required import statements
Managing import statements
Setting the order of import statements
Showing a type's compilation unit in the Package Explorer view

Source menu