1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

bug 367253: Source folders are reshuffled when build settings are

edited.
This commit is contained in:
Andrew Gvozdev 2011-12-28 00:20:15 -05:00
parent bb1c0a023f
commit d78e6aeffb

View file

@ -14,6 +14,7 @@ import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
@ -850,7 +851,16 @@ public class CDataUtil {
} else {
resultList = makeRelative(project, resultList);
}
return resultList.toArray(new ICSourceEntry[resultList.size()]);
ICSourceEntry[] resultArray = resultList.toArray(new ICSourceEntry[resultList.size()]);
Arrays.sort(resultArray, new Comparator<ICSourceEntry>() {
@Override
public int compare(ICSourceEntry o1, ICSourceEntry o2) {
return o1.getFullPath().toString().compareTo(o2.getFullPath().toString());
}
});
return resultArray;
}
private static List<ICSourceEntry> makeRelative(IProject project, List<ICSourceEntry> list){