Search code examples
eclipseeclipse-jdt

Is there a way to tell eclipse to organize import A, import A.X and import B in that order?


Please see the sample program below (just to illustrate the problem and the code as such does nothing):

import java.util.Map;
import java.util.Properties;
import java.util.Map.Entry;

public class Test {

    public static void main(String[] args) {

        Map map;

        Properties props;

        Entry entry = new Entry<String, String>() {

            @Override
            public String setValue(String value) {
                // TODO Auto-generated method stub
                return null;
            }

            @Override
            public String getValue() {
                // TODO Auto-generated method stub
                return null;
            }

            @Override
            public String getKey() {
                // TODO Auto-generated method stub
                return null;
            }
        };
    }
}

Eclipse organizes them as above and not as follows:

import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;

thanks.


Solution

  • I realized that it's a bug in solaris eclipse v 3.5.0. This doesn't seem to happen on eclipse helios on windows.