From 0d54e0ef9af7fc6e6734b9cbd529809cd1ad8929 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Sun, 3 Oct 2010 01:42:59 +0000 Subject: [PATCH] bug 319512: Missing type arguments on managedbuilder.core --- .../tcmodification/FolderInfoModification.java | 14 ++++++-------- .../internal/tcmodification/PerTypeMapStorage.java | 4 +++- .../ToolChainModificationManager.java | 5 +++-- 3 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java index 561ca6f53c1..106ed26c034 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/FolderInfoModification.java @@ -51,7 +51,7 @@ public class FolderInfoModification extends ToolListModification implements IFol private IToolChain[] fAllSysToolChains; private Map fCompatibleToolChains; private Map fInCompatibleToolChains; - private PerTypeMapStorage fParentObjectStorage; + private PerTypeMapStorage> fParentObjectStorage; private ConflictMatchSet fParentConflicts; // private PerTypeMapStorage fChildObjectStorage; // private ConflictMatchSet fChildConflicts; @@ -75,13 +75,13 @@ public class FolderInfoModification extends ToolListModification implements IFol private ConflictMatchSet getParentConflictMatchSet(){ if(fParentConflicts == null){ - PerTypeMapStorage storage = getParentObjectStorage(); + PerTypeMapStorage> storage = getParentObjectStorage(); fParentConflicts = ToolChainModificationManager.getInstance().getConflictInfo(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, storage); } return fParentConflicts; } - private PerTypeMapStorage getParentObjectStorage(){ + private PerTypeMapStorage> getParentObjectStorage(){ if(fParentObjectStorage == null){ fParentObjectStorage = TcModificationUtil.createParentObjectsRealToolToPathSet((FolderInfo)getResourceInfo()); } @@ -387,12 +387,10 @@ public class FolderInfoModification extends ToolListModification implements IFol ToolChain newRealTc = (ToolChain)ManagedBuildManager.getRealToolChain(newNonRealTc); ToolChainApplicabilityPaths tcApplicability = getToolChainApplicabilityPaths(); - PerTypeMapStorage storage = getCompleteObjectStore(); + PerTypeMapStorage> storage = getCompleteObjectStore(); - @SuppressWarnings("unchecked") - Map> tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); - @SuppressWarnings("unchecked") - Map> toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false); + Map> tcMap = (Map>) storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); + Map> toolMap = (Map>) storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false); TcModificationUtil.removePaths(tcMap, fRealToolChain, tcApplicability.fFolderInfoPaths); diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java index d4034ebc4f6..6c1b8712521 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeMapStorage.java @@ -13,7 +13,9 @@ package org.eclipse.cdt.managedbuilder.internal.tcmodification; import java.util.HashMap; import java.util.Map; -public class PerTypeMapStorage implements Cloneable { +import org.eclipse.cdt.managedbuilder.internal.core.IRealBuildObjectAssociation; + +public class PerTypeMapStorage implements Cloneable { private ObjectTypeBasedStorage> fStorage = new ObjectTypeBasedStorage>(); public Map getMap(int type, boolean create){ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java index 0c9caed13e4..928b6edd2d5 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolChainModificationManager.java @@ -147,7 +147,7 @@ public class ToolChainModificationManager implements return added; } - public ConflictMatchSet getConflictInfo(int objType, PerTypeMapStorage parent){ + public ConflictMatchSet getConflictInfo(int objType, PerTypeMapStorage> parent){ //parent should be passed - it is constant no need to recalculate every time //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> rtToPath, PerTypeSetStorage skip){ //conversion: //1.first filter applicable to not-this @@ -204,6 +204,7 @@ public class ToolChainModificationManager implements if(rtToPathMap == null) continue; + @SuppressWarnings("unchecked") Map> clone = (Map>)((HashMap>)rtToPathMap).clone(); rtToPathMap = clone; Set skipSet = skip != null ? (Set)skip.getSet(objType, false) : null;