Organize imports in eclipse java

1.6k views Asked by At

enter image description here

I'm working on a JUnit project on eclipse , please help me to organize imports ,because im using checkList plugin. I tried source +organize imports also , I tried Control+Shift +o , but both of them did not work . can you help .

2

There are 2 answers

2
Shubham On

enter image description hereTo enable this, go to Windows -> Preferences -> Java -> Editor -> Save Actions and then enable Perform the selected action on save -> Organize imports. After this, whenever you save a java file, eclipse will remove the unused imports automatically. Little googling might help

1
Sandunka Mihiran On

To fix this issue:

Go to Preferences -> General -> Keys Click on Filters... and de-select Filter uncategorized commands then Ok.

Then look for the command Go To Symbol in File and select it. Then click on Unbind and then Apply and Close

Ctrl+Shift+O. should now work.

Note:

Also unbind any other conflicting commands and leave only one command for Ctrl+Shift+O and set the When to Editing Java Source.