1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-01 13:25:45 +02:00

bug 319512: Missing type arguments on managedbuilder.core

This commit is contained in:
Andrew Gvozdev 2010-10-02 01:56:52 +00:00
parent 101ee80547
commit 519a818008

View file

@ -56,12 +56,12 @@ public abstract class ToolListModification implements IToolListModification {
private LinkedHashMap<Tool, IToolModification> fProjCompInfoMap = new LinkedHashMap<Tool, IToolModification>(); private LinkedHashMap<Tool, IToolModification> fProjCompInfoMap = new LinkedHashMap<Tool, IToolModification>();
private HashMap<Tool, IToolModification> fSysCompInfoMap = new HashMap<Tool, IToolModification>(); private HashMap<Tool, IToolModification> fSysCompInfoMap = new HashMap<Tool, IToolModification>();
private Tool[] fAllSysTools; private Tool[] fAllSysTools;
private HashSet fFilteredOutSysTools; private HashSet<ITool> fFilteredOutSysTools;
// private LinkedHashMap fRealToToolMap = new LinkedHashMap(); // private LinkedHashMap fRealToToolMap = new LinkedHashMap();
// private boolean fSysInfoMapInited; // private boolean fSysInfoMapInited;
private PerTypeMapStorage fCompleteObjectStorage; private PerTypeMapStorage fCompleteObjectStorage;
protected TreeMap fCompletePathMapStorage; protected TreeMap fCompletePathMapStorage;
private HashSet fAddCapableTools; private HashSet<Tool> fAddCapableTools;
private Map fFilteredOutTools; private Map fFilteredOutTools;
private ToolListModificationInfo fModificationInfo; private ToolListModificationInfo fModificationInfo;
@ -122,8 +122,8 @@ public abstract class ToolListModification implements IToolListModification {
public class ProjToolCompatibilityStatusInfo implements IToolModification { public class ProjToolCompatibilityStatusInfo implements IToolModification {
private ToolCompatibilityInfoElement fCurrentElement; private ToolCompatibilityInfoElement fCurrentElement;
private Map fCompatibleTools; private Map<Tool, ToolCompatibilityInfoElement> fCompatibleTools;
private Map fInCompatibleTools; private Map<Tool, ToolCompatibilityInfoElement> fInCompatibleTools;
private IModificationOperation[] fOperations; private IModificationOperation[] fOperations;
private Tool fSelectedTool; private Tool fSelectedTool;
private Tool fRealTool; private Tool fRealTool;
@ -152,7 +152,7 @@ public abstract class ToolListModification implements IToolListModification {
return true; return true;
} }
public Map getCompatibleTools(){ public Map<Tool, ToolCompatibilityInfoElement> getCompatibleTools(){
checkInitCompatibleTools(); checkInitCompatibleTools();
return fCompatibleTools; return fCompatibleTools;
} }
@ -176,8 +176,8 @@ public abstract class ToolListModification implements IToolListModification {
ConflictMatchSet conflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOL, storage); ConflictMatchSet conflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOL, storage);
fCompatibleTools = new HashMap(); fCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
fInCompatibleTools = new HashMap(); fInCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
Tool sysTools[] = getTools(false, true); Tool sysTools[] = getTools(false, true);
Map conflictMap = conflicts.fObjToConflictListMap; Map conflictMap = conflicts.fObjToConflictListMap;
for(int i = 0; i < sysTools.length; i++){ for(int i = 0; i < sysTools.length; i++){
@ -226,9 +226,9 @@ public abstract class ToolListModification implements IToolListModification {
fOperations = new ModificationOperation[0]; fOperations = new ModificationOperation[0];
} }
} else { } else {
List opList = new ArrayList(fCompatibleTools.size() + 1); List<ModificationOperation> opList = new ArrayList<ModificationOperation>(fCompatibleTools.size() + 1);
for(Iterator iter = fCompatibleTools.keySet().iterator(); iter.hasNext(); ){ Set<Tool> keySet = fCompatibleTools.keySet();
Tool tool = (Tool)iter.next(); for (Tool tool : keySet) {
if(tool == fRealTool) if(tool == fRealTool)
continue; continue;
@ -240,7 +240,7 @@ public abstract class ToolListModification implements IToolListModification {
opList.add(new ModificationOperation(this, null)); opList.add(new ModificationOperation(this, null));
} }
fOperations = (ModificationOperation[])opList.toArray(new ModificationOperation[opList.size()]); fOperations = opList.toArray(new ModificationOperation[opList.size()]);
} }
} }
return fOperations.clone(); return fOperations.clone();
@ -321,21 +321,21 @@ public abstract class ToolListModification implements IToolListModification {
public IModificationOperation[] getSupportedOperationsArray() { public IModificationOperation[] getSupportedOperationsArray() {
if(fOperations == null){ if(fOperations == null){
Set addCompatibleSysToolsSet = getAddCompatibleSysTools(); Set<Tool> addCompatibleSysToolsSet = getAddCompatibleSysTools();
if(addCompatibleSysToolsSet.contains(fRealTool) && canAdd(fRealTool)){ if(addCompatibleSysToolsSet.contains(fRealTool) && canAdd(fRealTool)){
fOperations = new ModificationOperation[]{new ModificationOperation(this, null)}; fOperations = new ModificationOperation[]{new ModificationOperation(this, null)};
} else { } else {
Map projMap = getMap(true); Map<Tool, IToolModification> projMap = getMap(true);
List opList = new ArrayList(projMap.size()); List<ModificationOperation> opList = new ArrayList<ModificationOperation>(projMap.size());
for(Iterator iter = projMap.values().iterator(); iter.hasNext(); ){ for (IToolModification tm : projMap.values()) {
ProjToolCompatibilityStatusInfo info = (ProjToolCompatibilityStatusInfo)iter.next(); ProjToolCompatibilityStatusInfo info = (ProjToolCompatibilityStatusInfo)tm;
if(info.getCompatibleTools().containsKey(fRealTool) if(info.getCompatibleTools().containsKey(fRealTool)
&& !fFilteredOutTools.containsKey(info.fRealTool) && !fFilteredOutTools.containsKey(info.fRealTool)
&& canReplace(info.fSelectedTool, this.fSelectedTool)){ && canReplace(info.fSelectedTool, this.fSelectedTool)){
opList.add(new ModificationOperation(this, info.fSelectedTool)); opList.add(new ModificationOperation(this, info.fSelectedTool));
} }
} }
fOperations = (ModificationOperation[])opList.toArray(new ModificationOperation[opList.size()]); fOperations = opList.toArray(new ModificationOperation[opList.size()]);
} }
} }
return fOperations; return fOperations;
@ -364,9 +364,9 @@ public abstract class ToolListModification implements IToolListModification {
} }
} }
private Set getAddCompatibleSysTools(){ private Set<Tool> getAddCompatibleSysTools(){
if(fAddCapableTools == null){ if(fAddCapableTools == null){
fAddCapableTools = new HashSet(Arrays.asList(getAllSysTools())); fAddCapableTools = new HashSet<Tool>(Arrays.asList(getAllSysTools()));
PerTypeMapStorage storage = getCompleteObjectStore(); PerTypeMapStorage storage = getCompleteObjectStore();
ConflictMatchSet conflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOL, storage); ConflictMatchSet conflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOL, storage);
fAddCapableTools.removeAll(conflicts.fObjToConflictListMap.keySet()); fAddCapableTools.removeAll(conflicts.fObjToConflictListMap.keySet());
@ -410,8 +410,11 @@ public abstract class ToolListModification implements IToolListModification {
if(base.fAllSysTools != null) if(base.fAllSysTools != null)
fAllSysTools = base.fAllSysTools.clone(); fAllSysTools = base.fAllSysTools.clone();
if(base.fFilteredOutSysTools != null) if(base.fFilteredOutSysTools != null) {
fFilteredOutSysTools = (HashSet)base.fFilteredOutSysTools.clone(); @SuppressWarnings("unchecked")
HashSet<ITool> clone = (HashSet<ITool>)base.fFilteredOutSysTools.clone();
fFilteredOutSysTools = clone;
}
if(base.fCompleteObjectStorage != null){ if(base.fCompleteObjectStorage != null){
fCompleteObjectStorage = TcModificationUtil.cloneRealToolToPathSet(base.fCompleteObjectStorage); fCompleteObjectStorage = TcModificationUtil.cloneRealToolToPathSet(base.fCompleteObjectStorage);
@ -490,7 +493,7 @@ public abstract class ToolListModification implements IToolListModification {
if(fAllSysTools == null){ if(fAllSysTools == null){
ITool[] allSys = ManagedBuildManager.getRealTools(); ITool[] allSys = ManagedBuildManager.getRealTools();
fAllSysTools = filterTools((Tool[])allSys); fAllSysTools = filterTools((Tool[])allSys);
HashSet set = new HashSet(Arrays.asList(allSys)); HashSet<ITool> set = new HashSet<ITool>(Arrays.asList(allSys));
set.removeAll(Arrays.asList(fAllSysTools)); set.removeAll(Arrays.asList(fAllSysTools));
fFilteredOutSysTools = set; fFilteredOutSysTools = set;
} }
@ -648,7 +651,7 @@ public abstract class ToolListModification implements IToolListModification {
List list = new ArrayList(); List list = new ArrayList();
list.addAll(map.values()); list.addAll(map.values());
clearToolInfo((Tool[])map.values().toArray(new Tool[map.size()])); clearToolInfo(map.values().toArray(new Tool[map.size()]));
PerTypeMapStorage storage = getCompleteObjectStore(); PerTypeMapStorage storage = getCompleteObjectStore();
Map toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true); Map toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, true);