diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java index c10e22e9023..8c94bcf24cc 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/makegen/gnu/GnuMakefileGenerator.java @@ -19,15 +19,14 @@ import java.io.InputStreamReader; import java.io.Reader; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.List; -import java.util.Map; import java.util.Set; import java.util.Vector; +import java.util.Map.Entry; import org.eclipse.cdt.core.CCorePlugin; import org.eclipse.cdt.core.settings.model.CSourceEntry; @@ -330,8 +329,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { ITool[] buildTools; boolean[] buildToolsUsed; ManagedBuildGnuToolInfo[] gnuToolInfos; - Set outputExtensionsSet; - List dependencyMakefiles; + Set outputExtensionsSet; + List dependencyMakefiles; } @@ -344,28 +343,28 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // private boolean[] buildToolsUsed; // private ManagedBuildGnuToolInfo[] gnuToolInfos; private PathSettingsContainer toolInfos; - private Vector deletedFileList; - private Vector deletedDirList; + private Vector deletedFileList; + private Vector deletedDirList; // private IManagedBuildInfo info; // private IConfiguration cfg - private Vector invalidDirList; - private Vector modifiedList; + private Vector invalidDirList; + private Vector modifiedList; private IProgressMonitor monitor; private IProject project; private IResource[] projectResources; - private Vector ruleList; - private Vector depLineList; // String's of additional dependency lines - private Vector depRuleList; // String's of rules for generating dependency files - private Vector subdirList; + private Vector ruleList; + private Vector depLineList; // String's of additional dependency lines + private Vector depRuleList; // String's of rules for generating dependency files + private Vector subdirList; private IPath topBuildDir; // Build directory - relative to the workspace // private Set outputExtensionsSet; - // Maps of macro names (String) to values (List) - private final HashMap buildSrcVars = new HashMap(); // Map of source file build variable names - // to a List of source file Path's - private final HashMap buildOutVars = new HashMap(); // Map of output file build variable names - // to a List of output file Path's - private final HashMap buildDepVars = new HashMap(); // Map of dependency file build variable names - // to a List of GnuDependencyGroupInfo objects + //=== Maps of macro names (String) to values (List) + // Map of source file build variable names to a List of source file Path's + private final HashMap> buildSrcVars = new HashMap>(); + // Map of output file build variable names to a List of output file Path's + private final HashMap> buildOutVars = new HashMap>(); + // Map of dependency file build variable names to a List of GnuDependencyGroupInfo objects + private final HashMap buildDepVars = new HashMap(); private final LinkedHashMap topBuildOutVars = new LinkedHashMap(); // Dependency file variables // private Vector dependencyMakefiles; // IPath's - relative to the top build directory or absolute @@ -487,7 +486,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { */ private boolean collectDependencyGeneratorInformation( ToolInfoHolder h, - Vector depExts, // Vector of dependency file extensions + Vector depExts, // Vector of dependency file extensions IManagedDependencyGenerator2[] postProcessors) { boolean callPopulateDummyTargets = false; @@ -497,7 +496,6 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { if (depType != null) { int calcType = depType.getCalculatorType(); if (calcType <= IManagedDependencyGeneratorType.TYPE_OLD_TYPE_LIMIT) { - IManagedDependencyGenerator oldDepGen = (IManagedDependencyGenerator)depType; if (calcType == IManagedDependencyGeneratorType.TYPE_COMMAND) { callPopulateDummyTargets = true; depExts.add(DEP_EXT); @@ -529,7 +527,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } private class DepInfo { - Vector depExts; + Vector depExts; IManagedDependencyGenerator2[] postProcessors; boolean callPopulateDummyTargets; } @@ -545,7 +543,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { toolInfos.accept(new IPathSettingsContainerVisitor(){ public boolean visit(PathSettingsContainer container){ ToolInfoHolder h = (ToolInfoHolder)container.getValue(); - Vector depExts = new Vector(); // Vector of dependency file extensions + Vector depExts = new Vector(); // Vector of dependency file extensions IManagedDependencyGenerator2[] postProcessors = new IManagedDependencyGenerator2[h.buildTools.length]; boolean callPopulateDummyTargets = collectDependencyGeneratorInformation(h, depExts, postProcessors); @@ -570,10 +568,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { }); IWorkspaceRoot root = CCorePlugin.getWorkspace().getRoot(); - Iterator subDirs = getSubdirList().listIterator(); - while(subDirs.hasNext()) { + for (IResource res : getSubdirList()) { // The builder creates a subdir with same name as source in the build location - IContainer subDir = (IContainer)subDirs.next(); + IContainer subDir = (IContainer)res; IPath projectRelativePath = subDir.getProjectRelativePath(); IResourceInfo rcInfo = config.getResourceInfo(projectRelativePath, false); PathSettingsContainer cr = postProcs.getChildContainer(rcInfo.getPath(), false, true); @@ -589,12 +586,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Find all of the dep files in the generated subdirectories IResource[] files = buildFolder.members(); - for (int index = 0; index < files.length; ++index){ - IResource file = files[index]; + for (IResource file : files) { String fileExt = file.getFileExtension(); - Iterator iter = di.depExts.iterator(); - while (iter.hasNext()) { - String ext = (String)iter.next(); + for (String ext : di.depExts) { if (ext.equals(fileExt)) { IFile depFile = root.getFile(file.getFullPath()); if (depFile == null) continue; @@ -668,9 +662,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { checkCancel(); // Regenerate any fragments that are missing for the exisiting directories NOT modified - Iterator iter = getSubdirList().listIterator(); - while (iter.hasNext()) { - IContainer subdirectory = (IContainer)iter.next(); + for (IResource res : getSubdirList()) { + IContainer subdirectory = (IContainer)res; if (!getModifiedList().contains(subdirectory)) { // Make sure the directory exists (it may have been deleted) if (!subdirectory.exists()) { @@ -688,17 +681,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } // Delete the old dependency files for any deleted resources - iter = getDeletedFileList().listIterator(); - while (iter.hasNext()) { - IResource deletedFile = (IResource)iter.next(); + for (IResource deletedFile : getDeletedFileList()) { deleteDepFile(deletedFile); deleteBuildTarget(deletedFile); } // Regenerate any fragments for modified directories - iter = getModifiedList().listIterator(); - while (iter.hasNext()) { - IContainer subDir = (IContainer) iter.next(); + for (IResource res : getModifiedList()) { + IContainer subDir = (IContainer)res; // Make sure the directory exists (it may have been deleted) if (!subDir.exists()) { appendDeletedSubdirectory(subDir); @@ -713,9 +703,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // in order to re-populate the buildVariable lists. In the future, the list could // possibly segmented by subdir so that all fragments didn't need to be // regenerated - iter = getSubdirList().listIterator(); - while (iter.hasNext()) { - IContainer subDir = (IContainer)iter.next(); + for (IResource res : getSubdirList()) { + IContainer subDir = (IContainer)res; try { populateFragmentMakefile(subDir); } catch (CoreException e) { @@ -726,6 +715,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { checkCancel(); } + // Calculate the inputs and outputs of the Tools to be generated in the main makefile calculateToolInputsOutputs(); checkCancel(); @@ -737,9 +727,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { checkCancel(); // Remove deleted folders from generated build directory - iter = getDeletedDirList().listIterator(); - while (iter.hasNext()) { - IContainer subDir = (IContainer) iter.next(); + for (IResource res : getDeletedDirList()) { + IContainer subDir = (IContainer)res; removeGeneratedDirectory(subDir); checkCancel(); } @@ -753,13 +742,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { null); // Add a new status for each of the bad folders // TODO: fix error message - iter = getInvalidDirList().iterator(); - while (iter.hasNext()) { + for (IResource res : getInvalidDirList()) { + IContainer subDir = (IContainer)res; status.add(new Status ( IStatus.WARNING, ManagedBuilderCorePlugin.getUniqueIdentifier(), SPACES_IN_PATH, - ((IContainer)iter.next()).getFullPath().toString(), + subDir.getFullPath().toString(), null)); } } else { @@ -819,7 +808,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { public boolean visit(PathSettingsContainer container){ ToolInfoHolder h = (ToolInfoHolder)container.getValue(); // Collect the methods that will need to be called - Vector depExts = new Vector(); // Vector of dependency file extensions + Vector depExts = new Vector(); // Vector of dependency file extensions IManagedDependencyGenerator2[] postProcessors = new IManagedDependencyGenerator2[h.buildTools.length]; boolean callPopulateDummyTargets = collectDependencyGeneratorInformation(h, depExts, postProcessors); @@ -832,11 +821,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { if (i == postProcessors.length) return true; } - Iterator iter = getDependencyMakefiles(h).listIterator(); IResourceInfo rcInfo = config.getResourceInfo(container.getPath(), false); - while (iter.hasNext()) { + for (IPath path : getDependencyMakefiles(h)) { // The path to search for the dependency makefile - IPath relDepFilePath = topBuildDir.append((Path)iter.next()); + IPath relDepFilePath = topBuildDir.append(path); IFile depFile = root.getFile(relDepFilePath); if (depFile == null || !depFile.isAccessible()) continue; try { @@ -899,9 +887,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { checkCancel(); // Now populate the module makefiles - Iterator iter = getSubdirList().listIterator(); - while (iter.hasNext()) { - IContainer subDir = (IContainer)iter.next(); + for (IResource res : getSubdirList()) { + IContainer subDir = (IContainer)res; try { populateFragmentMakefile(subDir); } catch (CoreException e) { @@ -937,13 +924,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { null); // Add a new status for each of the bad folders // TODO: fix error message - iter = getInvalidDirList().iterator(); - while (iter.hasNext()) { + for (IResource dir : getInvalidDirList()) { status.add(new Status ( IStatus.WARNING, ManagedBuilderCorePlugin.getUniqueIdentifier(), SPACES_IN_PATH, - ((IContainer)iter.next()).getFullPath().toString(), + dir.getFullPath().toString(), null)); } } else { @@ -1004,16 +990,16 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Master list of "object" dependencies, i.e. dependencies between input files and output files. StringBuffer macroBuffer = new StringBuffer(); - List valueList; + List valueList; macroBuffer.append(addDefaultHeader()); // Map of macro names (String) to its definition (List of Strings) - HashMap outputMacros = new HashMap(); + HashMap> outputMacros = new HashMap>(); // Add the predefined LIBS, USER_OBJS macros // Add the libraries this project depends on - valueList = new ArrayList(); + valueList = new ArrayList(); String[] libs = config.getLibs(buildTargetExt); for (String lib : libs) { valueList.add(lib); @@ -1021,7 +1007,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { outputMacros.put("LIBS", valueList); //$NON-NLS-1$ // Add the extra user-specified objects - valueList = new ArrayList(); + valueList = new ArrayList(); String[] userObjs = config.getUserObjects(buildTargetExt); for (String obj : userObjs) { valueList.add(obj); @@ -1029,15 +1015,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { outputMacros.put("USER_OBJS", valueList); //$NON-NLS-1$ // Write every macro to the file - Iterator iterator = outputMacros.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - macroBuffer.append((String)entry.getKey() + " :="); //$NON-NLS-1$ - valueList = (List)entry.getValue(); - Iterator valueIter = valueList.iterator(); - while (valueIter.hasNext()) { - String path = (String) valueIter.next(); - + for (Entry> entry : outputMacros.entrySet()) { + macroBuffer.append(entry.getKey() + " :="); //$NON-NLS-1$ + valueList = entry.getValue(); + for (String path : valueList) { // These macros will also be used within commands. // Make all the slashes go forward so they aren't // interpreted as escapes and get lost. @@ -1052,7 +1033,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // terminate the macro definition line macroBuffer.append(NEWLINE); // leave a blank line before the next macro - if (iterator.hasNext()) macroBuffer.append(NEWLINE); + macroBuffer.append(NEWLINE); } // For now, just save the buffer that was populated when the rules were created @@ -1074,7 +1055,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { public boolean visit(PathSettingsContainer container){ ToolInfoHolder h = (ToolInfoHolder)container.getValue(); ITool[] buildTools = h.buildTools; - HashSet handledInputExtensions = new HashSet(); + HashSet handledInputExtensions = new HashSet(); String buildMacro; for (ITool buildTool : buildTools) { if(buildTool.getCustomBuildStep()) @@ -1089,7 +1070,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { handledInputExtensions.add(extensionName); buildMacro = getSourceMacroName(extensionName).toString(); if (!buildSrcVars.containsKey(buildMacro)) { - buildSrcVars.put(buildMacro, new ArrayList()); + buildSrcVars.put(buildMacro, new ArrayList()); } // Add any generated dependency file macros IManagedDependencyGeneratorType depType = buildTool.getDependencyGeneratorForExtension(extensionName); @@ -1104,7 +1085,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { (calcType != IManagedDependencyGeneratorType.TYPE_PREBUILD_COMMANDS))); } if (!buildOutVars.containsKey(buildMacro)) { - buildOutVars.put(buildMacro, new ArrayList()); + buildOutVars.put(buildMacro, new ArrayList()); } } } @@ -1116,14 +1097,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { for (IOutputType outputType : outTypes) { buildMacro = outputType.getBuildVariable(); if (!buildOutVars.containsKey(buildMacro)) { - buildOutVars.put(buildMacro, new ArrayList()); + buildOutVars.put(buildMacro, new ArrayList()); } } } else { // For support of pre-CDT 3.0 integrations. buildMacro = OBJS_MACRO; if (!buildOutVars.containsKey(buildMacro)) { - buildOutVars.put(buildMacro, new ArrayList()); + buildOutVars.put(buildMacro, new ArrayList()); } } } @@ -1131,16 +1112,13 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } }); // Add the macros to the makefile - Iterator iterator = buildSrcVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String macroName = (String)entry.getKey(); + for (Entry> entry : buildSrcVars.entrySet()) { + String macroName = entry.getKey(); buffer.append(macroName + WHITESPACE + ":=" + WHITESPACE + NEWLINE); //$NON-NLS-1$ } - iterator = buildOutVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String macroName = (String)entry.getKey(); + Set>> set = buildOutVars.entrySet(); + for (Entry> entry : set) { + String macroName = entry.getKey(); buffer.append(macroName + WHITESPACE + ":=" + WHITESPACE + NEWLINE); //$NON-NLS-1$ } @@ -1168,7 +1146,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { buffer.append(addMacros()); // List to collect needed build output variables - List outputVarsAdditionsList = new ArrayList(); + List outputVarsAdditionsList = new ArrayList(); // Determine target rules StringBuffer targetRules = addTargets(outputVarsAdditionsList, rebuild); @@ -1234,10 +1212,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // add an include for each subdir buffer.append("-include subdir.mk" + NEWLINE); //$NON-NLS-1$ - Iterator subDirIterator = getSubdirList().iterator(); - while(subDirIterator.hasNext()) - { - IContainer subDir = (IContainer)subDirIterator.next(); + for (IResource res : getSubdirList()) { + IContainer subDir = (IContainer)res; IPath projectRelativePath = subDir.getProjectRelativePath(); if(!projectRelativePath.toString().equals("")) //$NON-NLS-1$ @@ -1250,11 +1226,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { if (!buildDepVars.isEmpty()) { buffer.append("ifneq ($(MAKECMDGOALS),clean)" + NEWLINE); //$NON-NLS-1$ - Iterator iterator = buildDepVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String depsMacro = (String)entry.getKey(); - GnuDependencyGroupInfo info = (GnuDependencyGroupInfo)entry.getValue(); + for (Entry entry : buildDepVars.entrySet()) { + String depsMacro = entry.getKey(); + GnuDependencyGroupInfo info = entry.getValue(); buffer.append("ifneq ($(strip $(" + depsMacro + ")),)" + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$ if (info.conditionallyInclude) { buffer.append("-include $(" + depsMacro + ")" + NEWLINE); //$NON-NLS-1$ //$NON-NLS-2$ @@ -1282,7 +1256,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * @param rebuild * @return StringBuffer */ - private StringBuffer addTargets(List outputVarsAdditionsList, boolean rebuild) { + private StringBuffer addTargets(List outputVarsAdditionsList, boolean rebuild) { StringBuffer buffer = new StringBuffer(); // IConfiguration config = info.getDefaultConfiguration(); @@ -1393,7 +1367,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { */ // Vector managedProjectOutputs = new Vector(refdProjects.length); // if (refdProjects.length > 0) { - Vector managedProjectOutputs = new Vector(refConfigs.length); + Vector managedProjectOutputs = new Vector(refConfigs.length); if (refConfigs.length > 0) { boolean addDeps = true; // if (refdProjects != null) { @@ -1486,9 +1460,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Add the Secondary Outputs target, if needed if (secondaryOutputs.length > 0) { buffer.append(SECONDARY_OUTPUTS + COLON); - Vector outs2 = calculateSecondaryOutputs(secondaryOutputs); + Vector outs2 = calculateSecondaryOutputs(secondaryOutputs); for (int i=0; i outputVarsAdditionsList, Vector managedProjectOutputs, boolean postbuildStep) { StringBuffer buffer = new StringBuffer(); // Add the comment buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(BUILD_TOP) + NEWLINE); @@ -1576,10 +1549,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Always add a clean target buffer.append("clean:" + NEWLINE); //$NON-NLS-1$ buffer.append(TAB + "-$(RM)" + WHITESPACE); //$NON-NLS-1$ - Iterator iterator = buildOutVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String macroName = (String)entry.getKey(); + for (Entry> entry : buildOutVars.entrySet()) { + String macroName = entry.getKey(); buffer.append("$(" + macroName + ")"); //$NON-NLS-1$ //$NON-NLS-2$ } String outputPrefix = EMPTY_STRING; @@ -1614,16 +1585,16 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * @param bPostBuildStep Emit post-build step invocation */ protected boolean addRuleForTool(ITool tool, StringBuffer buffer, boolean bTargetTool, String targetName, String targetExt, - List outputVarsAdditionsList, Vector managedProjectOutputs, boolean bEmitPostBuildStepCall) { + List outputVarsAdditionsList, Vector managedProjectOutputs, boolean bEmitPostBuildStepCall) { // Get the tool's inputs and outputs - Vector inputs = new Vector(); - Vector dependencies = new Vector(); - Vector outputs = new Vector(); - Vector enumeratedPrimaryOutputs = new Vector(); - Vector enumeratedSecondaryOutputs = new Vector(); - Vector outputVariables = new Vector(); - Vector additionalTargets = new Vector(); + Vector inputs = new Vector(); + Vector dependencies = new Vector(); + Vector outputs = new Vector(); + Vector enumeratedPrimaryOutputs = new Vector(); + Vector enumeratedSecondaryOutputs = new Vector(); + Vector outputVariables = new Vector(); + Vector additionalTargets = new Vector(); String outputPrefix = EMPTY_STRING; if (!getToolInputsOutputs(tool, inputs, dependencies, outputs, @@ -1649,7 +1620,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { String primaryOutputsQuoted = EMPTY_STRING; boolean first = true; for (int i=0; i 0 || additionalTargets.size() > 0) { - String primaryOutput = (String)enumeratedPrimaryOutputs.get(0); - Vector addlOutputs = new Vector(); + String primaryOutput = enumeratedPrimaryOutputs.get(0); + Vector addlOutputs = new Vector(); addlOutputs.addAll(enumeratedSecondaryOutputs); addlOutputs.addAll(additionalTargets); for (int i=0; i outputVarsAdditionsList, StringBuffer buffer) { // Generate a build rule for any tool that consumes the output of this tool ToolInfoHolder h = (ToolInfoHolder)toolInfos.getValue(); ITool[] buildTools = h.buildTools; @@ -1823,10 +1794,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } protected boolean getToolInputsOutputs(ITool tool, - Vector inputs, Vector dependencies, Vector outputs, - Vector enumeratedPrimaryOutputs, Vector enumeratedSecondaryOutputs, - Vector outputVariables, Vector additionalTargets, - boolean bTargetTool, Vector managedProjectOutputs) { + Vector inputs, Vector dependencies, Vector outputs, + Vector enumeratedPrimaryOutputs, Vector enumeratedSecondaryOutputs, + Vector outputVariables, Vector additionalTargets, + boolean bTargetTool, Vector managedProjectOutputs) { ToolInfoHolder h = (ToolInfoHolder)toolInfos.getValue(); ITool[] buildTools = h.buildTools; ManagedBuildGnuToolInfo[] gnuToolInfos = h.gnuToolInfos; @@ -1847,17 +1818,16 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { enumeratedPrimaryOutputs.addAll(toolInfo.getEnumeratedPrimaryOutputs()); enumeratedSecondaryOutputs.addAll(toolInfo.getEnumeratedSecondaryOutputs()); outputVariables.addAll(toolInfo.getOutputVariables()); - Vector unprocessedDependencies = toolInfo.getCommandDependencies(); - for(Iterator i = unprocessedDependencies.iterator(); i.hasNext(); ) { - String path = (String) i.next(); + + Vector unprocessedDependencies = toolInfo.getCommandDependencies(); + for (String path : unprocessedDependencies) { dependencies.add(ensurePathIsGNUMakeTargetRuleCompatibleSyntax(path)); } additionalTargets.addAll(toolInfo.getAdditionalTargets()); if (bTargetTool && managedProjectOutputs != null) { - Iterator refIter = managedProjectOutputs.listIterator(); - while (refIter.hasNext()) { - dependencies.add(refIter.next()); + for (String output : managedProjectOutputs) { + dependencies.add(output); } } return true; @@ -1867,10 +1837,10 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * @param fileHandle * @throws CoreException */ - protected Vector calculateSecondaryOutputs(IOutputType[] secondaryOutputs) { + protected Vector calculateSecondaryOutputs(IOutputType[] secondaryOutputs) { ToolInfoHolder h = (ToolInfoHolder)toolInfos.getValue(); ITool[] buildTools = h.buildTools; - Vector buildVars = new Vector(); + Vector buildVars = new Vector(); for (int i=0; i 0) { - for (int j=0; j buildVarToRuleStringMap = new LinkedHashMap(); // Add statements that add the source files in this folder, // and generated source files, and generated dependency files // to the build macros - Iterator iterator = buildSrcVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String macroName = (String)entry.getKey(); + for (Entry> entry : buildSrcVars.entrySet()) { + String macroName = entry.getKey(); addMacroAdditionPrefix(buildVarToRuleStringMap, macroName, null, false); + } - iterator = buildOutVars.entrySet().iterator(); - while (iterator.hasNext()) { - Map.Entry entry = (Map.Entry)iterator.next(); - String macroName = (String)entry.getKey(); + for (Entry> entry : buildOutVars.entrySet()) { + String macroName = entry.getKey(); addMacroAdditionPrefix(buildVarToRuleStringMap, macroName, "./" + relativePath, false); //$NON-NLS-1$ } @@ -2045,7 +2008,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * if null, use the file extension to find the name * @param generatedSource if true, this file was generated by another tool in the tool-chain */ - protected void addFragmentMakefileEntriesForSource (LinkedHashMap buildVarToRuleStringMap, StringBuffer ruleBuffer, + protected void addFragmentMakefileEntriesForSource (LinkedHashMap buildVarToRuleStringMap, StringBuffer ruleBuffer, IFolder folder, String relativePath, IResource resource, IPath sourceLocation, IResourceInfo rcInfo, String varName, boolean generatedSource) { @@ -2093,9 +2056,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { for (ITool buildTool : buildTools) { if (buildTool.buildsFileType(ext)) { - if (tool == null) { - tool = buildTool; - } + tool = buildTool; addToBuildVar(buildVarToRuleStringMap, ext, varName, relativePath, sourceLocation, generatedSource); break; } @@ -2110,14 +2071,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { (inputType == null && tool != config.calculateTargetTool())) { // Try to add the rule for the file - Vector generatedOutputs = new Vector(); // IPath's - build directory relative - Vector generatedDepFiles = new Vector(); // IPath's - build directory relative or absolute + Vector generatedOutputs = new Vector(); // IPath's - build directory relative + Vector generatedDepFiles = new Vector(); // IPath's - build directory relative or absolute addRuleForSource(relativePath, ruleBuffer, resource, sourceLocation, rcInfo, generatedSource, generatedDepFiles, generatedOutputs); // If the rule generates a dependency file(s), add the file(s) to the variable if (generatedDepFiles.size() > 0) { for (int k=0; k 0) { - IPath firstOutput = (IPath)generatedOutputs.get(0); + IPath firstOutput = generatedOutputs.get(0); String firstExt = firstOutput.getFileExtension(); ToolInfoHolder tmpH = getFolderToolInfo(rcInfo.getPath()); ITool[] tmpBuildTools = tmpH.buildTools; @@ -2162,15 +2123,15 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { for (int k=0; ktrue, this file was generated by another tool in the tool-chain */ - protected void addToBuildVar (LinkedHashMap buildVarToRuleStringMap, String ext, + protected void addToBuildVar (LinkedHashMap buildVarToRuleStringMap, String ext, String varName, String relativePath, IPath sourceLocation, boolean generatedSource) { - List varList = null; + List varList = null; if (varName == null) { // Get the proper source build variable based upon the extension varName = getSourceMacroName(ext).toString(); - varList = (List)buildSrcVars.get(varName); + varList = buildSrcVars.get(varName); } else { - varList = (List)buildOutVars.get(varName); + varList = buildOutVars.get(varName); } // Add the resource to the list of all resources associated with a variable. // Do not allow duplicates - there is no reason to and it can be 'bad' - @@ -2338,11 +2299,11 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { */ protected void addRuleForSource(String relativePath, StringBuffer buffer, IResource resource, IPath sourceLocation, IResourceInfo rcInfo, - boolean generatedSource, Vector generatedDepFiles, Vector enumeratedOutputs) { + boolean generatedSource, Vector generatedDepFiles, Vector enumeratedOutputs) { String fileName = sourceLocation.removeFileExtension().lastSegment(); String inputExtension = sourceLocation.getFileExtension(); - String outputExtension; + String outputExtension = null; ITool tool = null; if( rcInfo instanceof IFileInfo) { @@ -2358,7 +2319,8 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { ToolInfoHolder h = getToolInfo(rcInfo.getPath()); - outputExtension = tool.getOutputExtension(inputExtension); + if (tool!=null) + outputExtension = tool.getOutputExtension(inputExtension); if(outputExtension == null) outputExtension = EMPTY_STRING; @@ -2371,7 +2333,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { IPath[] depFiles = null; boolean doDepGen = false; { - IManagedDependencyGeneratorType t = tool.getDependencyGeneratorForExtension(inputExtension); + IManagedDependencyGeneratorType t = null; + if (tool!=null) + t = tool.getDependencyGeneratorForExtension(inputExtension); if (t != null) { int calcType = t.getCalculatorType(); if (calcType <= IManagedDependencyGeneratorType.TYPE_OLD_TYPE_LIMIT) { @@ -2409,23 +2373,23 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Figure out the output paths String optDotExt = EMPTY_STRING; if (outputExtension != null && outputExtension.length() > 0) - optDotExt = DOT + outputExtension; + optDotExt = DOT + outputExtension; - Vector ruleOutputs = new Vector(); - Vector enumeratedPrimaryOutputs = new Vector(); // IPaths relative to the top build directory - Vector enumeratedSecondaryOutputs = new Vector(); // IPaths relative to the top build directory + Vector ruleOutputs = new Vector(); + Vector enumeratedPrimaryOutputs = new Vector(); // IPaths relative to the top build directory + Vector enumeratedSecondaryOutputs = new Vector(); // IPaths relative to the top build directory calculateOutputsForSource(tool, relativePath, resource, sourceLocation, ruleOutputs, enumeratedPrimaryOutputs, enumeratedSecondaryOutputs); enumeratedOutputs.addAll(enumeratedPrimaryOutputs); enumeratedOutputs.addAll(enumeratedSecondaryOutputs); String primaryOutputName = null; if (enumeratedPrimaryOutputs.size() > 0) { - primaryOutputName = escapeWhitespaces(((IPath)enumeratedPrimaryOutputs.get(0)).toString()); + primaryOutputName = escapeWhitespaces(enumeratedPrimaryOutputs.get(0).toString()); } else { primaryOutputName = escapeWhitespaces(relativePath + fileName + optDotExt); } String otherPrimaryOutputs = EMPTY_STRING; for (int i=1; i= 0) { patternRule = true; break; @@ -2553,7 +2517,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } else { boolean first = true; for (int i=0; i= 0) { if (first) { first = false; @@ -2642,7 +2606,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Generate the command line - Vector inputs = new Vector(); + Vector inputs = new Vector(); inputs.add(IN_MACRO); // Other additional inputs @@ -2661,7 +2625,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } inputs.add(addlPath.toString()); } - String[] inputStrings = (String[])inputs.toArray(new String[inputs.size()]); + String[] inputStrings = inputs.toArray(new String[inputs.size()]); String[] flags = null; // Get the tool command line options @@ -2842,7 +2806,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } // Add any additional outputs here using dependency lines - Vector addlOutputs = new Vector(); + Vector addlOutputs = new Vector(); if (enumeratedPrimaryOutputs.size() > 1) { // Starting with 1 is intentional in order to skip the primary output for (int i=1; i allRes = new ArrayList(); IInputType[] types = tool.getInputTypes(); for (IInputType type : types) { // Additional resources come from 2 places. @@ -3062,7 +3026,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } } } - return (IPath[])allRes.toArray(new IPath[allRes.size()]); + return allRes.toArray(new IPath[allRes.size()]); } @@ -3089,7 +3053,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * that are relative to the build directory */ protected void calculateOutputsForSource(ITool tool, String relativePath, IResource resource, - IPath sourceLocation, Vector ruleOutputs, Vector enumeratedPrimaryOutputs, Vector enumeratedSecondaryOutputs) { + IPath sourceLocation, Vector ruleOutputs, Vector enumeratedPrimaryOutputs, Vector enumeratedSecondaryOutputs) { String inExt = sourceLocation.getFileExtension(); String outExt = tool.getOutputExtension(inExt); IResourceInfo rcInfo = tool.getParentResourceInfo(); @@ -3175,7 +3139,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // 2. If an option is specified, use the value of the option if (option != null) { try { - List outputList = new ArrayList(); + List outputList = new ArrayList(); int optType = option.getValueType(); if (optType == IOption.STRING) { outputList.add(outputPrefix + option.getStringValue()); @@ -3187,7 +3151,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { optType == IOption.LIBRARY_PATHS || optType == IOption.LIBRARY_FILES || optType == IOption.MACRO_FILES) { - outputList = (List)option.getValue(); + outputList = (List)option.getValue(); ((Tool)tool).filterValues(optType, outputList); // Add outputPrefix to each if necessary if (outputPrefix.length() > 0) { @@ -3197,7 +3161,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } } for (int j=0; j deps = new Vector(); int type = depGen.getCalculatorType(); switch (type) { @@ -3451,7 +3415,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { default: break; } - return (IPath[])deps.toArray(new IPath[deps.size()]); + return deps.toArray(new IPath[deps.size()]); } /* (non-Javadoc) @@ -3529,12 +3493,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return a Set containing all of the output extensions */ - public Set getOutputExtensions(ToolInfoHolder h) { + public Set getOutputExtensions(ToolInfoHolder h) { if (h.outputExtensionsSet == null) { // The set of output extensions which will be produced by this tool. // It is presumed that this set is not very large (likely < 10) so // a HashSet should provide good performance. - h.outputExtensionsSet = new HashSet(); + h.outputExtensionsSet = new HashSet(); // For each tool for the target, lookup the kinds of sources it outputs // and add that to our list of output extensions. @@ -3587,7 +3551,6 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // The rest of this operation is equally expensive, so // if we are doing an incremental build, only update the // files that do not have a comment - if (inBuffer == null) return false; String inBufferString = inBuffer.toString(); if (!force && inBufferString.startsWith(COMMENT_SYMBOL)) { return false; @@ -3606,15 +3569,15 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } // Reconstruct the buffer tokens into useful chunks of dependency information - Vector bufferTokens = new Vector(Arrays.asList(inBufferString.split("\\s"))); //$NON-NLS-1$ - Vector deps = new Vector(bufferTokens.size()); - Iterator tokenIter = bufferTokens.iterator(); + Vector bufferTokens = new Vector(Arrays.asList(inBufferString.split("\\s"))); //$NON-NLS-1$ + Vector deps = new Vector(bufferTokens.size()); + Iterator tokenIter = bufferTokens.iterator(); while (tokenIter.hasNext()) { - String token = (String)tokenIter.next(); + String token = tokenIter.next(); if (token.lastIndexOf("\\") == token.length() - 1 && token.length() > 1) { //$NON-NLS-1$ // This is escaped so keep adding to the token until we find the end while (tokenIter.hasNext()) { - String nextToken = (String)tokenIter.next(); + String nextToken = tokenIter.next(); token += WHITESPACE + nextToken; if (!nextToken.endsWith("\\")) { //$NON-NLS-1$ break; @@ -3632,7 +3595,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // If we are doing an incremental build, only update the files that do not have a comment String firstToken; try { - firstToken = (String) deps.get(0); + firstToken = deps.get(0); } catch (ArrayIndexOutOfBoundsException e) { // This makes no sense so bail return false; @@ -3654,7 +3617,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Get the dep file name String secondToken; try { - secondToken = (String) deps.get(1); + secondToken = deps.get(1); } catch (ArrayIndexOutOfBoundsException e) { secondToken = new String(); } @@ -3668,7 +3631,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // The relative path to the build goal comes next String thirdToken; try { - thirdToken = (String) deps.get(2); + thirdToken = deps.get(2); } catch (ArrayIndexOutOfBoundsException e) { thirdToken = new String(); } @@ -3690,7 +3653,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { int nToken = 3; try { do { - fourthToken = (String) deps.get(nToken++); + fourthToken = deps.get(nToken++); } while (fourthToken.length() == 0); } catch (ArrayIndexOutOfBoundsException e) { @@ -3700,9 +3663,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // Followed by the actual dependencies try { - Iterator iter = deps.listIterator(nToken); - while (iter.hasNext()) { - String nextElement = (String)iter.next(); + for (String nextElement : deps) { if (nextElement.endsWith("\\")) { //$NON-NLS-1$ outBuffer.append(nextElement + NEWLINE + WHITESPACE); } else { @@ -3727,9 +3688,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { fo = (IFolderInfo)c.getResourceInfo(rcInfo.getPath().removeLastSegments(1), false); } // Dummy targets to add to the makefile - Iterator dummyIter = deps.iterator(); - while (dummyIter.hasNext()) { - String dummy = (String)dummyIter.next(); + for (String dummy : deps) { IPath dep = new Path(dummy); String extension = dep.getFileExtension(); if (fo.isHeaderFile(extension)) { @@ -3821,7 +3780,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * ${addprefix $(ROOT)/, \ */ // TODO fix comment - protected void addMacroAdditionPrefix(LinkedHashMap map, String macroName, String relativePath, boolean addPrefix) { + protected void addMacroAdditionPrefix(LinkedHashMap map, String macroName, String relativePath, boolean addPrefix) { // there is no entry in the map, so create a buffer for this macro StringBuffer tempBuffer = new StringBuffer(); tempBuffer.append(macroName + WHITESPACE + MACRO_ADDITION_PREFIX_SUFFIX); @@ -3838,7 +3797,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * File additions look like: * example.c, \ */ - protected void addMacroAdditionFile(HashMap map, String macroName, String filename) { + protected void addMacroAdditionFile(HashMap map, String macroName, String filename) { StringBuffer buffer = new StringBuffer(); buffer.append(map.get(macroName)); @@ -3855,7 +3814,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * File additions look like: * example.c, \ */ - protected void addMacroAdditionFile(HashMap map, String macroName, + protected void addMacroAdditionFile(HashMap map, String macroName, String relativePath, IPath sourceLocation, boolean generatedSource) { // Add the source file path to the makefile line that adds source files to the build variable String srcName; @@ -3887,11 +3846,11 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * File additions look like: * example.c, \ */ - public void addMacroAdditionFiles(HashMap map, String macroName, Vector filenames) { + public void addMacroAdditionFiles(HashMap map, String macroName, Vector filenames) { StringBuffer buffer = new StringBuffer(); buffer.append(map.get(macroName)); for (int i=0; i 0) { buffer.append(filename + WHITESPACE + LINEBREAK); } @@ -3903,16 +3862,12 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { /* (non-Javadoc) * Write all macro addition entries in a map to the buffer */ - protected StringBuffer writeAdditionMacros(LinkedHashMap map) { + protected StringBuffer writeAdditionMacros(LinkedHashMap map) { StringBuffer buffer = new StringBuffer(); // Add the comment buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MOD_VARS) + NEWLINE); - Collection bufferCollection = map.values(); - Iterator collectionIterator = bufferCollection.iterator(); - while(collectionIterator.hasNext()) - { - String macroString = collectionIterator.next().toString(); + for (String macroString : map.values()) { // Check if we added any files to the rule // Currently, we do this by comparing the end of the rule buffer to MACRO_ADDITION_PREFIX_SUFFIX if (!(macroString.endsWith(MACRO_ADDITION_PREFIX_SUFFIX))) { @@ -3932,20 +3887,20 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { // the whole file buffer.append(currentBuffer); } - } + } return buffer.append(NEWLINE); } /* (non-Javadoc) * Write all macro addition entries in a map to the buffer */ - protected StringBuffer writeTopAdditionMacros(List varList, HashMap varMap) { + protected StringBuffer writeTopAdditionMacros(List varList, HashMap varMap) { StringBuffer buffer = new StringBuffer(); // Add the comment buffer.append(COMMENT_SYMBOL + WHITESPACE + ManagedMakeMessages.getResourceString(MOD_VARS) + NEWLINE); for (int i=0; i map = getTopBuildOutputVars(); + Set>> set = buildOutVars.entrySet(); + for (Entry> entry : set) { + String macroName = entry.getKey(); addMacroAdditionPrefix(map, macroName, "", false); //$NON-NLS-1$ } // Set of input extensions for which macros have been created so far - HashSet handledDepsInputExtensions = new HashSet(); - HashSet handledOutsInputExtensions = new HashSet(); + HashSet handledDepsInputExtensions = new HashSet(); + HashSet handledOutsInputExtensions = new HashSet(); while (!done) { int[] testState = new int[doneState.length]; @@ -4112,7 +4066,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * variable have done so. * @return List */ - public List getBuildVariableList(ToolInfoHolder h, String variable, int locationType, IPath directory, boolean getAll) { + public List getBuildVariableList(ToolInfoHolder h, String variable, int locationType, IPath directory, boolean getAll) { ManagedBuildGnuToolInfo[] gnuToolInfos = h.gnuToolInfos; boolean done = true; for (int i=0; i list = buildSrcVars.get(variable); if (list == null) { - list = (List)buildOutVars.get(variable); + list = buildOutVars.get(variable); } - List fileList = null; + List fileList = null; if (list != null) { // Convert the items in the list to the location-type wanted by the caller, // and to a string list @@ -4138,14 +4092,14 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { } } for (int i=0; i(); } fileList.add(path.toString()); } @@ -4169,7 +4123,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return HashMap */ - public HashMap getBuildOutputVars() { + public HashMap> getBuildOutputVars() { return buildOutVars; } @@ -4188,9 +4142,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return List */ - protected Vector getRuleList() { + protected Vector getRuleList() { if (ruleList == null) { - ruleList = new Vector(); + ruleList = new Vector(); } return ruleList; } @@ -4201,9 +4155,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return List */ - protected Vector getDepLineList() { + protected Vector getDepLineList() { if (depLineList == null) { - depLineList = new Vector(); + depLineList = new Vector(); } return depLineList; } @@ -4214,9 +4168,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return List */ - protected Vector getDepRuleList() { + protected Vector getDepRuleList() { if (depRuleList == null) { - depRuleList = new Vector(); + depRuleList = new Vector(); } return depRuleList; } @@ -4499,9 +4453,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { /** * @return Returns the deletedDirList. */ - private Vector getDeletedDirList() { + private Vector getDeletedDirList() { if (deletedDirList == null) { - deletedDirList = new Vector(); + deletedDirList = new Vector(); } return deletedDirList; } @@ -4509,9 +4463,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { /* (non-Javadoc) * @return */ - private Vector getDeletedFileList() { + private Vector getDeletedFileList() { if (deletedFileList == null) { - deletedFileList = new Vector(); + deletedFileList = new Vector(); } return deletedFileList; } @@ -4519,9 +4473,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { /* (non-Javadoc) * @return */ - private List getDependencyMakefiles(ToolInfoHolder h) { + private List getDependencyMakefiles(ToolInfoHolder h) { if (h.dependencyMakefiles == null) { - h.dependencyMakefiles = new ArrayList(); + h.dependencyMakefiles = new ArrayList(); } return h.dependencyMakefiles; } @@ -4551,9 +4505,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return a a list of directories that are invalid for the build */ - private Vector getInvalidDirList() { + private Vector getInvalidDirList() { if (invalidDirList == null) { - invalidDirList = new Vector(); + invalidDirList = new Vector(); } return invalidDirList; } @@ -4562,9 +4516,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return Vector */ - private Vector getModifiedList() { + private Vector getModifiedList() { if (modifiedList == null) { - modifiedList = new Vector(); + modifiedList = new Vector(); } return modifiedList; } @@ -4574,9 +4528,9 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator2 { * * @return List */ - private Vector getSubdirList() { + private Vector getSubdirList() { if (subdirList == null) { - subdirList = new Vector(); + subdirList = new Vector(); } return subdirList; }