Import organization eclipse java

in test classes i have the following import

import static org.junit.Assert.*;

when I arrange import via ctrl + shift + o, it automatically changes to the following

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;

How to configure eclipse for this? PS: I want junit imports not to be processed this way.

==============

I added a save action to remove unused imports. [properties → java editor → save actions] so every time I save unused imports, they are deleted (since I used ctrl + shift + o mainly to delete unused imports, it looks like a way forward.)

+4
source share
2 answers

Change the number of static imports to 1

enter image description here

+8
source

"", "", " Java", " ", " " " , . *" - 1. ( "" .)

, , Ctrl-Shift-O , , . - , .

- , - , Ctrl-Shift-M .

+7

All Articles