1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-12 18:55:38 +02:00

bug 319512: Missing type arguments on managedbuilder.core

This commit is contained in:
Andrew Gvozdev 2010-09-17 21:31:49 +00:00
parent 200c531f33
commit d6992f6cfd

View file

@ -12,7 +12,6 @@ package org.eclipse.cdt.managedbuilder.templateengine.processes;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Iterator;
import java.util.List; import java.util.List;
import org.eclipse.cdt.core.templateengine.process.processes.Messages; import org.eclipse.cdt.core.templateengine.process.processes.Messages;
@ -76,7 +75,7 @@ public class ExcludeResources extends ProcessRunner {
* Determine which configurations to exclude for * Determine which configurations to exclude for
*/ */
IConfiguration[] allConfigs = managedProject.getConfigurations(); IConfiguration[] allConfigs = managedProject.getConfigurations();
List/*<IConfiguration>*/ matchingConfigs = new ArrayList/*<IConfiguration>*/(); List<IConfiguration> matchingConfigs = new ArrayList<IConfiguration>();
for(int i=0; i<allConfigs.length; i++) { for(int i=0; i<allConfigs.length; i++) {
IConfiguration config = allConfigs[i]; IConfiguration config = allConfigs[i];
if(config.getId().matches(configIdPattern)) { if(config.getId().matches(configIdPattern)) {
@ -85,7 +84,7 @@ public class ExcludeResources extends ProcessRunner {
} }
if(invert) { if(invert) {
List invertedConfigs = new ArrayList(Arrays.asList(allConfigs)); List<IConfiguration> invertedConfigs = new ArrayList<IConfiguration>(Arrays.asList(allConfigs));
invertedConfigs.removeAll(matchingConfigs); invertedConfigs.removeAll(matchingConfigs);
matchingConfigs = invertedConfigs; matchingConfigs = invertedConfigs;
} }
@ -93,7 +92,7 @@ public class ExcludeResources extends ProcessRunner {
/* /*
* Visit project resources and exclude them if they match any pattern * Visit project resources and exclude them if they match any pattern
*/ */
final List configsToProcess = matchingConfigs; final List<IConfiguration> configsToProcess = matchingConfigs;
IResourceProxyVisitor visitor = new IResourceProxyVisitor() { IResourceProxyVisitor visitor = new IResourceProxyVisitor() {
public boolean visit(IResourceProxy proxy) throws CoreException { public boolean visit(IResourceProxy proxy) throws CoreException {
IPath lPath = proxy.requestFullPath(); IPath lPath = proxy.requestFullPath();
@ -105,16 +104,12 @@ public class ExcludeResources extends ProcessRunner {
} }
if(!isDerived) { if(!isDerived) {
for(Iterator i = configsToProcess.iterator(); i.hasNext(); ) { for (IConfiguration config : configsToProcess) {
IConfiguration config = (IConfiguration) i.next();
IResourceConfiguration resourceConfig = config.getResourceConfiguration(lPath.toString()); IResourceConfiguration resourceConfig = config.getResourceConfiguration(lPath.toString());
// Only add a resource configuration if the file pattern matches something that // Only add a resource configuration if the file pattern matches something that
//is actually supposed to be excluded. Adding a resrouce configuration for all files //is actually supposed to be excluded. Adding a resrouce configuration for all files
// regardless of wheter they need it or not mess up the makefile generation. // regardless of wheter they need it or not mess up the makefile generation.
for(int j=0; j<filePatterns.length; j++) { for (String filePattern : filePatterns) {
String filePattern = filePatterns[j];
if(lPath.toString().matches(filePattern)) { if(lPath.toString().matches(filePattern)) {
if(resourceConfig==null) { if(resourceConfig==null) {
IFile file = (IFile) proxy.requestResource(); IFile file = (IFile) proxy.requestResource();