1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-08 10:16:03 +02:00

bug 319512: Missing type arguments on managedbuilder.core

This commit is contained in:
Andrew Gvozdev 2010-09-17 21:43:05 +00:00
parent 1741dd69aa
commit 6cfbdd8726
3 changed files with 12 additions and 13 deletions

View file

@ -134,12 +134,11 @@ public class AppendToMBSStringListOptionValues extends ProcessRunner {
case IOption.LIBRARY_PATHS: case IOption.LIBRARY_PATHS:
case IOption.LIBRARY_FILES: case IOption.LIBRARY_FILES:
case IOption.MACRO_FILES: case IOption.MACRO_FILES:
List list= (List) option.getValue(); @SuppressWarnings("unchecked")
String[] newValue= concat((String[]) list.toArray(new String[list.size()]), value); List<String> list= (List<String>) option.getValue();
String[] newValue= concat(list.toArray(new String[list.size()]), value);
ManagedBuildManager.setOption(resourceConfig, optionHolder, option, newValue); ManagedBuildManager.setOption(resourceConfig, optionHolder, option, newValue);
modified = true; modified = true;
default:
continue;
} }
} }
} }
@ -162,12 +161,11 @@ public class AppendToMBSStringListOptionValues extends ProcessRunner {
case IOption.LIBRARY_PATHS: case IOption.LIBRARY_PATHS:
case IOption.LIBRARY_FILES: case IOption.LIBRARY_FILES:
case IOption.MACRO_FILES: case IOption.MACRO_FILES:
List list= (List) option.getValue(); @SuppressWarnings("unchecked")
String[] newValue= concat((String[]) list.toArray(new String[list.size()]), value); List<String> list= (List<String>) option.getValue();
String[] newValue= concat(list.toArray(new String[list.size()]), value);
ManagedBuildManager.setOption(config, optionHolder, option, newValue); ManagedBuildManager.setOption(config, optionHolder, option, newValue);
modified = true; modified = true;
default:
continue;
} }
} }
} }

View file

@ -69,14 +69,15 @@ public class NewManagedProject extends ProcessRunner {
locationPath = Path.fromPortableString(location); locationPath = Path.fromPortableString(location);
} }
List configs = template.getTemplateInfo().getConfigurations(); @SuppressWarnings("unchecked")
List<IConfiguration> configs = (List<IConfiguration>) template.getTemplateInfo().getConfigurations();
if (configs == null || configs.size() == 0) { if (configs == null || configs.size() == 0) {
throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$ throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$
} }
pca.setProject(project); pca.setProject(project);
pca.setProjectLocation(locationPath); pca.setProjectLocation(locationPath);
pca.setConfigs((IConfiguration[]) configs.toArray(new IConfiguration[configs.size()])); pca.setConfigs(configs.toArray(new IConfiguration[configs.size()]));
pca.setArtifactExtension(artifactExtension); pca.setArtifactExtension(artifactExtension);
info = pca.createProject(monitor, CCorePlugin.DEFAULT_INDEXER, isCProject); info = pca.createProject(monitor, CCorePlugin.DEFAULT_INDEXER, isCProject);

View file

@ -26,7 +26,7 @@ public class TemplateInfo {
private boolean isCategory; private boolean isCategory;
private String icon; private String icon;
private String templateId; private String templateId;
private List<?> configs; /*This seems to be used for storing build-system specific configurations*/ private List<?> configs; /*IConfiguration This seems to be used for storing build-system specific configurations*/
/** /**
* *
@ -106,11 +106,11 @@ public class TemplateInfo {
this.toolChainIdSet = toolChainIdSet; this.toolChainIdSet = toolChainIdSet;
} }
public List<?> getConfigurations() { public List<?/*IConfiguration*/> getConfigurations() {
return configs; return configs;
} }
public void setConfigurations(List<?> configs) { public void setConfigurations(List<?/*IConfiguration*/> configs) {
this.configs = configs; this.configs = configs;
} }