mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Tool-chain modification fixes
This commit is contained in:
parent
62a8f0c061
commit
a25388f72b
5 changed files with 53 additions and 1 deletions
|
@ -18,6 +18,7 @@ import java.net.URL;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
|
@ -3978,6 +3979,10 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI
|
|||
list.add(p);
|
||||
p.setIdenticalList(list);
|
||||
}
|
||||
|
||||
for(Iterator iter = map.values().iterator(); iter.hasNext();){
|
||||
Collections.sort((List)iter.next());
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
|
|
|
@ -2416,5 +2416,20 @@ public class Builder extends BuildObject implements IBuilder, IMatchKeyProvider
|
|||
else
|
||||
outputEntries = null;
|
||||
}
|
||||
|
||||
private int getSuperClassNum(){
|
||||
int num = 0;
|
||||
for(IBuilder superTool = getSuperClass(); superTool != null; superTool = superTool.getSuperClass()){
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public int compareTo(Object o) {
|
||||
Builder other = (Builder)o;
|
||||
if(other.isSystemObject() != isSystemObject())
|
||||
return isSystemObject() ? 1 : -1;
|
||||
|
||||
return getSuperClassNum() - other.getSuperClassNum();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ package org.eclipse.cdt.managedbuilder.internal.core;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
public interface IMatchKeyProvider {
|
||||
public interface IMatchKeyProvider extends Comparable {
|
||||
Object getMatchKey();
|
||||
|
||||
void setIdenticalList(List list);
|
||||
|
|
|
@ -4082,4 +4082,20 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private int getSuperClassNum(){
|
||||
int num = 0;
|
||||
for(ITool superTool = getSuperClass(); superTool != null; superTool = superTool.getSuperClass()){
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public int compareTo(Object o) {
|
||||
Tool other = (Tool)o;
|
||||
if(other.isSystemObject() != isSystemObject())
|
||||
return isSystemObject() ? 1 : -1;
|
||||
|
||||
return getSuperClassNum() - other.getSuperClassNum();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2657,4 +2657,20 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private int getSuperClassNum(){
|
||||
int num = 0;
|
||||
for(IToolChain superTool = getSuperClass(); superTool != null; superTool = superTool.getSuperClass()){
|
||||
num++;
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
public int compareTo(Object o) {
|
||||
ToolChain other = (ToolChain)o;
|
||||
if(other.isSystemObject() != isSystemObject())
|
||||
return isSystemObject() ? 1 : -1;
|
||||
|
||||
return getSuperClassNum() - other.getSuperClassNum();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue