Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Gvozdev2010-11-04 16:32:55 -0400
committerAndrew Gvozdev2010-11-04 16:32:55 -0400
commit1fbb6f4b05ec8ac6cf83238a968acd6e0853ba9d (patch)
treedcb28de4c19bdf70c145c0f6bc8773dc25af648f
parent4f4bdf2cbfec7e6a2d88103a38c9d24e9507ef4a (diff)
downloadorg.eclipse.cdt-1fbb6f4b05ec8ac6cf83238a968acd6e0853ba9d.tar.gz
org.eclipse.cdt-1fbb6f4b05ec8ac6cf83238a968acd6e0853ba9d.tar.xz
org.eclipse.cdt-1fbb6f4b05ec8ac6cf83238a968acd6e0853ba9d.zip
tidied up a bit
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/CreateIncludeFolder.java25
1 files changed, 12 insertions, 13 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/CreateIncludeFolder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/CreateIncludeFolder.java
index 4908b24f3a..d9691af477 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/CreateIncludeFolder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/templateengine/processes/CreateIncludeFolder.java
@@ -30,15 +30,15 @@ import org.eclipse.core.runtime.IProgressMonitor;
/**
* Creates a include Folder to the project.
- *
+ *
* @noextend This class is not intended to be subclassed by clients.
* @noinstantiate This class is not intended to be instantiated by clients.
*/
public class CreateIncludeFolder extends CreateSourceFolder {
-
+
/**
* This method Creates a include Folder to the project.
- *
+ *
*/
@Override
public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
@@ -49,14 +49,14 @@ public class CreateIncludeFolder extends CreateSourceFolder {
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(projectHandle);
try {
IConfiguration[] configs = info.getManagedProject().getConfigurations();
- for(int i=0; i<configs.length; i++) {
+ for (IConfiguration config : configs) {
String path = projectHandle.getFolder(targetPath).getLocation().toOSString();
- IToolChain toolChain = configs[i].getToolChain();
- setIncludePathOptionForConfig(path, configs[i], toolChain.getOptions(), toolChain);
-
- ITool[] tools = configs[i].getTools();
- for(int j=0; j<tools.length; j++) {
- setIncludePathOptionForConfig(path, configs[i], tools[j].getOptions(), tools[j]);
+ IToolChain toolChain = config.getToolChain();
+ setIncludePathOptionForConfig(path, config, toolChain.getOptions(), toolChain);
+
+ ITool[] tools = config.getTools();
+ for (ITool tool : tools) {
+ setIncludePathOptionForConfig(path, config, tool.getOptions(), tool);
}
}
} catch (BuildException e) {
@@ -66,8 +66,7 @@ public class CreateIncludeFolder extends CreateSourceFolder {
}
private void setIncludePathOptionForConfig(String path, IConfiguration config, IOption[] options, IHoldsOptions optionHolder) throws BuildException {
- for (int i = 0; i < options.length; i++) {
- IOption option = options[i];
+ for (IOption option : options) {
if (option.getValueType() == IOption.INCLUDE_PATH) {
String[] includePaths = option.getIncludePaths();
String[] newPaths = new String[includePaths.length + 1];
@@ -77,5 +76,5 @@ public class CreateIncludeFolder extends CreateSourceFolder {
}
}
}
-
+
}

Back to the top