简体   繁体   中英

Organize imports in eclipse java

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 .

在此处输入图片说明 To 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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM