mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
bug 319512: Missing type arguments on managedbuilder.core
This commit is contained in:
parent
87515ad676
commit
49b52caf42
3 changed files with 30 additions and 27 deletions
|
@ -133,7 +133,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
private Boolean fSupportsCustomizedBuild;
|
||||
|
||||
private List identicalList;
|
||||
private List<Builder> identicalList;
|
||||
|
||||
private ICOutputEntry[] outputEntries;
|
||||
|
||||
|
@ -229,6 +229,11 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
loadFromProject(element);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private HashMap<String, String> cloneMap(HashMap<String, String> map) {
|
||||
return (HashMap<String, String>) map.clone();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a <code>Builder</code> based upon an existing builder.
|
||||
*
|
||||
|
@ -289,11 +294,11 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
if(builder.customizedErrorParserIds != null)
|
||||
customizedErrorParserIds = builder.customizedErrorParserIds.clone();
|
||||
if(builder.customizedEnvironment != null)
|
||||
customizedEnvironment = (HashMap<String, String>) builder.customizedEnvironment.clone();
|
||||
customizedEnvironment = cloneMap(builder.customizedEnvironment);
|
||||
appendEnvironment = builder.appendEnvironment;
|
||||
buildPath = builder.buildPath;
|
||||
if(builder.customBuildProperties != null)
|
||||
customBuildProperties = (HashMap<String, String>) builder.customBuildProperties.clone();
|
||||
customBuildProperties = cloneMap(builder.customBuildProperties);
|
||||
|
||||
|
||||
|
||||
|
@ -393,14 +398,14 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
if(builder.customizedErrorParserIds != null)
|
||||
customizedErrorParserIds = builder.customizedErrorParserIds.clone();
|
||||
if(builder.customizedEnvironment != null)
|
||||
customizedEnvironment = (HashMap<String, String>) builder.customizedEnvironment.clone();
|
||||
customizedEnvironment = cloneMap(builder.customizedEnvironment);
|
||||
appendEnvironment = builder.appendEnvironment;
|
||||
if(isBuildPathEditable()){
|
||||
if(!getBuildPath().equals(builder.getBuildPath()))
|
||||
setBuildPath(builder.getBuildPath());
|
||||
}
|
||||
if(builder.customBuildProperties != null)
|
||||
customBuildProperties = (HashMap<String, String>) builder.customBuildProperties.clone();
|
||||
customBuildProperties = cloneMap(builder.customBuildProperties);
|
||||
|
||||
if(allBuildSettings){
|
||||
if(!getCommand().equals(builder.getCommand()))
|
||||
|
@ -2128,14 +2133,13 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
|
||||
public Map<String, String> getEnvironment() {
|
||||
if(customizedEnvironment != null)
|
||||
return (HashMap<String, String>)customizedEnvironment.clone();
|
||||
return cloneMap(customizedEnvironment);
|
||||
return null;
|
||||
}
|
||||
|
||||
public Map<String, String> getExpandedEnvironment() throws CoreException {
|
||||
if(customizedEnvironment != null){
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<String, String> expanded = (HashMap<String, String>)customizedEnvironment.clone();
|
||||
Map<String, String> expanded = cloneMap(customizedEnvironment);
|
||||
ICdtVariableManager mngr = CCorePlugin.getDefault().getCdtVariableManager();
|
||||
String separator = CCorePlugin.getDefault().getBuildEnvironmentManager().getDefaultDelimiter();
|
||||
ICConfigurationDescription cfgDes = ManagedBuildManager.getDescriptionForConfiguration(getParent().getParent());
|
||||
|
@ -2330,7 +2334,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
return new MatchKey<Builder>(this);
|
||||
}
|
||||
|
||||
public void setIdenticalList(List list) {
|
||||
public void setIdenticalList(List<Builder> list) {
|
||||
identicalList = list;
|
||||
}
|
||||
|
||||
|
@ -2343,7 +2347,7 @@ public class Builder extends HoldsOptions implements IBuilder, IMatchKeyProvider
|
|||
return name;
|
||||
}
|
||||
|
||||
public List getIdenticalList() {
|
||||
public List<Builder> getIdenticalList() {
|
||||
return identicalList;
|
||||
}
|
||||
|
||||
|
|
|
@ -163,7 +163,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
|
||||
private HashMap<IInputType, CLanguageData> typeToDataMap = new HashMap<IInputType, CLanguageData>(2);
|
||||
private boolean fDataMapInited;
|
||||
private List identicalList;
|
||||
private List<Tool> identicalList;
|
||||
private HashMap<String, PathInfoCache> discoveredInfoMap = new HashMap<String, PathInfoCache>(2);
|
||||
private String scannerConfigDiscoveryProfileId;
|
||||
|
||||
|
@ -368,7 +368,6 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
setSuperClassInternal(toolSuperClass);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Tool(IBuildObject parent, String toolSuperClassId, String Id, String name, Tool tool){
|
||||
super(resolvedDefault);
|
||||
this.parent = parent;
|
||||
|
@ -466,7 +465,9 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
super.copyChildren(tool);
|
||||
// Clone the children
|
||||
if (tool.inputTypeList != null) {
|
||||
discoveredInfoMap = (HashMap<String, PathInfoCache>)tool.discoveredInfoMap.clone();
|
||||
@SuppressWarnings("unchecked")
|
||||
HashMap<String, PathInfoCache> clone = (HashMap<String, PathInfoCache>)tool.discoveredInfoMap.clone();
|
||||
discoveredInfoMap = clone;
|
||||
for (InputType inputType : tool.getInputTypeList()) {
|
||||
PathInfoCache cache = discoveredInfoMap.remove(getTypeKey(inputType));
|
||||
int nnn = ManagedBuildManager.getRandomNumber();
|
||||
|
@ -1833,7 +1834,6 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.ITool#getAdditionalDependencies()
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public IPath[] getAdditionalDependencies() {
|
||||
List<IPath> allDeps = new ArrayList<IPath>();
|
||||
IInputType[] types = getInputTypes();
|
||||
|
@ -1862,6 +1862,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
optType == IOption.LIBRARY_FILES ||
|
||||
optType == IOption.MACRO_FILES
|
||||
) {
|
||||
@SuppressWarnings("unchecked")
|
||||
List<String> inputNames = (List<String>)option.getValue();
|
||||
filterValues(optType, inputNames);
|
||||
for (String s : inputNames)
|
||||
|
@ -3354,7 +3355,6 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
return typeToDataMap.get(type);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void initDataMap(){
|
||||
if(fDataMapInited)
|
||||
return;
|
||||
|
@ -3380,6 +3380,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
iter.set(getEditableInputType(type));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Map<IInputType, CLanguageData> map = (Map<IInputType, CLanguageData>)typeToDataMap.clone();
|
||||
for(IInputType type : types){
|
||||
CLanguageData data = map.remove(type);
|
||||
|
@ -3641,7 +3642,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
return new MatchKey<Tool>(this);
|
||||
}
|
||||
|
||||
public void setIdenticalList(List list) {
|
||||
public void setIdenticalList(List<Tool> list) {
|
||||
identicalList = list;
|
||||
}
|
||||
|
||||
|
@ -3689,7 +3690,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
this.parent = ((IFolderInfo)rcInfo).getToolChain();
|
||||
}
|
||||
|
||||
public List getIdenticalList() {
|
||||
public List<Tool> getIdenticalList() {
|
||||
return identicalList;
|
||||
}
|
||||
|
||||
|
@ -3985,8 +3986,7 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
return list.toArray(new Option[list.size()]);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void filterValues(int type, List values){
|
||||
public void filterValues(int type, List<String> values){
|
||||
if(values.size() == 0)
|
||||
return;
|
||||
|
||||
|
@ -3998,15 +3998,14 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory, IMatch
|
|||
}
|
||||
|
||||
if(filterSet.size() != 0){
|
||||
Object oVal;
|
||||
for(int i = 0; i < values.size(); i++){
|
||||
oVal = values.get(i);
|
||||
for (Iterator<String> iterator = values.iterator(); iterator.hasNext();) {
|
||||
String oVal = iterator.next();
|
||||
if(type == IOption.PREPROCESSOR_SYMBOLS){
|
||||
String[] nameVal = BuildEntryStorage.macroNameValueFromValue((String)oVal);
|
||||
String[] nameVal = BuildEntryStorage.macroNameValueFromValue(oVal);
|
||||
oVal = nameVal[0];
|
||||
}
|
||||
if(filterSet.contains(oVal))
|
||||
values.remove(i);
|
||||
iterator.remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -115,7 +115,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
|
|||
private boolean rebuildState;
|
||||
private BooleanExpressionApplicabilityCalculator booleanExpressionCalculator;
|
||||
|
||||
private List identicalList;
|
||||
private List<ToolChain> identicalList;
|
||||
private Set<String> unusedChildrenSet;
|
||||
|
||||
|
||||
|
@ -2249,7 +2249,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
|
|||
return rTc == ManagedBuildManager.getRealToolChain(tc);
|
||||
}
|
||||
|
||||
public List getIdenticalList(){
|
||||
public List<ToolChain> getIdenticalList(){
|
||||
return identicalList;//;(ArrayList)identicalToolChainsList.clone();
|
||||
}
|
||||
|
||||
|
@ -2301,7 +2301,7 @@ public class ToolChain extends HoldsOptions implements IToolChain, IBuildPropert
|
|||
return new MatchKey<ToolChain>(this);
|
||||
}
|
||||
|
||||
public void setIdenticalList(List list) {
|
||||
public void setIdenticalList(List<ToolChain> list) {
|
||||
identicalList = list;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue