From 27d49dfd542d0a9b241790c30a01418c8316c339 Mon Sep 17 00:00:00 2001 From: Anna Dushistova Date: Wed, 2 May 2012 03:17:42 +0400 Subject: Patch for bug 366771 Change-Id: Ib95c2b9c475f25196d1c399d65b12c715f8e5e1e Reviewed-on: https://git.eclipse.org/r/5778 Reviewed-by: Doug Schaefer IP-Clean: Doug Schaefer Tested-by: Doug Schaefer --- .../cdt/managedbuilder/core/ManagedBuildManager.java | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'build/org.eclipse.cdt.managedbuilder.core') diff --git a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java index 590ce245604..7ce7087fe42 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java +++ b/build/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ManagedBuildManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2003, 2010 IBM Corporation and others. + * Copyright (c) 2003, 2012 IBM 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM - Initial API and implementation + * Anna Dushistova (MontaVista) - [366771]Converter fails to convert a CDT makefile project *******************************************************************************/ package org.eclipse.cdt.managedbuilder.core; @@ -4746,4 +4747,21 @@ public class ManagedBuildManager extends AbstractCExtension { } + /** + * Generic routine for checking the availability of converters for the given list of Build Objects. + * + * @return true if there are converters for at least one object in the given list of Build Objects. + * Returns false if there are no converters. + * @since 8.1 + */ + public static boolean hasAnyTargetConversionElements(List buildObjs) { + if (buildObjs != null && !buildObjs.isEmpty()) { + for (IBuildObject obj : buildObjs) { + if (hasTargetConversionElements(obj)) { + return true; + } + } + } + return false; + } } -- cgit v1.2.3