mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 14:42:11 +02:00
bug 319512: Missing type arguments on managedbuilder.core
This commit is contained in:
parent
786416e2fc
commit
945f453d62
6 changed files with 35 additions and 25 deletions
|
@ -130,7 +130,8 @@ public class ConfigurationModification extends FolderInfoModification implements
|
|||
fInCompatibleBuilders = new HashMap<IBuilder, BuilderCompatibilityInfoElement>();
|
||||
ConflictMatchSet conflicts = getParentConflictMatchSet();
|
||||
IBuilder sysBs[] = getAllSysBuilders();
|
||||
Map<Builder, List<ConflictMatch>> conflictMap = conflicts.fObjToConflictListMap;
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Builder, List<ConflictMatch>> conflictMap = (Map<Builder, List<ConflictMatch>>) conflicts.fObjToConflictListMap;
|
||||
for(int i = 0; i < sysBs.length; i++){
|
||||
Builder b = (Builder) sysBs[i];
|
||||
List<ConflictMatch> l = conflictMap.get(b);
|
||||
|
|
|
@ -174,7 +174,8 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
|||
ConflictMatchSet parentConflicts = getParentConflictMatchSet();
|
||||
ToolChain sysTCs[] = (ToolChain[])getAllSysToolChains();
|
||||
|
||||
Map<ToolChain, List<ConflictMatch>> conflictMap = parentConflicts.fObjToConflictListMap;
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<ToolChain, List<ConflictMatch>> conflictMap = (Map<ToolChain, List<ConflictMatch>>) parentConflicts.fObjToConflictListMap;
|
||||
for (ToolChain tc : sysTCs) {
|
||||
List<ConflictMatch> l = conflictMap.get(tc);
|
||||
ToolChainCompatibilityInfoElement info = new ToolChainCompatibilityInfoElement(tc, l);
|
||||
|
@ -309,8 +310,10 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
|||
TreeMap<IPath, PerTypeSetStorage> pathMap = getCompletePathMapStorage();
|
||||
|
||||
PerTypeSetStorage oSet = pathMap.get(path);
|
||||
Set<Tool> toolSet = oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false);
|
||||
Set<ToolChain> tcSet = oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<Tool> toolSet = (Set<Tool>) oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false);
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<ToolChain> tcSet = (Set<ToolChain>) oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
|
||||
|
||||
ToolChain curTc = tcSet.iterator().next();
|
||||
|
||||
|
@ -359,7 +362,9 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
|||
for (Entry<IPath, PerTypeSetStorage> entry : entrySet) {
|
||||
PerTypeSetStorage cst = entry.getValue();
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<ToolChain> ctc = (Set<ToolChain>) cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<Tool> ct = (Set<Tool>) cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false);
|
||||
|
||||
|
||||
|
@ -384,8 +389,10 @@ public class FolderInfoModification extends ToolListModification implements IFol
|
|||
ToolChainApplicabilityPaths tcApplicability = getToolChainApplicabilityPaths();
|
||||
PerTypeMapStorage storage = getCompleteObjectStore();
|
||||
|
||||
Map<ToolChain, Set> tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
|
||||
Map<Tool, Set> toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<ToolChain, Set<IPath>> tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false);
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Tool, Set<IPath>> toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false);
|
||||
|
||||
|
||||
TcModificationUtil.removePaths(tcMap, fRealToolChain, tcApplicability.fFolderInfoPaths);
|
||||
|
|
|
@ -18,7 +18,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.IRealBuildObjectAssociation;
|
|||
public class PerTypeSetStorage implements Cloneable {
|
||||
private ObjectTypeBasedStorage fStorage = new ObjectTypeBasedStorage();
|
||||
|
||||
public Set getSet(int type, boolean create){
|
||||
public Set<? extends IRealBuildObjectAssociation> getSet(int type, boolean create){
|
||||
Set<IRealBuildObjectAssociation> set = (Set<IRealBuildObjectAssociation>)fStorage.get(type);
|
||||
if(set == null && create){
|
||||
set = createSet(null);
|
||||
|
@ -63,7 +63,7 @@ public class PerTypeSetStorage implements Cloneable {
|
|||
for(int i = 0; i < types.length; i++){
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<IRealBuildObjectAssociation> o = (Set<IRealBuildObjectAssociation>) fStorage.get(types[i]);
|
||||
if(o != null && !((Set<IRealBuildObjectAssociation>)o).isEmpty())
|
||||
if(o != null && !o.isEmpty())
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -525,26 +525,27 @@ public class TcModificationUtil {
|
|||
|
||||
public static TreeMap<IPath,PerTypeSetStorage> createPathMap(PerTypeMapStorage storage){
|
||||
int[] types = ObjectTypeBasedStorage.getSupportedObjectTypes();
|
||||
TreeMap result = new TreeMap(PathComparator.INSTANCE);
|
||||
TreeMap<IPath,PerTypeSetStorage> result = new TreeMap<IPath,PerTypeSetStorage>(PathComparator.INSTANCE);
|
||||
for(int i = 0; i < types.length; i++){
|
||||
int type = types[i];
|
||||
Map map = storage.getMap(type, false);
|
||||
Map<IRealBuildObjectAssociation, Set<IPath>> map = storage.getMap(type, false);
|
||||
if(map == null)
|
||||
continue;
|
||||
|
||||
for(Iterator iter = map.entrySet().iterator(); iter.hasNext(); ){
|
||||
Map.Entry entry = (Map.Entry)iter.next();
|
||||
SortedSet pathSet = (SortedSet)entry.getValue();
|
||||
|
||||
for(Iterator pathIter = pathSet.iterator(); pathIter.hasNext(); ){
|
||||
Object path = pathIter.next();
|
||||
PerTypeSetStorage oset = (PerTypeSetStorage)result.get(path);
|
||||
Set<Entry<IRealBuildObjectAssociation, Set<IPath>>> entrySet = map.entrySet();
|
||||
for (Entry<IRealBuildObjectAssociation, Set<IPath>> entry : entrySet) {
|
||||
IRealBuildObjectAssociation pathKey = entry.getKey();
|
||||
Set<IPath> pathSet = entry.getValue();
|
||||
for (IPath path : pathSet) {
|
||||
PerTypeSetStorage oset = result.get(path);
|
||||
if(oset == null){
|
||||
oset = new PerTypeSetStorage();
|
||||
result.put(path, oset);
|
||||
}
|
||||
|
||||
oset.getSet(type, true).add(entry.getKey());
|
||||
@SuppressWarnings("unchecked")
|
||||
Set<IRealBuildObjectAssociation> set = (Set<IRealBuildObjectAssociation>) oset.getSet(type, true);
|
||||
set.add(pathKey);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,9 +175,9 @@ public class ToolChainModificationManager implements
|
|||
|
||||
public static class ConflictMatchSet {
|
||||
ConflictMatch[] fConflicts;
|
||||
Map fObjToConflictListMap;
|
||||
Map<? extends IRealBuildObjectAssociation, List<ConflictMatch>> fObjToConflictListMap;
|
||||
|
||||
ConflictMatchSet(ConflictMatch[] coflicts, Map objToConflictMap){
|
||||
ConflictMatchSet(ConflictMatch[] coflicts, Map<? extends IRealBuildObjectAssociation, List<ConflictMatch>> objToConflictMap){
|
||||
fConflicts = coflicts;
|
||||
fObjToConflictListMap = objToConflictMap;
|
||||
}
|
||||
|
|
|
@ -180,7 +180,8 @@ public abstract class ToolListModification implements IToolListModification {
|
|||
fCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
|
||||
fInCompatibleTools = new HashMap<Tool, ToolCompatibilityInfoElement>();
|
||||
Tool sysTools[] = getTools(false, true);
|
||||
Map<Tool, List<ConflictMatch>> conflictMap = conflicts.fObjToConflictListMap;
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<Tool, List<ConflictMatch>> conflictMap = (Map<Tool, List<ConflictMatch>>) conflicts.fObjToConflictListMap;
|
||||
for(int i = 0; i < sysTools.length; i++){
|
||||
Tool t = sysTools[i];
|
||||
List<ConflictMatch> l = conflictMap.get(t);
|
||||
|
@ -528,7 +529,7 @@ public abstract class ToolListModification implements IToolListModification {
|
|||
PerTypeSetStorage storage = entry.getValue();
|
||||
for(int i = 0; i < types.length; i++){
|
||||
type = types[i];
|
||||
Set<IRealBuildObjectAssociation> set = storage.getSet(type, false);
|
||||
Set<? extends IRealBuildObjectAssociation> set = storage.getSet(type, false);
|
||||
if(set != null){
|
||||
apply(rcInfo, type, set);
|
||||
}
|
||||
|
@ -536,7 +537,7 @@ public abstract class ToolListModification implements IToolListModification {
|
|||
}
|
||||
}
|
||||
|
||||
private void apply(ResourceInfo rcInfo, int type, Set<IRealBuildObjectAssociation> set) throws CoreException {
|
||||
private void apply(ResourceInfo rcInfo, int type, Set<? extends IRealBuildObjectAssociation> set) throws CoreException {
|
||||
switch(type){
|
||||
case IRealBuildObjectAssociation.OBJECT_TOOL:
|
||||
ToolListModificationInfo info = rcInfo == fRcInfo ? getModificationInfo() :
|
||||
|
@ -574,8 +575,8 @@ public abstract class ToolListModification implements IToolListModification {
|
|||
}
|
||||
|
||||
public IToolModification[] getProjectToolModifications() {
|
||||
Map map = getMap(true);
|
||||
return (ProjToolCompatibilityStatusInfo[])map.values().toArray(new ProjToolCompatibilityStatusInfo[map.size()]);
|
||||
Map<Tool, IToolModification> map = getMap(true);
|
||||
return map.values().toArray(new ProjToolCompatibilityStatusInfo[map.size()]);
|
||||
}
|
||||
|
||||
public ITool[] getProjectTools() {
|
||||
|
|
Loading…
Add table
Reference in a new issue