Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse java import organizing

in test classes I have the following import

import static org.junit.Assert.*;

when I do organize import via ctrl + shift + o then it automatically changes to 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 can I configure eclipse not to do it ? PS: I only want junit imports not be handled in that way

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

I added a save action to remove unused imports. [properties -> java editor -> save actions] so everytime I save unused imports are removed (since I used ctrl + shift + o mainly to remove unused imports this looks like a way forward..)

like image 530
Dev Blanked Avatar asked Dec 07 '22 04:12

Dev Blanked


1 Answers

Change the number of static imports to 1

enter image description here

like image 52
Ajinkya Avatar answered Dec 08 '22 16:12

Ajinkya