Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorMikhail Sennikovsky2006-06-16 10:00:46 +0000
committerMikhail Sennikovsky2006-06-16 10:00:46 +0000
commit74e3308a05729aeaf4841395f96c1c1d10c7764f (patch)
treee344f7be8b7894d316b34bdba378db102de8ae40 /build
parenta94a0fef4947ab0e5a448ff37565105e2d7e14ac (diff)
downloadorg.eclipse.cdt-74e3308a05729aeaf4841395f96c1c1d10c7764f.tar.gz
org.eclipse.cdt-74e3308a05729aeaf4841395f96c1c1d10c7764f.tar.xz
org.eclipse.cdt-74e3308a05729aeaf4841395f96c1c1d10c7764f.zip
Fix for bugs 140854 and 147296
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java7
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java14
-rw-r--r--build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java4
3 files changed, 15 insertions, 10 deletions
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
index 7e67debf426..c9e35875a3a 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Builder.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2004, 2005 Intel Corporation and others.
+ * Copyright (c) 2004, 2006 Intel Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -11,6 +11,7 @@
package org.eclipse.cdt.managedbuilder.internal.core;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.List;
import java.util.SortedMap;
import java.util.StringTokenizer;
@@ -830,8 +831,8 @@ public class Builder extends BuildObject implements IBuilder {
String version = ManagedBuildManager
.getVersionFromIdAndVersion(superClassId);
- IBuilder[] builderElements = (IBuilder[]) subMap.values()
- .toArray();
+ Collection c = subMap.values();
+ IBuilder[] builderElements = (IBuilder[])c.toArray(new IBuilder[c.size()]);
for (int i = 0; i < builderElements.length; i++) {
IBuilder builderElement = builderElements[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
index 8c372adc2f4..29be346b3e3 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java
@@ -13,6 +13,7 @@ package org.eclipse.cdt.managedbuilder.internal.core;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -26,12 +27,12 @@ import org.eclipse.cdt.managedbuilder.core.IBuildObject;
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
import org.eclipse.cdt.managedbuilder.core.IEnvVarBuildPath;
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
-import org.eclipse.cdt.managedbuilder.core.IManagedProject;
-import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
import org.eclipse.cdt.managedbuilder.core.IInputType;
import org.eclipse.cdt.managedbuilder.core.IManagedCommandLineGenerator;
import org.eclipse.cdt.managedbuilder.core.IManagedConfigElement;
+import org.eclipse.cdt.managedbuilder.core.IManagedProject;
import org.eclipse.cdt.managedbuilder.core.IOption;
+import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
import org.eclipse.cdt.managedbuilder.core.IOptionCategory;
import org.eclipse.cdt.managedbuilder.core.IOutputType;
import org.eclipse.cdt.managedbuilder.core.IProjectType;
@@ -49,12 +50,12 @@ import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator;
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGeneratorType;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ProjectScope;
-import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.PluginVersionIdentifier;
import org.eclipse.core.runtime.content.IContentType;
@@ -2631,14 +2632,15 @@ public class Tool extends HoldsOptions implements ITool, IOptionCategory {
// for each element in the 'subMap',
// check the 'versionsSupported' attribute whether the given
- // builder version is supported
+ // tool version is supported
String baseId = ManagedBuildManager
.getIdFromIdAndVersion(superClassId);
String version = ManagedBuildManager
.getVersionFromIdAndVersion(superClassId);
- ITool[] toolElements = (ITool[]) subMap.values().toArray();
+ Collection c = subMap.values();
+ ITool[] toolElements = (ITool[]) c.toArray(new ITool[c.size()]);
for (int i = 0; i < toolElements.length; i++) {
ITool toolElement = toolElements[i];
diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
index 2b8298b52ba..83b6cb3a2f6 100644
--- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
+++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolChain.java
@@ -11,6 +11,7 @@
package org.eclipse.cdt.managedbuilder.internal.core;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
@@ -1582,7 +1583,8 @@ public class ToolChain extends HoldsOptions implements IToolChain {
String baseId = ManagedBuildManager.getIdFromIdAndVersion(superClassId);
String version = getVersionFromId().toString();
- IToolChain[] toolChainElements = (IToolChain[]) subMap.values().toArray();
+ Collection c = subMap.values();
+ IToolChain[] toolChainElements = (IToolChain[]) c.toArray(new IToolChain[c.size()]);
for (int i = 0; i < toolChainElements.length; i++) {
IToolChain toolChainElement = toolChainElements[i];

Back to the top