From aed28a38616b27abbf277e84b7615582438d9f15 Mon Sep 17 00:00:00 2001 From: Sean Evoy Date: Wed, 4 Aug 2004 21:00:40 +0000 Subject: [PATCH] Fix fog bugzilla 69112 -- The managed build manager now returns a default makefile generator rather than NULL --- .../core/tests/ManagedBuildCoreTests.java | 3 ++ .../schema/ManagedBuildTools.exsd | 40 +++++++++++-------- .../core/ManagedBuildManager.java | 4 +- .../makegen/gnu/GnuMakefileGenerator.java | 2 +- 4 files changed, 31 insertions(+), 18 deletions(-) diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java index 05af8f87225..0e81ec2c223 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuild/core/tests/ManagedBuildCoreTests.java @@ -1053,6 +1053,9 @@ public class ManagedBuildCoreTests extends TestCase { assertEquals(true, options[3].getBooleanValue()); tool = tools[0]; assertEquals("-Ld -Le -Lf -b overridden -stralsooverridden -e2", tool.getToolFlags()); + + // Make sure that the build manager returns the default makefile generator (not null) + assertNotNull(ManagedBuildManager.getMakefileGenerator(target.getId())); } /* diff --git a/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd b/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd index 9c5e7a1dcd4..ebda6aa564e 100644 --- a/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd +++ b/build/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd @@ -106,7 +106,7 @@ - This is an optional field that specifies the class that provides the dependency calculation for a given tool. This field is unused in CDT 1.2. + This is an optional field that specifies the class that provides the source file dependency calculation for a given tool. You can replace the default calculator with a class that implements the <code>IManagedDependencyGenerator</code> interface. @@ -242,13 +242,20 @@ Additional special types exist to flag options of special relevance to the build - + This field is unused in 2.0 + + + + Specifies a "tip" that can be displayed in hover help or on the property page. Not implemented in 2.0. + + + @@ -330,7 +337,7 @@ Additional special types exist to flag options of special relevance to the build - + The unique ID of the tool that the reference is for. @@ -379,21 +386,22 @@ Additional special types exist to flag options of special relevance to the build - The ID of the option the reference is for. + The unique ID of the option the reference is for. - + This field is used to record the value of the option that the user has set in the build settings file. For example, if the user has set the verbose flag to true, the project's build settings file will contain an option reference for the verbose option, with the defaultvalue set to true. +<p>The attribute is also used to override the default option setting for a configuration in a toolchain. For example, a 'Debug' configuration may setthe value of a debug flag differently than the default value defined in the tool. - + This field is unused in 2.0 @@ -422,7 +430,7 @@ Additional special types exist to flag options of special relevance to the build - A human-readable target name, such as 'Linux Executable'. This will be the name the user sees displayed in the UI. + A human-readable target name, such as 'Executable'. This will be the name the user sees displayed in the UI. @@ -471,14 +479,14 @@ Additional special types exist to flag options of special relevance to the build - + Specifies the default command to start the build utility for your toolchain. If the user changes this through the UI, the overriden value will be stored in the project build file. The build model will default to this value if the user ever resets a change. - + Specifies the additional, default arguments that will be passed to the build utility when it is called by the builder. If the user changes the flags through the UI, the overriden value will be stored in the project build settings file. The build model will default to this value if the user ever resets a change. @@ -513,7 +521,7 @@ Additional special types exist to flag options of special relevance to the build - + Specifies a class that implements the <code>IManagedScannerInfoCollector</code> for gathering the built-in compiler settings for a toolchain. @@ -523,7 +531,7 @@ Additional special types exist to flag options of special relevance to the build - + Allows you to supply a custom makefile generator that conforms to the <code>IManagedBuilderMakefileGenerator</code> interface. @@ -557,7 +565,7 @@ Additional special types exist to flag options of special relevance to the build - Option categories can be nested inside other option categories. This is the ID of the owner of the category. + Option categories can belong to a tool or be nested inside other option categories. This is the ID of the owner of the category. @@ -598,10 +606,10 @@ Additional special types exist to flag options of special relevance to the build - + The class that implements the <code>IManagedConfigElementProvider</code> interface. The logic of determining the elements is left to the implementer, but they must be correctly formed or the build model will have trouble loading. - + @@ -633,7 +641,7 @@ Version identifier for the managed build extension point. It is a string represe - + The actual string containing the three version tokens. @@ -723,7 +731,7 @@ Version identifier for the managed build extension point. It is a string represe - Copyright (c) 2003 IBM Corporation and others. + Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Common Public License v1.0 which accompanies this distribution, and is available on the <a href="http://www.eclipse.org/legal/cpl-v10.html"> Eclipse</a> website. 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 c10f5b8cbdb..0d3e4eeca98 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 @@ -49,6 +49,7 @@ import org.eclipse.cdt.managedbuilder.internal.core.Target; import org.eclipse.cdt.managedbuilder.internal.core.Tool; import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator; import org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderMakefileGenerator; +import org.eclipse.cdt.managedbuilder.makegen.gnu.GnuMakefileGenerator; import org.eclipse.cdt.managedbuilder.scannerconfig.IManagedScannerInfoCollector; import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; @@ -340,7 +341,8 @@ public class ManagedBuildManager extends AbstractCExtension implements IScannerI catch (CoreException e) { // Probably not defined } - return null; + // If no generator is defined, return the default GNU generator + return new GnuMakefileGenerator(); } /** 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 fda02ca13f0..f6c03a02f55 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 @@ -487,7 +487,7 @@ public class GnuMakefileGenerator implements IManagedBuilderMakefileGenerator { } /* (non-javadoc) - * Answers a StrinBuffer containing all of the required targets to + * Answers a StringBuffer containing all of the required targets to * properly build the project. * * @return StringBuffer