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
49910542d3
commit
334702ee05
4 changed files with 94 additions and 113 deletions
|
@ -13,7 +13,6 @@ package org.eclipse.cdt.managedbuilder.internal.core;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
@ -26,7 +25,6 @@ import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
|||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IFileInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IFolderInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration;
|
||||
|
@ -49,8 +47,8 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
private static final String REBUILD_STATE = "rebuildState"; //$NON-NLS-1$
|
||||
|
||||
// Parent and children
|
||||
private List toolList;
|
||||
private Map toolMap;
|
||||
private List<ITool> toolList;
|
||||
private Map<String, ITool> toolMap;
|
||||
// Managed Build model attributes
|
||||
private Integer rcbsApplicability;
|
||||
private String toolsToInvoke;
|
||||
|
@ -173,7 +171,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
* @param cloneConfig The <code>ResourceConfiguration</code> to copy the settings from.
|
||||
* @param id A unique ID for the new resource configuration.
|
||||
*/
|
||||
public ResourceConfiguration(IConfiguration cfg, ResourceConfiguration cloneConfig, String id, Map superClassIdMap, boolean cloneChildren) {
|
||||
public ResourceConfiguration(IConfiguration cfg, ResourceConfiguration cloneConfig, String id, Map<IPath, Map<String, String>> superClassIdMap, boolean cloneChildren) {
|
||||
super(cfg, cloneConfig, id);
|
||||
|
||||
isExtensionResourceConfig = cfg.isExtensionElement();
|
||||
|
@ -196,17 +194,15 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
boolean copyIds = cloneChildren && id.equals(cloneConfig.id);
|
||||
// Clone the resource configuration's tool children
|
||||
if (cloneConfig.toolList != null) {
|
||||
Iterator iter = cloneConfig.getToolList().listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool toolChild = (Tool) iter.next();
|
||||
for (ITool toolChild : cloneConfig.getToolList()) {
|
||||
String subId = null;
|
||||
String subName;
|
||||
|
||||
Map curIdMap = (Map)superClassIdMap.get(cloneConfig.getPath());
|
||||
Map<String, String> curIdMap = superClassIdMap.get(cloneConfig.getPath());
|
||||
ITool extTool = ManagedBuildManager.getExtensionTool(toolChild);
|
||||
if(curIdMap != null){
|
||||
if(extTool != null){
|
||||
subId = (String)curIdMap.get(extTool.getId());
|
||||
subId = curIdMap.get(extTool.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -253,9 +249,9 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
}
|
||||
} else {
|
||||
superId = copyIds ? otherSuperTool.getId() : ManagedBuildManager.calculateChildId(otherExtTool.getId(), null);
|
||||
Map idMap = (Map)superClassIdMap.get(otherRcInfo.getPath());
|
||||
Map<String, String> idMap = superClassIdMap.get(otherRcInfo.getPath());
|
||||
if(idMap == null){
|
||||
idMap = new HashMap();
|
||||
idMap = new HashMap<String, String>();
|
||||
superClassIdMap.put(otherRcInfo.getPath(), idMap);
|
||||
}
|
||||
idMap.put(otherExtTool.getId(), superId);
|
||||
|
@ -290,12 +286,11 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
|
||||
Tool newTool = null;
|
||||
if(toolSuperClass != null)
|
||||
newTool = new Tool(this, toolSuperClass, subId, subName, toolChild);
|
||||
newTool = new Tool(this, toolSuperClass, subId, subName, (Tool)toolChild);
|
||||
else
|
||||
newTool = new Tool(this, superId, subId, subName, toolChild);
|
||||
newTool = new Tool(this, superId, subId, subName, (Tool)toolChild);
|
||||
|
||||
if(newTool != null)
|
||||
addTool(newTool);
|
||||
addTool(newTool);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -323,15 +318,13 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
|
||||
// Clone the resource configuration's tool children
|
||||
if (baseInfo.toolList != null) {
|
||||
Iterator iter = baseInfo.getToolList().listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool toolChild = (Tool) iter.next();
|
||||
for (ITool toolChild : baseInfo.getToolList()) {
|
||||
ITool superTool = toolChild.getSuperClass();
|
||||
String baseId = superTool != null ? superTool.getId() : toolChild.getId();
|
||||
String subId = ManagedBuildManager.calculateChildId(baseId, null);
|
||||
String subName = toolChild.getName();
|
||||
|
||||
Tool newTool = new Tool(this, superTool, subId, subName, toolChild);
|
||||
Tool newTool = new Tool(this, superTool, subId, subName, (Tool)toolChild);
|
||||
addTool(newTool);
|
||||
}
|
||||
}
|
||||
|
@ -429,12 +422,10 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
}
|
||||
|
||||
// Serialize my children
|
||||
List toolElements = getToolList();
|
||||
Iterator iter = toolElements.listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool tool = (Tool) iter.next();
|
||||
List<ITool> toolElements = getToolList();
|
||||
for (ITool tool : toolElements) {
|
||||
ICStorageElement toolElement = element.createChild(ITool.TOOL_ELEMENT_NAME);
|
||||
tool.serialize(toolElement);
|
||||
((Tool)tool).serialize(toolElement);
|
||||
}
|
||||
|
||||
// I am clean now
|
||||
|
@ -450,11 +441,10 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
* @see org.eclipse.cdt.core.build.managed.IResourceConfiguration#getTools()
|
||||
*/
|
||||
public ITool[] getTools() {
|
||||
Tool[] tools = new Tool[getToolList().size()];
|
||||
Iterator iter = getToolList().listIterator();
|
||||
List<ITool> toolList = getToolList();
|
||||
ITool[] tools = new ITool[toolList.size()];
|
||||
int i = 0;
|
||||
while (iter.hasNext()) {
|
||||
Tool tool = (Tool)iter.next();
|
||||
for (ITool tool : toolList) {
|
||||
tools[i++] = tool;
|
||||
}
|
||||
return tools;
|
||||
|
@ -473,9 +463,9 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
*
|
||||
* @return List containing the tools
|
||||
*/
|
||||
private List getToolList() {
|
||||
private List<ITool> getToolList() {
|
||||
if (toolList == null) {
|
||||
toolList = new ArrayList();
|
||||
toolList = new ArrayList<ITool>();
|
||||
}
|
||||
return toolList;
|
||||
}
|
||||
|
@ -485,9 +475,9 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
*
|
||||
* @return
|
||||
*/
|
||||
private Map getToolMap() {
|
||||
private Map<String, ITool> getToolMap() {
|
||||
if (toolMap == null) {
|
||||
toolMap = new HashMap();
|
||||
toolMap = new HashMap<String, ITool>();
|
||||
}
|
||||
return toolMap;
|
||||
}
|
||||
|
@ -735,9 +725,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
return true;
|
||||
|
||||
// Otherwise see if any tools need saving
|
||||
Iterator iter = getToolList().listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool toolChild = (Tool) iter.next();
|
||||
for (ITool toolChild : getToolList()) {
|
||||
if (toolChild.isDirty()) return true;
|
||||
}
|
||||
|
||||
|
@ -755,11 +743,9 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
|
||||
// Propagate "false" to the children
|
||||
if (!isDirty) {
|
||||
Iterator iter = getToolList().listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool toolChild = (Tool) iter.next();
|
||||
for (ITool toolChild : getToolList()) {
|
||||
toolChild.setDirty(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -772,10 +758,8 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
resolved = true;
|
||||
|
||||
// Call resolveReferences on our children
|
||||
Iterator iter = getToolList().listIterator();
|
||||
while (iter.hasNext()) {
|
||||
Tool toolChild = (Tool) iter.next();
|
||||
toolChild.resolveReferences();
|
||||
for (ITool toolChild : getToolList()) {
|
||||
((Tool)toolChild).resolveReferences();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -811,15 +795,15 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
tool.setToolCommand(command);
|
||||
}
|
||||
|
||||
private IBuildObject getHoldersParent(IOption option) {
|
||||
IHoldsOptions holder = option.getOptionHolder();
|
||||
if (holder instanceof ITool) {
|
||||
return ((ITool)holder).getParent();
|
||||
} else if (holder instanceof IToolChain) {
|
||||
return ((IToolChain)holder).getParent();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
// private IBuildObject getHoldersParent(IOption option) {
|
||||
// IHoldsOptions holder = option.getOptionHolder();
|
||||
// if (holder instanceof ITool) {
|
||||
// return ((ITool)holder).getParent();
|
||||
// } else if (holder instanceof IToolChain) {
|
||||
// return ((IToolChain)holder).getParent();
|
||||
// }
|
||||
// return null;
|
||||
// }
|
||||
|
||||
public IResource getOwner() {
|
||||
return getParent().getOwner();
|
||||
|
@ -850,8 +834,8 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
public void updateManagedBuildRevision(String revision){
|
||||
super.updateManagedBuildRevision(revision);
|
||||
|
||||
for(Iterator iter = getToolList().iterator(); iter.hasNext();){
|
||||
((Tool)iter.next()).updateManagedBuildRevision(revision);
|
||||
for (ITool tool : getToolList()) {
|
||||
((Tool)tool).updateManagedBuildRevision(revision);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -908,14 +892,14 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
|
||||
public CLanguageData[] getCLanguageDatas() {
|
||||
ITool tools[] = getTools/*ToInvoke*/();
|
||||
List list = new ArrayList();
|
||||
for(int i = 0; i < tools.length; i++){
|
||||
CLanguageData datas[] = tools[i].getCLanguageDatas();
|
||||
List<CLanguageData> list = new ArrayList<CLanguageData>();
|
||||
for (ITool tool : tools) {
|
||||
CLanguageData datas[] = tool.getCLanguageDatas();
|
||||
for(int j = 0; j < datas.length; j++){
|
||||
list.add(datas[j]);
|
||||
}
|
||||
}
|
||||
return (BuildLanguageData[])list.toArray(new BuildLanguageData[list.size()]);
|
||||
return list.toArray(new BuildLanguageData[list.size()]);
|
||||
}
|
||||
|
||||
public IToolChain getBaseToolChain() {
|
||||
|
@ -961,7 +945,7 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Set contributeErrorParsers(Set set) {
|
||||
public Set<String> contributeErrorParsers(Set<String> set) {
|
||||
return contributeErrorParsers(getToolsToInvoke(), set);
|
||||
}
|
||||
|
||||
|
@ -971,15 +955,14 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
void removeErrorParsers(Set set) {
|
||||
void removeErrorParsers(Set<String> set) {
|
||||
removeErrorParsers(getToolsToInvoke(), set);
|
||||
}
|
||||
|
||||
@Override
|
||||
void resolveProjectReferences(boolean onLoad){
|
||||
for(Iterator iter = getToolList().iterator(); iter.hasNext();){
|
||||
Tool tool = (Tool)iter.next();
|
||||
tool.resolveProjectReferences(onLoad);
|
||||
for (ITool tool : getToolList()) {
|
||||
((Tool)tool).resolveProjectReferences(onLoad);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1027,10 +1010,9 @@ public class ResourceConfiguration extends ResourceInfo implements IFileInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
void applyToolsInternal(ITool[] resultingTools,
|
||||
ToolListModificationInfo info) {
|
||||
List list = getToolList();
|
||||
Map map = getToolMap();
|
||||
void applyToolsInternal(ITool[] resultingTools, ToolListModificationInfo info) {
|
||||
List<ITool> list = getToolList();
|
||||
Map<String, ITool> map = getToolMap();
|
||||
|
||||
list.clear();
|
||||
map.clear();
|
||||
|
|
|
@ -50,7 +50,7 @@ public class ResourceInfoContainer {
|
|||
return null;
|
||||
}
|
||||
|
||||
public IResourceInfo[] getResourceInfos(Class clazz) {
|
||||
public IResourceInfo[] getResourceInfos(Class<? extends IResourceInfo> clazz) {
|
||||
return getResourceInfos(ICSettingBase.SETTING_FILE | ICSettingBase.SETTING_FOLDER, clazz);
|
||||
}
|
||||
|
||||
|
@ -62,7 +62,7 @@ public class ResourceInfoContainer {
|
|||
return getResourceInfos(kind, IResourceInfo.class);
|
||||
}
|
||||
|
||||
public IResourceInfo[] getResourceInfos(int kind, Class clazz){
|
||||
public IResourceInfo[] getResourceInfos(int kind, Class<? extends IResourceInfo> clazz){
|
||||
List<IResourceInfo> list = getRcInfoList(kind);
|
||||
|
||||
IResourceInfo datas[] = (IResourceInfo[])Array.newInstance(clazz, list.size());
|
||||
|
|
|
@ -11,9 +11,9 @@
|
|||
package org.eclipse.cdt.managedbuilder.internal.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -27,11 +27,11 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
public static final String ID = "id"; //$NON-NLS-1$
|
||||
public static final String REQUIRED = "required"; //$NON-NLS-1$
|
||||
|
||||
private HashMap fSupportedProperties = new HashMap();
|
||||
private HashMap<String, SupportedProperty> fSupportedProperties = new HashMap<String, SupportedProperty>();
|
||||
|
||||
private class SupportedProperty {
|
||||
private boolean fIsRequired;
|
||||
private Set fValues = new HashSet();
|
||||
private Set<String> fValues = new HashSet<String>();
|
||||
private String fId;
|
||||
|
||||
SupportedProperty(String id){
|
||||
|
@ -74,15 +74,15 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
}
|
||||
}
|
||||
*/
|
||||
public boolean isValid(){
|
||||
return fId != null && fValues.size() != 0;
|
||||
}
|
||||
// public boolean isValid(){
|
||||
// return fId != null && fValues.size() != 0;
|
||||
// }
|
||||
|
||||
public boolean isRequired(){
|
||||
return fIsRequired;
|
||||
}
|
||||
|
||||
public void addValueIds(Set ids){
|
||||
public void addValueIds(Set<String> ids){
|
||||
fValues.addAll(ids);
|
||||
}
|
||||
|
||||
|
@ -91,7 +91,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
}
|
||||
|
||||
public String[] getSupportedValues(){
|
||||
return (String[])fValues.toArray(new String[fValues.size()]);
|
||||
return fValues.toArray(new String[fValues.size()]);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
// if(type == null)
|
||||
// continue;
|
||||
|
||||
Set set = new HashSet();
|
||||
Set<String> set = new HashSet<String>();
|
||||
|
||||
IManagedConfigElement values[] = child.getChildren();
|
||||
for(int k = 0; k < values.length; k++){
|
||||
|
@ -132,7 +132,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
}
|
||||
|
||||
if(set.size() != 0){
|
||||
SupportedProperty stored = (SupportedProperty)fSupportedProperties.get(id);
|
||||
SupportedProperty stored = fSupportedProperties.get(id);
|
||||
if(stored == null){
|
||||
stored = new SupportedProperty(id);
|
||||
fSupportedProperties.put(id, stored);
|
||||
|
@ -155,7 +155,7 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
|
||||
public boolean supportsValue(String type, String value){
|
||||
boolean suports = false;
|
||||
SupportedProperty prop = (SupportedProperty)fSupportedProperties.get(type);
|
||||
SupportedProperty prop = fSupportedProperties.get(type);
|
||||
if(prop != null){
|
||||
suports = prop.supportsValue(value);
|
||||
}
|
||||
|
@ -168,13 +168,13 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
// }
|
||||
|
||||
public String[] getRequiredTypeIds() {
|
||||
List list = new ArrayList(fSupportedProperties.size());
|
||||
for(Iterator iter = fSupportedProperties.values().iterator(); iter.hasNext();){
|
||||
SupportedProperty prop = (SupportedProperty)iter.next();
|
||||
List<String> list = new ArrayList<String>(fSupportedProperties.size());
|
||||
Collection<SupportedProperty> values = fSupportedProperties.values();
|
||||
for (SupportedProperty prop : values) {
|
||||
if(prop.isRequired())
|
||||
list.add(prop.getId());
|
||||
}
|
||||
return (String[])list.toArray(new String[list.size()]);
|
||||
return list.toArray(new String[list.size()]);
|
||||
}
|
||||
|
||||
public String[] getSupportedTypeIds() {
|
||||
|
@ -184,14 +184,14 @@ public class SupportedProperties implements IBuildPropertiesRestriction {
|
|||
}
|
||||
|
||||
public String[] getSupportedValueIds(String typeId) {
|
||||
SupportedProperty prop = (SupportedProperty)fSupportedProperties.get(typeId);
|
||||
SupportedProperty prop = fSupportedProperties.get(typeId);
|
||||
if(prop != null)
|
||||
return prop.getSupportedValues();
|
||||
return new String[0];
|
||||
}
|
||||
|
||||
public boolean requiresType(String typeId) {
|
||||
SupportedProperty prop = (SupportedProperty)fSupportedProperties.get(typeId);
|
||||
SupportedProperty prop = fSupportedProperties.get(typeId);
|
||||
if(prop != null)
|
||||
return prop.isRequired();
|
||||
return false;
|
||||
|
|
|
@ -39,9 +39,9 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
private String unusedChildren;
|
||||
private String errorParserIds;
|
||||
private Boolean isAbstract;
|
||||
private List osList;
|
||||
private List archList;
|
||||
private List binaryParserList;
|
||||
private List<String> osList;
|
||||
private List<String> archList;
|
||||
private List<String> binaryParserList;
|
||||
// Miscellaneous
|
||||
private boolean isExtensionTargetPlatform = false;
|
||||
private boolean isDirty = false;
|
||||
|
@ -144,8 +144,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
isExtensionTargetPlatform = false;
|
||||
fTargetPlatformData = new BuildTargetPlatformData(this);
|
||||
|
||||
if ( targetPlatform != null)
|
||||
setManagedBuildRevision(targetPlatform.getManagedBuildRevision());
|
||||
setManagedBuildRevision(targetPlatform.getManagedBuildRevision());
|
||||
|
||||
// Copy the remaining attributes
|
||||
if (targetPlatform.unusedChildren != null) {
|
||||
|
@ -158,13 +157,13 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
isAbstract = new Boolean(targetPlatform.isAbstract.booleanValue());
|
||||
}
|
||||
if (targetPlatform.osList != null) {
|
||||
osList = new ArrayList(targetPlatform.osList);
|
||||
osList = new ArrayList<String>(targetPlatform.osList);
|
||||
}
|
||||
if (targetPlatform.archList != null) {
|
||||
archList = new ArrayList(targetPlatform.archList);
|
||||
archList = new ArrayList<String>(targetPlatform.archList);
|
||||
}
|
||||
if (targetPlatform.binaryParserList != null) {
|
||||
binaryParserList = new ArrayList(targetPlatform.binaryParserList);
|
||||
binaryParserList = new ArrayList<String>(targetPlatform.binaryParserList);
|
||||
}
|
||||
|
||||
setDirty(true);
|
||||
|
@ -204,7 +203,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
// Get the comma-separated list of valid OS
|
||||
String os = element.getAttribute(OS_LIST);
|
||||
if (os != null) {
|
||||
osList = new ArrayList();
|
||||
osList = new ArrayList<String>();
|
||||
String[] osTokens = os.split(","); //$NON-NLS-1$
|
||||
for (int i = 0; i < osTokens.length; ++i) {
|
||||
osList.add(osTokens[i].trim());
|
||||
|
@ -214,7 +213,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
// Get the comma-separated list of valid Architectures
|
||||
String arch = element.getAttribute(ARCH_LIST);
|
||||
if (arch != null) {
|
||||
archList = new ArrayList();
|
||||
archList = new ArrayList<String>();
|
||||
String[] archTokens = arch.split(","); //$NON-NLS-1$
|
||||
for (int j = 0; j < archTokens.length; ++j) {
|
||||
archList.add(archTokens[j].trim());
|
||||
|
@ -224,7 +223,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
// Get the IDs of the binary parsers from a semi-colon-separated list.
|
||||
String bpars = element.getAttribute(BINARY_PARSER);
|
||||
if (bpars != null) {
|
||||
binaryParserList = new ArrayList();
|
||||
binaryParserList = new ArrayList<String>();
|
||||
String[] bparsTokens = CDataUtil.stringToArray(bpars, ";"); //$NON-NLS-1$
|
||||
for (int j = 0; j < bparsTokens.length; ++j) {
|
||||
binaryParserList.add(bparsTokens[j].trim());
|
||||
|
@ -274,7 +273,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
if (element.getAttribute(OS_LIST) != null) {
|
||||
String os = element.getAttribute(OS_LIST);
|
||||
if (os != null) {
|
||||
osList = new ArrayList();
|
||||
osList = new ArrayList<String>();
|
||||
String[] osTokens = os.split(","); //$NON-NLS-1$
|
||||
for (int i = 0; i < osTokens.length; ++i) {
|
||||
osList.add(osTokens[i].trim());
|
||||
|
@ -286,7 +285,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
if (element.getAttribute(ARCH_LIST) != null) {
|
||||
String arch = element.getAttribute(ARCH_LIST);
|
||||
if (arch != null) {
|
||||
archList = new ArrayList();
|
||||
archList = new ArrayList<String>();
|
||||
String[] archTokens = arch.split(","); //$NON-NLS-1$
|
||||
for (int j = 0; j < archTokens.length; ++j) {
|
||||
archList.add(archTokens[j].trim());
|
||||
|
@ -298,7 +297,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
if (element.getAttribute(BINARY_PARSER) != null) {
|
||||
String bpars = element.getAttribute(BINARY_PARSER);
|
||||
if (bpars != null) {
|
||||
binaryParserList = new ArrayList();
|
||||
binaryParserList = new ArrayList<String>();
|
||||
String[] bparsTokens = CDataUtil.stringToArray(bpars, ";"); //$NON-NLS-1$
|
||||
for (int j = 0; j < bparsTokens.length; ++j) {
|
||||
binaryParserList.add(bparsTokens[j].trim());
|
||||
|
@ -330,10 +329,10 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
}
|
||||
|
||||
if (binaryParserList != null) {
|
||||
Iterator bparsIter = binaryParserList.listIterator();
|
||||
Iterator<String> bparsIter = binaryParserList.listIterator();
|
||||
String listValue = EMPTY_STRING;
|
||||
while (bparsIter.hasNext()) {
|
||||
String current = (String) bparsIter.next();
|
||||
String current = bparsIter.next();
|
||||
listValue += current;
|
||||
if ((bparsIter.hasNext())) {
|
||||
listValue += ";"; //$NON-NLS-1$
|
||||
|
@ -343,10 +342,10 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
}
|
||||
|
||||
if (osList != null) {
|
||||
Iterator osIter = osList.listIterator();
|
||||
Iterator<String> osIter = osList.listIterator();
|
||||
String listValue = EMPTY_STRING;
|
||||
while (osIter.hasNext()) {
|
||||
String current = (String) osIter.next();
|
||||
String current = osIter.next();
|
||||
listValue += current;
|
||||
if ((osIter.hasNext())) {
|
||||
listValue += ","; //$NON-NLS-1$
|
||||
|
@ -356,10 +355,10 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
}
|
||||
|
||||
if (archList != null) {
|
||||
Iterator archIter = archList.listIterator();
|
||||
Iterator<String> archIter = archList.listIterator();
|
||||
String listValue = EMPTY_STRING;
|
||||
while (archIter.hasNext()) {
|
||||
String current = (String) archIter.next();
|
||||
String current = archIter.next();
|
||||
listValue += current;
|
||||
if ((archIter.hasNext())) {
|
||||
listValue += ","; //$NON-NLS-1$
|
||||
|
@ -445,7 +444,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
return new String[0];
|
||||
}
|
||||
}
|
||||
return (String[]) binaryParserList.toArray(new String[binaryParserList.size()]);
|
||||
return binaryParserList.toArray(new String[binaryParserList.size()]);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -461,7 +460,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
return new String[] {"all"}; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return (String[]) archList.toArray(new String[archList.size()]);
|
||||
return archList.toArray(new String[archList.size()]);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -477,7 +476,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
return new String[] {"all"}; //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
return (String[]) osList.toArray(new String[osList.size()]);
|
||||
return osList.toArray(new String[osList.size()]);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -498,7 +497,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
public void setBinaryParserList(String[] ids) {
|
||||
if(ids != null){
|
||||
if (binaryParserList == null) {
|
||||
binaryParserList = new ArrayList();
|
||||
binaryParserList = new ArrayList<String>();
|
||||
} else {
|
||||
binaryParserList.clear();
|
||||
}
|
||||
|
@ -526,7 +525,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
*/
|
||||
public void setOSList(String[] OSs) {
|
||||
if (osList == null) {
|
||||
osList = new ArrayList();
|
||||
osList = new ArrayList<String>();
|
||||
} else {
|
||||
osList.clear();
|
||||
}
|
||||
|
@ -543,7 +542,7 @@ public class TargetPlatform extends BuildObject implements ITargetPlatform {
|
|||
*/
|
||||
public void setArchList(String[] archs) {
|
||||
if (archList == null) {
|
||||
archList = new ArrayList();
|
||||
archList = new ArrayList<String>();
|
||||
} else {
|
||||
archList.clear();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue