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