From 786416e2fca7f7916d86a07c3d7b6bc0013c4672 Mon Sep 17 00:00:00 2001 From: Andrew Gvozdev Date: Sat, 2 Oct 2010 03:27:59 +0000 Subject: [PATCH] bug 319512: Missing type arguments on managedbuilder.core --- .../ConfigurationModification.java | 2 +- .../FolderInfoModification.java | 18 +++--- .../tcmodification/PerTypeMapStorage.java | 21 ++++--- .../tcmodification/PerTypeSetStorage.java | 22 ++++--- .../tcmodification/TcModificationUtil.java | 33 +++++----- .../tcmodification/ToolListModification.java | 61 ++++++++++--------- .../extension/RulesManager.java | 4 +- 7 files changed, 89 insertions(+), 72 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java index 484388f7dec..f145693e4d2 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ConfigurationModification.java @@ -130,7 +130,7 @@ public class ConfigurationModification extends FolderInfoModification implements fInCompatibleBuilders = new HashMap(); ConflictMatchSet conflicts = getParentConflictMatchSet(); IBuilder sysBs[] = getAllSysBuilders(); - Map> conflictMap = conflicts.fObjToConflictListMap; + Map> conflictMap = conflicts.fObjToConflictListMap; for(int i = 0; i < sysBs.length; i++){ Builder b = (Builder) sysBs[i]; List l = conflictMap.get(b); 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 b16c05ced91..549de401df8 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 @@ -23,7 +23,6 @@ import java.util.Set; import java.util.SortedMap; import java.util.TreeMap; -import org.eclipse.cdt.managedbuilder.core.IBuilder; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.cdt.managedbuilder.core.IFolderInfo; import org.eclipse.cdt.managedbuilder.core.IManagedProject; @@ -175,7 +174,7 @@ public class FolderInfoModification extends ToolListModification implements IFol ConflictMatchSet parentConflicts = getParentConflictMatchSet(); ToolChain sysTCs[] = (ToolChain[])getAllSysToolChains(); - Map> conflictMap = parentConflicts.fObjToConflictListMap; + Map> conflictMap = parentConflicts.fObjToConflictListMap; for (ToolChain tc : sysTCs) { List l = conflictMap.get(tc); ToolChainCompatibilityInfoElement info = new ToolChainCompatibilityInfoElement(tc, l); @@ -311,9 +310,9 @@ public class FolderInfoModification extends ToolListModification implements IFol PerTypeSetStorage oSet = pathMap.get(path); Set toolSet = oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false); - Set tcSet = oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); + Set tcSet = oSet.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); - ToolChain curTc = (ToolChain)tcSet.iterator().next(); + ToolChain curTc = tcSet.iterator().next(); Set foInfoPaths = tcApplicabilityPaths.fFolderInfoPaths; Set fileInfoPaths = tcApplicabilityPaths.fFileInfoPaths; @@ -322,7 +321,8 @@ public class FolderInfoModification extends ToolListModification implements IFol Map> toolPathsMap = tcApplicabilityPaths.fToolPathMap; if(toolSet != null){ - for (Tool tool : toolSet) { + for (IRealBuildObjectAssociation oa : toolSet) { + Tool tool = (Tool) oa; Set set = new HashSet(); toolPathsMap.put(tool, set); set.add(path); @@ -359,8 +359,8 @@ public class FolderInfoModification extends ToolListModification implements IFol for (Entry entry : entrySet) { PerTypeSetStorage cst = entry.getValue(); - Set ctc = cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); - Set ct = cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false); + Set ctc = (Set) cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); + Set ct = (Set) cst.getSet(IRealBuildObjectAssociation.OBJECT_TOOL, false); if(ctc == null || ctc.size() == 0){ @@ -384,8 +384,8 @@ public class FolderInfoModification extends ToolListModification implements IFol ToolChainApplicabilityPaths tcApplicability = getToolChainApplicabilityPaths(); PerTypeMapStorage storage = getCompleteObjectStore(); - Map> tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); - Map> toolMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false); + Map tcMap = storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, false); + Map toolMap = 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 d592460b24c..f3d64772042 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 @@ -12,12 +12,15 @@ package org.eclipse.cdt.managedbuilder.internal.tcmodification; import java.util.HashMap; import java.util.Map; +import java.util.Set; + +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){ - Map map = (Map)fStorage.get(type); + Map map = (Map)fStorage.get(type); if(map == null && create){ map = createMap(null); fStorage.set(type, map); @@ -25,10 +28,13 @@ public class PerTypeMapStorage implements Cloneable { return map; } - protected Map createMap(Map map){ - if(map == null) - return new HashMap(); - return (Map)((HashMap)map).clone(); + protected Map createMap(Map map){ + if(map == null) { + return new HashMap(); + } + @SuppressWarnings("unchecked") + Map clone = (Map)((HashMap)map).clone(); + return clone; } @Override @@ -37,9 +43,10 @@ public class PerTypeMapStorage implements Cloneable { PerTypeMapStorage clone = (PerTypeMapStorage)super.clone(); int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes(); for(int i = 0; i < types.length; i++){ - Object o = clone.fStorage.get(types[i]); + @SuppressWarnings("unchecked") + Map o = (Map) clone.fStorage.get(types[i]); if(o != null){ - clone.fStorage.set(types[i], clone.createMap((Map)o)); + clone.fStorage.set(types[i], clone.createMap(o)); } } return clone; diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java index 0f30a125bb0..6b74fe7f334 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/PerTypeSetStorage.java @@ -13,11 +13,13 @@ package org.eclipse.cdt.managedbuilder.internal.tcmodification; import java.util.LinkedHashSet; import java.util.Set; +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){ - Set set = (Set)fStorage.get(type); + Set set = (Set)fStorage.get(type); if(set == null && create){ set = createSet(null); fStorage.set(type, set); @@ -25,10 +27,12 @@ public class PerTypeSetStorage implements Cloneable { return set; } - protected Set createSet(Set set){ + protected Set createSet(Set set){ if(set == null) - return new LinkedHashSet(); - return (Set)((LinkedHashSet)set).clone(); + return new LinkedHashSet(); + @SuppressWarnings("unchecked") + Set clone = (Set)((LinkedHashSet)set).clone(); + return clone; } @Override @@ -38,9 +42,10 @@ public class PerTypeSetStorage implements Cloneable { clone.fStorage = (ObjectTypeBasedStorage)fStorage.clone(); int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes(); for(int i = 0; i < types.length; i++){ - Object o = clone.fStorage.get(types[i]); + @SuppressWarnings("unchecked") + Set o = (Set) clone.fStorage.get(types[i]); if(o != null){ - clone.fStorage.set(types[i], createSet((Set)o)); + clone.fStorage.set(types[i], createSet(o)); } } return clone; @@ -56,8 +61,9 @@ public class PerTypeSetStorage implements Cloneable { if(emptySetAsNull){ int types[] = ObjectTypeBasedStorage.getSupportedObjectTypes(); for(int i = 0; i < types.length; i++){ - Object o = fStorage.get(types[i]); - if(o != null && !((Set)o).isEmpty()) + @SuppressWarnings("unchecked") + Set o = (Set) fStorage.get(types[i]); + if(o != null && !((Set)o).isEmpty()) return false; } return true; diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java index 7a23b0d2312..c1b5a2227a8 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/TcModificationUtil.java @@ -19,6 +19,7 @@ import java.util.Iterator; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.SortedSet; import java.util.TreeMap; @@ -30,6 +31,7 @@ import org.eclipse.cdt.managedbuilder.core.IResourceInfo; import org.eclipse.cdt.managedbuilder.core.ITool; import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; +import org.eclipse.cdt.managedbuilder.internal.core.Builder; import org.eclipse.cdt.managedbuilder.internal.core.Configuration; import org.eclipse.cdt.managedbuilder.internal.core.FolderInfo; import org.eclipse.cdt.managedbuilder.internal.core.IRealBuildObjectAssociation; @@ -183,22 +185,23 @@ public class TcModificationUtil { return storage; } - public static TreeMap createResultingChangesMap(TreeMap resultingMap, TreeMap initialMap){ + public static TreeMap createResultingChangesMap(TreeMap resultingMap, TreeMap initialMap){ int[] types = new int []{ IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, IRealBuildObjectAssociation.OBJECT_BUILDER, IRealBuildObjectAssociation.OBJECT_TOOL, }; - TreeMap result = new TreeMap(PathComparator.INSTANCE); - initialMap = (TreeMap)initialMap.clone(); + TreeMap result = new TreeMap(PathComparator.INSTANCE); + @SuppressWarnings("unchecked") + TreeMap clone = (TreeMap)initialMap.clone(); + initialMap = clone; - for(Iterator iter = resultingMap.entrySet().iterator(); iter.hasNext();){ - Map.Entry entry = (Map.Entry)iter.next(); - Object oPath = entry.getKey(); + for (Entry entry : resultingMap.entrySet()) { + IPath oPath = entry.getKey(); - PerTypeSetStorage resStorage = (PerTypeSetStorage)entry.getValue(); - PerTypeSetStorage initStorage = (PerTypeSetStorage)initialMap.remove(oPath); + PerTypeSetStorage resStorage = entry.getValue(); + PerTypeSetStorage initStorage = initialMap.remove(oPath); PerTypeSetStorage storage; if(initStorage == null || initStorage.isEmpty(true)){ @@ -233,7 +236,7 @@ public class TcModificationUtil { ToolChain tc = setToStore.size() != 0 ? (ToolChain)setToStore.iterator().next() : null; - IPath path = (IPath)oPath; + IPath path = oPath; if(tc != null){ tInitSet = new LinkedHashSet(); TcModificationUtil.getRealObjectsSet((Tool[])tc.getTools(), tInitSet); @@ -279,7 +282,7 @@ public class TcModificationUtil { if(initialMap.size() != 0){ for(Iterator iter = initialMap.entrySet().iterator(); iter.hasNext(); ){ Map.Entry entry = (Map.Entry)iter.next(); - Object oPath = entry.getKey(); + IPath oPath = (IPath) entry.getKey(); PerTypeSetStorage initStorage = (PerTypeSetStorage)entry.getValue(); @@ -360,9 +363,9 @@ public class TcModificationUtil { return set; } - public static Map getRealToObjectsMap(IRealBuildObjectAssociation[] objs, Map map){ + public static Map getRealToObjectsMap(IRealBuildObjectAssociation[] objs, Map map){ if(map == null) - map = new LinkedHashMap(); + map = new LinkedHashMap(); for(int i = 0; i < objs.length; i++){ map.put(objs[i].getRealBuildObject(), objs[i]); } @@ -421,7 +424,7 @@ public class TcModificationUtil { } public static void restoreBuilderInfo(PerTypeMapStorage storage, IBuilder builder, Object obj){ - storage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).put(builder, obj); + storage.getMap(IRealBuildObjectAssociation.OBJECT_BUILDER, true).put((Builder) builder, obj); } // public static boolean removeToolInfo(PerTypeMapStorage storage, IPath path, ITool tool){ @@ -514,13 +517,13 @@ public class TcModificationUtil { set.add(realBuilder); } - public static TreeMap createPathMap(IConfiguration cfg){ + public static TreeMap createPathMap(IConfiguration cfg){ //TODO: optimize to calculate the map directly PerTypeMapStorage storage = createRealToolToPathSet(cfg, null, false); return createPathMap(storage); } - public static TreeMap createPathMap(PerTypeMapStorage storage){ + public static TreeMap createPathMap(PerTypeMapStorage storage){ int[] types = ObjectTypeBasedStorage.getSupportedObjectTypes(); TreeMap result = new TreeMap(PathComparator.INSTANCE); for(int i = 0; i < types.length; i++){ diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java index 803a865f90b..70d2b2faa6d 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/ToolListModification.java @@ -39,6 +39,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.Tool; import org.eclipse.cdt.managedbuilder.internal.core.ToolChain; import org.eclipse.cdt.managedbuilder.internal.core.ToolChainModificationHelper; import org.eclipse.cdt.managedbuilder.internal.core.ToolListModificationInfo; +import org.eclipse.cdt.managedbuilder.internal.tcmodification.ToolChainModificationManager.ConflictMatch; import org.eclipse.cdt.managedbuilder.internal.tcmodification.ToolChainModificationManager.ConflictMatchSet; import org.eclipse.cdt.managedbuilder.tcmodification.CompatibilityStatus; import org.eclipse.cdt.managedbuilder.tcmodification.IModificationOperation; @@ -60,9 +61,9 @@ public abstract class ToolListModification implements IToolListModification { // private LinkedHashMap fRealToToolMap = new LinkedHashMap(); // private boolean fSysInfoMapInited; private PerTypeMapStorage fCompleteObjectStorage; - protected TreeMap fCompletePathMapStorage; + protected TreeMap fCompletePathMapStorage; private HashSet fAddCapableTools; - private Map fFilteredOutTools; + private Map fFilteredOutTools; private ToolListModificationInfo fModificationInfo; @@ -128,7 +129,7 @@ public abstract class ToolListModification implements IToolListModification { private Tool fSelectedTool; private Tool fRealTool; private boolean fInited; - private Set fExtConflictTools; + private Set fExtConflictTools; ProjToolCompatibilityStatusInfo(Tool tool){ fSelectedTool = tool; @@ -166,7 +167,7 @@ public abstract class ToolListModification implements IToolListModification { PerTypeMapStorage storage = getCompleteObjectStore(); Tool tool = fRealTool; - Set rmSet = getToolApplicabilityPathSet(tool, true); + Set rmSet = getToolApplicabilityPathSet(tool, true); try { if(rmSet != null && rmSet.size() != 0) TcModificationUtil.removePaths(storage.getMap(IRealBuildObjectAssociation.OBJECT_TOOL, false), tool, rmSet); @@ -179,10 +180,10 @@ public abstract class ToolListModification implements IToolListModification { fCompatibleTools = new HashMap(); fInCompatibleTools = new HashMap(); Tool sysTools[] = getTools(false, true); - Map conflictMap = conflicts.fObjToConflictListMap; + Map> conflictMap = conflicts.fObjToConflictListMap; for(int i = 0; i < sysTools.length; i++){ Tool t = sysTools[i]; - List l = (List)conflictMap.get(t); + List l = conflictMap.get(t); ToolCompatibilityInfoElement el = new ToolCompatibilityInfoElement(this, t, l); if(el.isCompatible()){ fCompatibleTools.put(t, el); @@ -192,7 +193,7 @@ public abstract class ToolListModification implements IToolListModification { } Tool t = fRealTool; - List l = (List)conflictMap.get(t); + List l = conflictMap.get(t); fCurrentElement = new ToolCompatibilityInfoElement(this, t, l); } finally { if(rmSet != null && rmSet.size() != 0) @@ -201,13 +202,13 @@ public abstract class ToolListModification implements IToolListModification { fInited = true; } - private Set getConflictingTools(){ + private Set getConflictingTools(){ if(fExtConflictTools == null){ Tool[] tmp = new Tool[1]; tmp[0] = fSelectedTool; tmp = filterTools(tmp); if(tmp.length == 0) - fExtConflictTools = Collections.EMPTY_SET; + fExtConflictTools = Collections.emptySet(); else fExtConflictTools = getExtensionConflictToolSet(fSelectedTool, filterTools(getTools(true, false))); } @@ -441,19 +442,19 @@ public abstract class ToolListModification implements IToolListModification { protected abstract boolean canAdd(Tool tool); - protected abstract Set getToolApplicabilityPathSet(Tool realTool, boolean isProject); + protected abstract Set getToolApplicabilityPathSet(Tool realTool, boolean isProject); - protected abstract Set getExtensionConflictToolSet(Tool tool, Tool[] toos); + protected abstract Set getExtensionConflictToolSet(Tool tool, Tool[] toos); protected abstract Tool[] filterTools(Tool[] tools); public class ToolCompatibilityInfoElement { private Tool fRealTool; - private List fErrComflictMatchList; + private List fErrComflictMatchList; private CompatibilityStatus fStatus; private ProjToolCompatibilityStatusInfo fStatusInfo; - ToolCompatibilityInfoElement(ProjToolCompatibilityStatusInfo statusInfo, Tool realTool, List errConflictList){ + ToolCompatibilityInfoElement(ProjToolCompatibilityStatusInfo statusInfo, Tool realTool, List errConflictList){ fStatusInfo = statusInfo; fRealTool = realTool; if(errConflictList != null && errConflictList.size() != 0) @@ -501,13 +502,13 @@ public abstract class ToolListModification implements IToolListModification { } public final void apply() throws CoreException { - TreeMap initialMap = TcModificationUtil.createPathMap(fRcInfo.getParent()); - TreeMap cur = getCompletePathMapStorage(); - TreeMap result = TcModificationUtil.createResultingChangesMap(cur, initialMap); + TreeMap initialMap = TcModificationUtil.createPathMap(fRcInfo.getParent()); + TreeMap cur = getCompletePathMapStorage(); + TreeMap result = TcModificationUtil.createResultingChangesMap(cur, initialMap); apply(result); } - private void apply(TreeMap resultingChangeMap) throws CoreException { + private void apply(TreeMap resultingChangeMap) throws CoreException { //the order matters here: we first should process tool-chain than a builder and then tools int types[] = new int[]{ IRealBuildObjectAssociation.OBJECT_TOOLCHAIN, @@ -517,17 +518,17 @@ public abstract class ToolListModification implements IToolListModification { int type; IConfiguration cfg = fRcInfo.getParent(); - for(Iterator iter = resultingChangeMap.entrySet().iterator(); iter.hasNext(); ){ - Map.Entry entry = (Map.Entry)iter.next(); - IPath path = (IPath)entry.getKey(); + Set> entrySet = resultingChangeMap.entrySet(); + for (Entry entry : entrySet) { + IPath path = entry.getKey(); ResourceInfo rcInfo = (ResourceInfo)cfg.getResourceInfo(path, true); if(rcInfo == null){ rcInfo = (FolderInfo)cfg.createFolderInfo(path); } - PerTypeSetStorage storage = (PerTypeSetStorage)entry.getValue(); + PerTypeSetStorage storage = entry.getValue(); for(int i = 0; i < types.length; i++){ type = types[i]; - Set set = storage.getSet(type, false); + Set set = storage.getSet(type, false); if(set != null){ apply(rcInfo, type, set); } @@ -589,8 +590,8 @@ public abstract class ToolListModification implements IToolListModification { public IToolModification getToolModification(ITool tool) { Tool rt = (Tool)ManagedBuildManager.getRealTool(tool); boolean isProj = isProjectTool(rt); - Map map = getMap(isProj); - IToolModification m = (IToolModification)map.get(rt); + Map map = getMap(isProj); + IToolModification m = map.get(rt); if(m == null){ ITool realTool = ManagedBuildManager.getRealTool(tool); boolean projFiltered = fFilteredOutTools.keySet().contains(realTool); @@ -637,8 +638,8 @@ public abstract class ToolListModification implements IToolListModification { if(!added && !removed) return; - Set rmSet = null; - Set addSet = null; + Set rmSet = null; + Set addSet = null; if(removed){ rmSet = getToolApplicabilityPathSet(realRemoved, true); } @@ -649,7 +650,7 @@ public abstract class ToolListModification implements IToolListModification { addSet = rmSet; } - List list = new ArrayList(); + List list = new ArrayList(); list.addAll(map.values()); clearToolInfo(map.values().toArray(new Tool[map.size()])); @@ -710,8 +711,8 @@ public abstract class ToolListModification implements IToolListModification { fProjCompInfoMap.clear(); for(int i = 0; i < tools.length; i++){ ITool tool = tools[i]; - ITool realTool = ManagedBuildManager.getRealTool(tool); - fProjCompInfoMap.put((Tool) realTool, new ProjToolCompatibilityStatusInfo((Tool)tool)); + Tool realTool = (Tool)ManagedBuildManager.getRealTool(tool); + fProjCompInfoMap.put(realTool, new ProjToolCompatibilityStatusInfo((Tool)tool)); if(!fFilteredOutTools.containsKey(realTool)) fInputExtsSet.addAll(Arrays.asList(tool.getPrimaryInputExtensions())); } @@ -738,7 +739,7 @@ public abstract class ToolListModification implements IToolListModification { return fCompleteObjectStorage; } - protected TreeMap getCompletePathMapStorage(){ + protected TreeMap getCompletePathMapStorage(){ if(fCompletePathMapStorage == null){ fCompletePathMapStorage = TcModificationUtil.createPathMap(getCompleteObjectStore()); } diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java index bc1f07f423e..cb86fa0a6e6 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/tcmodification/extension/RulesManager.java @@ -237,8 +237,8 @@ public class RulesManager { if(all == null) all = TcModificationUtil.getExtensionObjects(obj.getType()); - Map> map = fObjToChildSuperClassMap.getMap(obj.getType(), true); - Set set = map.get(obj); + Map map = fObjToChildSuperClassMap.getMap(obj.getType(), true); + Set set = map.get(obj); if(set == null){ set = createChildSuperClassRealSet(obj, all, null); map.put(obj, set);