1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

bug 319512: Missing type arguments on managedbuilder.core

This commit is contained in:
Andrew Gvozdev 2010-10-03 01:42:59 +00:00
parent 6a4302eb01
commit 0d54e0ef9a
3 changed files with 12 additions and 11 deletions

View file

@ -51,7 +51,7 @@ public class FolderInfoModification extends ToolListModification implements IFol
private IToolChain[] fAllSysToolChains; private IToolChain[] fAllSysToolChains;
private Map<ToolChain, ToolChainCompatibilityInfoElement> fCompatibleToolChains; private Map<ToolChain, ToolChainCompatibilityInfoElement> fCompatibleToolChains;
private Map<ToolChain, ToolChainCompatibilityInfoElement> fInCompatibleToolChains; private Map<ToolChain, ToolChainCompatibilityInfoElement> fInCompatibleToolChains;
private PerTypeMapStorage fParentObjectStorage; private PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> fParentObjectStorage;
private ConflictMatchSet fParentConflicts; private ConflictMatchSet fParentConflicts;
// private PerTypeMapStorage fChildObjectStorage; // private PerTypeMapStorage fChildObjectStorage;
// private ConflictMatchSet fChildConflicts; // private ConflictMatchSet fChildConflicts;
@ -75,13 +75,13 @@ public class FolderInfoModification extends ToolListModification implements IFol
private ConflictMatchSet getParentConflictMatchSet(){ private ConflictMatchSet getParentConflictMatchSet(){
if(fParentConflicts == null){ if(fParentConflicts == null){
PerTypeMapStorage storage = getParentObjectStorage(); PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> storage = getParentObjectStorage();
fParentConflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, storage); fParentConflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, storage);
} }
return fParentConflicts; return fParentConflicts;
} }
private PerTypeMapStorage getParentObjectStorage(){ private PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> getParentObjectStorage(){
if(fParentObjectStorage == null){ if(fParentObjectStorage == null){
fParentObjectStorage = TcModificationUtil.createParentObjectsRealToolToPathSet((FolderInfo)getResourceInfo()); fParentObjectStorage = TcModificationUtil.createParentObjectsRealToolToPathSet((FolderInfo)getResourceInfo());
} }
@ -387,12 +387,10 @@ public class FolderInfoModification extends ToolListModification implements IFol
ToolChain newRealTc = (ToolChain)ManagedBuildManager.getRealToolChain(newNonRealTc); ToolChain newRealTc = (ToolChain)ManagedBuildManager.getRealToolChain(newNonRealTc);
ToolChainApplicabilityPaths tcApplicability = getToolChainApplicabilityPaths(); ToolChainApplicabilityPaths tcApplicability = getToolChainApplicabilityPaths();
PerTypeMapStorage storage = getCompleteObjectStore(); PerTypeMapStorage<? extends IRealBuildObjectAssociation, Set<IPath>> storage = getCompleteObjectStore();
@SuppressWarnings("unchecked") Map<ToolChain, Set<IPath>> tcMap = (Map<ToolChain, Set<IPath>>) storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
Map<ToolChain, Set<IPath>> tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); Map<Tool, Set<IPath>> toolMap = (Map<Tool, Set<IPath>>) storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
@SuppressWarnings("unchecked")
Map<Tool, Set<IPath>> toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
TcModificationUtil.removePaths(tcMap, fRealToolChain, tcApplicability.fFolderInfoPaths); TcModificationUtil.removePaths(tcMap, fRealToolChain, tcApplicability.fFolderInfoPaths);

View file

@ -13,7 +13,9 @@ package org.eclipse.cdt.managedbuilder.internal.tcmodification;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class PerTypeMapStorage<K, V> implements Cloneable { import org.eclipse.cdt.managedbuilder.internal.core.IRealBuildObjectAssociation;
public class PerTypeMapStorage<K extends IRealBuildObjectAssociation, V> implements Cloneable {
private ObjectTypeBasedStorage<Map<K, V>> fStorage = new ObjectTypeBasedStorage<Map<K, V>>(); private ObjectTypeBasedStorage<Map<K, V>> fStorage = new ObjectTypeBasedStorage<Map<K, V>>();
public Map<K, V> getMap(int type, boolean create){ public Map<K, V> getMap(int type, boolean create){

View file

@ -147,7 +147,7 @@ public class ToolChainModificationManager implements
return added; return added;
} }
public ConflictMatchSet getConflictInfo(int objType, PerTypeMapStorage parent){ public ConflictMatchSet getConflictInfo(int objType, PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> parent){
//parent should be passed - it is constant no need to recalculate every time //parent should be passed - it is constant no need to recalculate every time
//PerTypeMapStorage parent = TcModificationUtil.createParentObjectsRealToolToPathSet(foInfo); //PerTypeMapStorage parent = TcModificationUtil.createParentObjectsRealToolToPathSet(foInfo);
@ -182,7 +182,7 @@ public class ToolChainModificationManager implements
} }
private ConflictMatchSet getConflictMatches(int type, PerTypeMapStorage rtToPath, PerTypeSetStorage skip){ private ConflictMatchSet getConflictMatches(int type, PerTypeMapStorage<IRealBuildObjectAssociation, Set<IPath>> rtToPath, PerTypeSetStorage<IRealBuildObjectAssociation> skip){
//conversion: //conversion:
//1.first filter applicable to not-this //1.first filter applicable to not-this
@ -204,6 +204,7 @@ public class ToolChainModificationManager implements
if(rtToPathMap == null) if(rtToPathMap == null)
continue; continue;
@SuppressWarnings("unchecked")
Map<IRealBuildObjectAssociation, Set<IPath>> clone = (Map<IRealBuildObjectAssociation, Set<IPath>>)((HashMap<IRealBuildObjectAssociation, Set<IPath>>)rtToPathMap).clone(); Map<IRealBuildObjectAssociation, Set<IPath>> clone = (Map<IRealBuildObjectAssociation, Set<IPath>>)((HashMap<IRealBuildObjectAssociation, Set<IPath>>)rtToPathMap).clone();
rtToPathMap = clone; rtToPathMap = clone;
Set<IRealBuildObjectAssociation> skipSet = skip != null ? (Set<IRealBuildObjectAssociation>)skip.getSet(objType, false) : null; Set<IRealBuildObjectAssociation> skipSet = skip != null ? (Set<IRealBuildObjectAssociation>)skip.getSet(objType, false) : null;