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:
parent
bb1c0a023f
commit
d78e6aeffb
1 changed files with 108 additions and 98 deletions
|
@ -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){
|
||||
|
|
Loading…
Add table
Reference in a new issue