Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-patch] Fixes for 42648 and 43122.

Lots of detail in the change logs. Suffice it to say that the new project 
wizard now filters out targets that should not be selected by the user, 
and that the build model handles inherited option references properly now. 
Tested on all the platforms.

Sean Evoy
Rational Software - IBM Software Group
Ottawa, Ontario, Canada

Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/plugin.xml,v
retrieving revision 1.11
diff -u -r1.11 plugin.xml
--- plugin.xml	24 Sep 2003 14:20:44 -0000	1.11
+++ plugin.xml	25 Sep 2003 20:19:29 -0000
@@ -37,7 +37,8 @@
             isAbstract="false"
             makeCommand="make"
             binaryParser="org.eclipse.cdt.core.PE"
-            makeFlags="-k">
+            makeFlags="-k"
+            osList="win32">
          <tool
                sources="foo,bar"
                name="Root Tool"
@@ -118,6 +119,28 @@
                </optionReference>
             </toolReference>
          </configuration>
+         <configuration
+               name="Complete Override Config"
+               id="complete.override.config">
+            <toolReference
+                  id="root.tool">
+               <optionReference
+                     id="string.option"
+                     defaultValue="overridden">
+               </optionReference>
+               <optionReference
+                     id="boolean.option"
+                     defaultValue="true">
+               </optionReference>
+               <optionReference
+                     defaultValue="-e2"
+                     id="enumerated.option">
+               </optionReference>
+               <optionReference
+                     id="list.option">
+               </optionReference>
+            </toolReference>
+         </configuration>
       </target>
       <target
             name="Test Sub"
@@ -128,7 +151,8 @@
             isAbstract="false"
             binaryParser="org.eclipse.cdt.core.PE"
             makeFlags="-d"
-            parent="test.root">
+            parent="test.root"
+            osList="win32,linux,solaris">
          <configuration
                name="Sub Config"
                id="sub.config">
Index: build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java,v
retrieving revision 1.9
diff -u -r1.9 ManagedBuildTests.java
--- build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java	25 Sep 2003 19:14:50 -0000	1.9
+++ build/org/eclipse/cdt/core/build/managed/tests/ManagedBuildTests.java	25 Sep 2003 20:19:30 -0000
@@ -32,6 +32,7 @@
 import org.eclipse.cdt.managedbuilder.core.ITool;
 import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
 import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
+import org.eclipse.cdt.managedbuilder.internal.core.OptionReference;
 import org.eclipse.cdt.managedbuilder.internal.core.ToolReference;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IProjectDescription;
@@ -156,7 +157,7 @@
 		// These are the expected path settings
 		final String[] expectedPaths = new String[4];
 		// This first path is a built-in, so it will not be manipulated by build manager
-		expectedPaths[0] = "/usr/gnu/include";
+	 	expectedPaths[0] = "/usr/gnu/include";
 		expectedPaths[1] = (new Path("/usr/include")).toOSString();
 		expectedPaths[2] = (new Path("/opt/gnome/include")).toOSString();
 		expectedPaths[3] = (new Path("C:\\home\\tester/include")).toOSString();
@@ -187,9 +188,9 @@
 				
 		// Change the default configuration to the sub config
 		IConfiguration[] configs = newTarget.getConfigurations();
-		assertEquals(3, configs.length);
+		assertEquals(4, configs.length);
 		IManagedBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project);
-		buildInfo.setDefaultConfiguration(newTarget.getConfiguration("sub.config.2"));
+		buildInfo.setDefaultConfiguration(newTarget.getConfiguration(configs[3].getId()));
 
 		// Use the plugin mechanism to discover the supplier of the path information
 		IExtensionPoint extensionPoint = CCorePlugin.getDefault().getDescriptor().getExtensionPoint("ScannerInfoProvider");
@@ -275,6 +276,8 @@
 		String rootName = "Root Config";
 		String overrideConfigId = "test.root.1.1";
 		String overrideName = "Root Override Config";
+		String completeOverrideConfigId = "test.root.1.2";
+		String completeOverrideName = "Complete Override Config";
 		
 		// Open the test project
 		IProject project = createProject(projectName);
@@ -284,16 +287,18 @@
 		assertEquals(1, definedTargets.length);
 		ITarget rootTarget = definedTargets[0];
 		IConfiguration[] definedConfigs = rootTarget.getConfigurations(); 		
-		assertEquals(2, definedConfigs.length);
+		assertEquals(3, definedConfigs.length);
 		IConfiguration baseConfig = definedConfigs[0];
 		assertEquals(definedConfigs[0].getId(), rootConfigId);
 		assertEquals(definedConfigs[0].getName(), rootName);
 		assertEquals(definedConfigs[1].getId(), overrideConfigId);
 		assertEquals(definedConfigs[1].getName(), overrideName);
+		assertEquals(definedConfigs[2].getId(), completeOverrideConfigId);
+		assertEquals(definedConfigs[2].getName(), completeOverrideName);
 		
 		// Create a new configuration and test the rename function
 		IConfiguration newConfig = rootTarget.createConfiguration(baseConfig, testConfigId);
-		assertEquals(3, rootTarget.getConfigurations().length);
+		assertEquals(4, rootTarget.getConfigurations().length);
 		newConfig.setName(testConfigName);
 		assertEquals(newConfig.getId(), testConfigId);
 		assertEquals(newConfig.getName(), testConfigName);
@@ -332,10 +337,10 @@
 		assertEquals(1, definedTargets.length);
 		rootTarget = definedTargets[0];
 		definedConfigs = rootTarget.getConfigurations(); 		
-		assertEquals(3, definedConfigs.length);
+		assertEquals(4, definedConfigs.length);
 		rootTarget.removeConfiguration(testConfigId);
 		definedConfigs = rootTarget.getConfigurations(); 		
-		assertEquals(2, definedConfigs.length);
+		assertEquals(3, definedConfigs.length);
 		assertEquals(definedConfigs[0].getId(), rootConfigId);
 		assertEquals(definedConfigs[0].getName(), rootName);
 		assertEquals(definedConfigs[1].getId(), overrideConfigId);
@@ -554,7 +559,7 @@
 
 		// Now get the configs
 		IConfiguration[] definedConfigs = rootTarget.getConfigurations(); 		
-		assertEquals(3, definedConfigs.length);
+		assertEquals(4, definedConfigs.length);
 		IConfiguration newConfig = rootTarget.getConfiguration(testConfigId);
 		assertNotNull(newConfig);
 
@@ -603,11 +608,13 @@
 		// Target stuff
 		String expectedCleanCmd = "del /myworld";
 		String expectedParserId = "org.eclipse.cdt.core.PE";
+		String[] expectedOSList = {"win32"};
 		assertTrue(target.isTestTarget());
 		assertEquals(target.getDefaultExtension(), rootExt);
 		assertEquals(expectedCleanCmd, target.getCleanCommand());
 		assertEquals("make", target.getMakeCommand());
 		assertEquals(expectedParserId, target.getBinaryParserId());
+		assertTrue(Arrays.equals(expectedOSList, target.getTargetOSList()));
 		
 		// Tools
 		ITool[] tools = target.getTools();
@@ -663,8 +670,10 @@
 		assertEquals("String Option in Category", options[0].getName());
 		assertEquals("Enumerated Option in Category", options[1].getName());
 
-		// Configs
+		// There should be 3 defined configs
 		IConfiguration[] configs = target.getConfigurations();
+		assertEquals(3, configs.length);
+		
 		// Root Config
 		IConfiguration rootConfig = configs[0];
 		assertEquals("Root Config", rootConfig.getName());
@@ -679,7 +688,7 @@
 		assertEquals("doIt", tools[0].getToolCommand());
 		assertEquals("", tools[0].getOutputPrefix());
 
-		// Root Override Config
+		// Partially Overriden Configuration
 		assertEquals("Root Override Config", configs[1].getName());
 		tools = configs[1].getTools();
 		assertEquals(1, tools.length);
@@ -693,6 +702,8 @@
 		assertEquals("a", valueList[0]);
 		assertEquals("b", valueList[1]);
 		assertEquals("Boolean Option in Top", options[1].getName());
+		assertEquals(true, options[1].getBooleanValue());
+		assertEquals("-b", options[1].getCommand());
 		categories = topCategory.getChildCategories();
 		options = categories[0].getOptions(configs[1]);
 		assertEquals(2, options.length);
@@ -712,6 +723,41 @@
 		assertTrue(tools[0].buildsFileType("bar"));
 		assertTrue(tools[0].producesFileType("toor"));
 		assertEquals("doIt", tools[0].getToolCommand());
+		
+		// Completely Overridden configuration
+		assertEquals("Complete Override Config", configs[2].getName());
+		tools = configs[2].getTools();
+		assertEquals(1, tools.length);
+		assertTrue(tools[0] instanceof ToolReference);
+		assertEquals("Root Tool", tools[0].getName());
+		topCategory = tools[0].getTopOptionCategory();
+		options = topCategory.getOptions(configs[2]);
+		assertEquals(2, options.length);
+		// Check that there's an empty string list and a true boolean (commands should not have changed)
+		assertTrue(options[0] instanceof OptionReference);
+		assertEquals("List Option in Top", options[0].getName());
+		assertEquals(IOption.STRING_LIST, options[0].getValueType());
+		valueList = options[0].getStringListValue();
+		assertTrue(valueList.length == 0);
+		assertEquals("-L", options[0].getCommand());
+		assertEquals("Boolean Option in Top", options[1].getName());
+		assertTrue(options[1] instanceof OptionReference);
+		assertEquals("Boolean Option in Top", options[1].getName());
+		assertEquals(IOption.BOOLEAN, options[1].getValueType());
+		assertEquals(true, options[1].getBooleanValue());
+		assertEquals("-b", options[1].getCommand());
+		// Check that there's an overridden enumeration and string
+		categories = topCategory.getChildCategories();
+		options = categories[0].getOptions(configs[2]);
+		assertEquals(2, options.length);
+		assertTrue(options[0] instanceof OptionReference);
+		assertEquals("String Option in Category", options[0].getName());
+		assertEquals(IOption.STRING, options[0].getValueType());
+		assertEquals("overridden", options[0].getStringValue());
+		assertTrue(options[1] instanceof OptionReference);
+		assertEquals("Enumerated Option in Category", options[1].getName());
+		assertEquals(IOption.ENUMERATED, options[1].getValueType());
+		assertEquals("-e2", options[1].getSelectedEnum());
 	}
 
 	/*
@@ -724,6 +770,9 @@
 		assertEquals("nmake", target.getMakeCommand());
 		// Make sure we get the proper binary parser
 		assertEquals("org.eclipse.cdt.core.ELF", target.getBinaryParserId());
+		// Make sure the list is inherited
+		String[] expectedOSList = {"win32","linux","solaris"};
+		assertTrue(Arrays.equals(expectedOSList, target.getTargetOSList()));
 	}
 
 	/*
@@ -740,6 +789,8 @@
 		assertEquals("make", target.getMakeCommand());
 		// Make sure the binary parser is hard-coded and available
 		assertEquals("org.eclipse.cdt.core.PE", target.getBinaryParserId());
+		String[] expectedOSList = {"win32","linux","solaris"};
+		assertTrue(Arrays.equals(expectedOSList, target.getTargetOSList()));
 
 		// Make sure this is a test target
 		assertTrue(target.isTestTarget());
@@ -791,15 +842,14 @@
 		assertEquals("C:\\home\\tester/include", moreIncPath[0]);
 		assertEquals("-I", subOpts[2].getCommand());
 
-		// Get the configs for this target
+		// Get the configs for this target; it should inherit all the configs defined for the parent
 		IConfiguration[] configs = target.getConfigurations();
-		// Check inheritance
+		assertEquals(4, configs.length);
 		IConfiguration rootConfig = configs[0];
 		assertEquals("Root Config", rootConfig.getName());
 		assertEquals("Root Override Config", configs[1].getName());
-		// Check the defined config for target
-		IConfiguration subConfig = configs[2];
-		assertEquals("Sub Config", subConfig.getName());
+		assertEquals("Complete Override Config", configs[2].getName());
+		assertEquals("Sub Config", configs[3].getName());
 	}
 
 	/**
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/ChangeLog,v
retrieving revision 1.5
diff -u -r1.5 ChangeLog
--- ChangeLog	25 Sep 2003 03:19:24 -0000	1.5
+++ ChangeLog	25 Sep 2003 20:19:43 -0000
@@ -1,3 +1,46 @@
+2003-09-25 Sean Evoy
+	This patch contains a lot of changes needed to implement fixes for 42648 and 
+	43122. 
+
+	For 42648, the schema for the the target had to be modified to include a 
+	comma-separated list of valid host platforms.
+	* schema/ManagedBuildTools.exsd
+	
+	The target had to be updated to properly read in and understand this info, and
+	the interface had to be updated to return a list to the clients in the UI. The 
+	target was also changed slightly. It now uses a safer accessor method to get at 
+	the list of tools it maintains. I have also stopped persisting non-variant info 
+	to the project file on serialize. There are elements of the target that are not 
+	subject to change by the user (yet) so they should not be saved.
+	* src/org/eclipse/cdt/managedbuilder/core/ITarget.java
+	* src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
+	
+	For 43122, I started by simply adding a tool reference to the configurations. 
+	The tool reference had option references for debug and optimization levels. It 
+	should have worked, but the model was not handling the inheritance properly. The 
+	JUnit tests were not finding it because of how they were configured. It was most 
+	evident in the UI. So, the way configurations and tool reference search for 
+	overridden option references had to be modified. While I was in there, I cleaned 
+	up some of the accessor and iteration code in ToolReference and OptionReference.
+	
+	For the configuration, the only significant change was a new search method to 
+	find all option references for a given tool, no matter where they are stored. 
+	The method had to consider what was overridden in a child config, what was added by 
+	a child config, and what the parent (or parents) define.
+	* src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
+	
+	Option reference now pays attention to overidden values in the plugin file. Until 
+	now, it only handled the overrides in the project file.
+	* src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
+
+	The ToolReference now distinguishes between local option references which it 
+	manages directly, and option references held by tool references in the parent(s) 
+	of its owner. It only serializes its own references, but when asked for options 
+	relating to the tool it references, it replies with all option references in its 
+	hierarchy.
+	* src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
+	
+
 2003-09-24 Sean Evoy
 	Changed the implementor of IScannerInfo to answer only absolute paths when asked for 
 	includes paths. Users will specify the includes paths in the managed build UI in such a way
Index: schema/ManagedBuildTools.exsd
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/schema/ManagedBuildTools.exsd,v
retrieving revision 1.2
diff -u -r1.2 ManagedBuildTools.exsd
--- schema/ManagedBuildTools.exsd	22 Sep 2003 02:32:08 -0000	1.2
+++ schema/ManagedBuildTools.exsd	25 Sep 2003 20:19:43 -0000
@@ -142,8 +142,8 @@
          <attribute name="valueType" use="default" value="string">
             <annotation>
                <documentation>
-                  General options can be one of the following types; &apos;string&apos; for catch-all entries for options that cannot be easily defined any other way, &apos;string list&apos; for entries that consist of a list of values such as defined symbols or paths, &apos;boolean&apos; for options that have two values, and &apos;enumerated&apos; for options that are one-of a list of values.
-
+                  General options can be one of the following types; &apos;string&apos; for catch-all entries for options that cannot be easily defined any other way, &apos;string list&apos; for entries that consist of a list of values such as defined symbols or paths, &apos;boolean&apos; for options that have two values, and &apos;enumerated&apos; for options that are one-of a list of values.
+
 Two additional types exist to flag options of special relevance to the build model; &apos;include&apos;, and &apos;definedSymbols&apos;. You can pre-populate with optionValues, and they will display in the UI the same way the &apos;StringList&apos; options do. The build model will look specifically for these value types when clients query for include paths and preprocessor defines.
                </documentation>
             </annotation>
@@ -394,6 +394,13 @@
                </documentation>
             </annotation>
          </attribute>
+         <attribute name="osList" type="string">
+            <annotation>
+               <documentation>
+                  This field is used by the managed build system to decide when to show the user the target. The value should be a comma-separated list. Current values are &quot;win32&quot;, &quot;linux&quot;, and &quot;solaris&quot;.
+               </documentation>
+            </annotation>
+         </attribute>
       </complexType>
    </element>
 
@@ -466,48 +473,48 @@
          <meta.section type="examples"/>
       </appInfo>
       <documentation>
-         The following is an example of the extension point usage:
-&lt;p&gt;
-&lt;pre&gt;
-   &lt;extension
-         id=&quot;buildExample&quot;
-         name=&quot;Tools for Build Example&quot;
-         point=&quot;org.eclipse.cdt.core.ManagedBuildInfo&quot;&gt;
-      &lt;target
-            makeFlags=&quot;-k&quot;
-            isTest=&quot;false&quot;
-            cleanCommand=&quot;rm -rf&quot;
-            name=&quot;Executable&quot;
-            defaultExtension=&quot;.exe&quot;
-            isAbstract=&quot;false&quot;
-            makeCommand=&quot;make&quot;
-            id=&quot;example.target.executable&quot;&gt;
-         &lt;tool
-               sources=&quot;C&quot;
-               name=&quot;Compiler&quot;
-               outputFlag=&quot;-o&quot;
-               outputs=&quot;exe&quot;
-               command=&quot;g++&quot;
-               id=&quot;executable.compiler&quot;&gt;
-            &lt;optionCategory
-                  owner=&quot;executable.compiler&quot;
-                  name=&quot;Flags&quot;
-                  id=&quot;compiler.category.flags&quot;&gt;
-            &lt;/optionCategory&gt;
-            &lt;option
-                  defaultValue=&quot;-c&quot;
-                  name=&quot;Compiler Flags&quot;
-                  category=&quot;compiler.category.flags&quot;
-                  valueType=&quot;string&quot;
-                  id=&quot;category.flags.comp_flags&quot;&gt;
-            &lt;/option&gt;
-         &lt;/tool&gt;
-         &lt;configuration
-               name=&quot;Default&quot;
-               id=&quot;example.config.default&quot;&gt;
-         &lt;/configuration&gt;
-      &lt;/target&gt;
-   &lt;/extension&gt;
+         The following is an example of the extension point usage:
+&lt;p&gt;
+&lt;pre&gt;
+   &lt;extension
+         id=&quot;buildExample&quot;
+         name=&quot;Tools for Build Example&quot;
+         point=&quot;org.eclipse.cdt.core.ManagedBuildInfo&quot;&gt;
+      &lt;target
+            makeFlags=&quot;-k&quot;
+            isTest=&quot;false&quot;
+            cleanCommand=&quot;rm -rf&quot;
+            name=&quot;Executable&quot;
+            defaultExtension=&quot;.exe&quot;
+            isAbstract=&quot;false&quot;
+            makeCommand=&quot;make&quot;
+            id=&quot;example.target.executable&quot;&gt;
+         &lt;tool
+               sources=&quot;C&quot;
+               name=&quot;Compiler&quot;
+               outputFlag=&quot;-o&quot;
+               outputs=&quot;exe&quot;
+               command=&quot;g++&quot;
+               id=&quot;executable.compiler&quot;&gt;
+            &lt;optionCategory
+                  owner=&quot;executable.compiler&quot;
+                  name=&quot;Flags&quot;
+                  id=&quot;compiler.category.flags&quot;&gt;
+            &lt;/optionCategory&gt;
+            &lt;option
+                  defaultValue=&quot;-c&quot;
+                  name=&quot;Compiler Flags&quot;
+                  category=&quot;compiler.category.flags&quot;
+                  valueType=&quot;string&quot;
+                  id=&quot;category.flags.comp_flags&quot;&gt;
+            &lt;/option&gt;
+         &lt;/tool&gt;
+         &lt;configuration
+               name=&quot;Default&quot;
+               id=&quot;example.config.default&quot;&gt;
+         &lt;/configuration&gt;
+      &lt;/target&gt;
+   &lt;/extension&gt;
 &lt;/pre&gt;
       </documentation>
    </annotation>
@@ -535,7 +542,7 @@
          <meta.section type="copyright"/>
       </appInfo>
       <documentation>
-         Copyright (c) 2003 IBM Corporation and others.
+         Copyright (c) 2003 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 &lt;a href=&quot;http://www.eclipse.org/legal/cpl-v10.html&quot;&gt; Eclipse&lt;/a&gt; website.
       </documentation>
    </annotation>
Index: src/org/eclipse/cdt/managedbuilder/core/ITarget.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/core/ITarget.java,v
retrieving revision 1.3
diff -u -r1.3 ITarget.java
--- src/org/eclipse/cdt/managedbuilder/core/ITarget.java	24 Sep 2003 14:20:40 -0000	1.3
+++ src/org/eclipse/cdt/managedbuilder/core/ITarget.java	25 Sep 2003 20:19:43 -0000
@@ -25,6 +25,7 @@
 	public static final String IS_ABSTRACT = "isAbstract";	//$NON-NLS-1$
 	public static final String IS_TEST = "isTest";	//$NON-NLS-1$
 	public static final String MAKE_COMMAND = "makeCommand";	//$NON-NLS-1$
+	public static final String OS_LIST = "osList";	//$NON-NLS-1$
 	public static final String PARENT = "parent";	//$NON-NLS-1$
 	
 	/**
@@ -35,7 +36,7 @@
 	 * 
 	 * @param parent The <code>IConfiguration</code> to use as a settings template
 	 * @param id The unique id the new configuration will have
-	 * @return
+	 * @return IConfiguration
 	 */
 	public IConfiguration createConfiguration(IConfiguration parent, String id);
 
@@ -44,34 +45,35 @@
 	 * the tools defined for that target and options set at their defaults.
 	 * 
 	 * @param id id for this configuration.
-	 * @return
+	 * @return IConfiguration
 	 */
 	public IConfiguration createConfiguration(String id);
 	
 	/**
 	 * Get the name of the final build artifact.
 	 * 
-	 * @return 
+	 * @return String
 	 */
 	public String getArtifactName();
 	
 	/**
 	 * Answers the unique ID of the binary parser associated with the target.
 	 * 
-	 * @return
+	 * @return String
 	 */
 	public String getBinaryParserId();
 	
 	/**
 	 * Answers the OS-specific command to remove files created by the build
 	 *  
-	 * @return
+	 * @return String
 	 */
 	public String getCleanCommand();
 
 	/**
 	 * Returns all of the configurations defined by this target.
-	 * @return
+	 * 
+	 * @return IConfiguration[]
 	 */
 	public IConfiguration[] getConfigurations();
 
@@ -79,14 +81,14 @@
 	 * Get the default extension that should be applied to build artifacts
 	 * created by this target.
 	 * 
-	 * @return
+	 * @return String
 	 */
 	public String getDefaultExtension();	
 
 	/**
 	 * Answers the name of the make utility for the target.
 	 *  
-	 * @return
+	 * @return String
 	 */
 	public String getMakeCommand();
 
@@ -94,27 +96,36 @@
 	 * Returns the configuration with the given id, or <code>null</code> if not found.
 	 * 
 	 * @param id
-	 * @return
+	 * @return IConfiguration
 	 */
 	public IConfiguration getConfiguration(String id);
 	
 	/**
 	 * Gets the resource that this target is applied to.
 	 * 
-	 * @return
+	 * @return IResource
 	 */
 	public IResource getOwner();
 
 	/**
-	 * @return the <code>ITarget</code> that is the parent of the receiver.
+	 * Answers the <code>ITarget</code> that is the parent of the receiver.
+	 * 
+	 * @return ITarget
 	 */
 	public ITarget getParent();
 	
 	/**
+	 * Answers an array of operating systems the target can be created on.
+	 * 
+	 * @return String[]
+	 */
+	public String[] getTargetOSList();
+
+	/**
 	 * Returns the list of platform specific tools associated with this
 	 * platform.
 	 * 
-	 * @return
+	 * @return ITool[]
 	 */
 	public ITool[] getTools();
 
@@ -123,13 +134,13 @@
 	 * Answers true if the receiver has a make command that differs from its 
 	 * parent specification.
 	 * 
-	 * @return
+	 * @return boolean
 	 */
 	public boolean hasOverridenMakeCommand();
 	
 	/**
 	 * Returns whether this target is abstract.
-	 * @return 
+	 * @return boolean 
 	 */
 	public boolean isAbstract();
 	
@@ -138,7 +149,7 @@
 	 * for testing purposes only, else <code>false</code>. A test target will 
 	 * not be shown in the UI but can still be manipulated programmatically.
 	 * 
-	 * @return
+	 * @return boolean
 	 */
 	public boolean isTestTarget();
 
@@ -170,4 +181,5 @@
 	 * @param command
 	 */
 	public void setMakeCommand(String command);
+
 }
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java,v
retrieving revision 1.1
diff -u -r1.1 Configuration.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java	15 Sep 2003 20:44:24 -0000	1.1
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Configuration.java	25 Sep 2003 20:19:43 -0000
@@ -12,6 +12,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.Iterator;
 import java.util.List;
 
 import org.eclipse.cdt.managedbuilder.core.BuildException;
@@ -61,6 +62,9 @@
 		this.target = target;
 		this.parent = parent;
 		
+		// Get the tool references from the parent
+		getLocalToolReferences().addAll(((Configuration)parent).getLocalToolReferences());
+		
 		target.addConfiguration(this);
 	}
 
@@ -147,25 +151,23 @@
 		if (parent != null)
 			element.setAttribute(IConfiguration.PARENT, parent.getId());
 		
-		for (int i = 0; i < getToolReferences().size(); ++i) {
-			ToolReference toolRef = (ToolReference)getToolReferences().get(i);
+		// Serialize only the tool references defined in the configuration
+		Iterator iter = getLocalToolReferences().listIterator();
+		while (iter.hasNext()) {
+			ToolReference toolRef = (ToolReference) iter.next();
 			Element toolRefElement = doc.createElement(IConfiguration.TOOL_REF);
 			element.appendChild(toolRefElement);
 			toolRef.serialize(doc, toolRefElement);
 		}
 	}
 	
-	/* (non-Javadoc)
-	 * @see org.eclipse.cdt.core.build.managed.IConfiguration#getName()
-	 */
-	public String getName() {
-		return (name == null && parent != null) ? parent.getName() : name;
-	}
-
-	/*
-	 * @return
+	/* (non-javadoc)
+	 * A safety method to avoid NPEs. It answers the tool reference list in the 
+	 * receiver. It does not look at the tool references defined in the parent.
+	 * 
+	 * @return List
 	 */
-	private List getToolReferences() {
+	protected List getLocalToolReferences() {
 		if (toolReferences == null) {
 			toolReferences = new ArrayList();
 		}
@@ -173,6 +175,13 @@
 	}
 
 	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.core.build.managed.IConfiguration#getName()
+	 */
+	public String getName() {
+		return (name == null && parent != null) ? parent.getName() : name;
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.build.managed.IConfiguration#getTools()
 	 */
 	public ITool[] getTools() {
@@ -180,7 +189,7 @@
 			? parent.getTools()
 			: target.getTools();
 		
-		// Replace tools with overrides
+		// Replace tools with local overrides
 		for (int i = 0; i < tools.length; ++i) {
 			ToolReference ref = getToolReference(tools[i]);
 			if (ref != null)
@@ -195,7 +204,7 @@
 	 */
 	public void reset(IConfigurationElement element) {
 		// I just need to reset the tool references
-		getToolReferences().clear();
+		getLocalToolReferences().clear();
 		IConfigurationElement[] configElements = element.getChildren();
 		for (int l = 0; l < configElements.length; ++l) {
 			IConfigurationElement configElement = configElements[l];
@@ -211,6 +220,35 @@
 	public IConfiguration getParent() {
 		return parent;
 	}
+	
+	/* (non-javadoc)
+	 * 
+	 * @param tool
+	 * @return List
+	 */
+	protected List getOptionReferences(ITool tool) {
+		List references = new ArrayList();
+		
+		// Get all the option references I add for this tool
+		ToolReference toolRef = getToolReference(tool);
+		if (toolRef != null) {
+			references.addAll(toolRef.getLocalOptionRefs());
+		}
+		
+		// See if there is anything that my parents add that I don't
+		if (parent != null) {
+			List temp = ((Configuration)parent).getOptionReferences(tool);
+			Iterator iter = temp.listIterator();
+			while (iter.hasNext()) {
+				OptionReference ref = (OptionReference) iter.next();
+				if (!references.contains(ref)) {
+					references.add(ref);
+				}
+			}
+		}
+		
+		return references;
+	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.build.managed.IConfiguration#getTarget()
@@ -227,22 +265,29 @@
 	}
 
 	/**
-	 * Returns the reference for a given tool.
+	 * Returns the reference for a given tool or <code>null</code> if one is not
+	 * found.
 	 * 
 	 * @param tool
-	 * @return
+	 * @return ToolReference
 	 */
 	private ToolReference getToolReference(ITool tool) {
-		for (int i = 0; i < getToolReferences().size(); ++i) {
-			ToolReference toolRef = (ToolReference)getToolReferences().get(i);
-			if (toolRef.references(tool))
-				return toolRef;
+		// See if the receiver has a reference to the tool
+		ToolReference ref = null;
+		Iterator iter = getLocalToolReferences().listIterator();
+		while (iter.hasNext()) {
+			ToolReference temp = (ToolReference)iter.next(); 
+			if (temp.references(tool)) {
+				ref = temp;
+				break;
+			}
 		}
-		return null;
+		
+		return ref;
 	}
 	
 	public void addToolReference(ToolReference toolRef) {
-		getToolReferences().add(toolRef);
+		getLocalToolReferences().add(toolRef);
 	}
 	
 	public OptionReference createOptionReference(IOption option) {
Index: src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java,v
retrieving revision 1.1
diff -u -r1.1 OptionReference.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java	15 Sep 2003 20:44:24 -0000	1.1
+++ src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java	25 Sep 2003 20:19:44 -0000
@@ -76,11 +76,15 @@
 				value = element.getAttribute(IOption.DEFAULT_VALUE);
 				break;
 			case IOption.ENUMERATED:
-				try {
-					value = option.getSelectedEnum();
-				} catch (BuildException e) {
-					value = new String();
+				String temp = element.getAttribute(DEFAULT_VALUE);
+				if (temp == null) {
+					try {
+						temp = option.getSelectedEnum();
+					} catch (BuildException e) {
+						temp = new String();
+					}
 				}
+				value = temp;
 				break;
 			case IOption.STRING_LIST:
 			case IOption.INCLUDE_PATH:
Index: src/org/eclipse/cdt/managedbuilder/internal/core/Target.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/Target.java,v
retrieving revision 1.3
diff -u -r1.3 Target.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/Target.java	24 Sep 2003 14:20:40 -0000	1.3
+++ src/org/eclipse/cdt/managedbuilder/internal/core/Target.java	25 Sep 2003 20:19:44 -0000
@@ -16,6 +16,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.StringTokenizer;
 
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
 import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
@@ -42,8 +43,9 @@
 	private String makeCommand;
 	private IResource owner;
 	private ITarget parent;
+	private List targetOSList;
 	private Map toolMap;
-	private List tools;
+	private List toolList;
 
 	private static final IConfiguration[] emptyConfigs = new IConfiguration[0];
 	private static final String EMPTY_STRING = new String();
@@ -78,7 +80,8 @@
 	}
 
 	/**
-	 * This constructor is called to create a target defined by an extension.
+	 * This constructor is called to create a target defined by an extension point in 
+	 * a plugin manifest file.
 	 * 
 	 * @param element
 	 */
@@ -113,8 +116,7 @@
 		}
 
 		// isAbstract
-		if ("true".equals(element.getAttribute(IS_ABSTRACT)))
-			isAbstract = true;
+		isAbstract = ("true".equals(element.getAttribute(IS_ABSTRACT)));
 
 		// Is this a test target
 		isTest = ("true".equals(element.getAttribute(IS_TEST)));
@@ -133,12 +135,29 @@
 			makeCommand = parent.getMakeCommand();
 		}
 
+		// Get the comma-separated list of valid OS
+		String os = element.getAttribute(OS_LIST);
+		if (os != null) {
+			targetOSList = new ArrayList();
+			StringTokenizer tokens = new StringTokenizer(os, ",");
+			while (tokens.hasMoreTokens()) {
+				targetOSList.add(tokens.nextToken().trim());
+			}
+		}
+		
 		IConfigurationElement[] targetElements = element.getChildren();
-		for (int k = 0; k < targetElements.length; ++k) {
+		int k;
+		// Load the tools first
+		for (k = 0; k < targetElements.length; ++k) {
 			IConfigurationElement targetElement = targetElements[k];
 			if (targetElement.getName().equals(ITool.TOOL_ELEMENT_NAME)) {
 				new Tool(this, targetElement);
-			} else if (targetElement.getName().equals(IConfiguration.CONFIGURATION_ELEMENT_NAME)) {
+			}
+		}
+		// Then load the configurations which may have tool references
+		for (k = 0; k < targetElements.length; ++k) {
+			IConfigurationElement targetElement = targetElements[k];
+			if (targetElement.getName().equals(IConfiguration.CONFIGURATION_ELEMENT_NAME)) {
 				new Configuration(this, targetElement);
 			}
 		}
@@ -146,7 +165,7 @@
 	}
 
 	/**
-	 * Create target from project file
+	 * Create target from project file.
 	 * 
 	 * @param buildInfo
 	 * @param element
@@ -167,9 +186,6 @@
 		// contain what the user entered in the UI).
 		artifactName = element.getAttribute(ARTIFACT_NAME);
 
-		// Get the ID of the binary parser
-		binaryParserId = element.getAttribute(BINARY_PARSER);
-
 		// Get the default extension
 		defaultExtension = element.getAttribute(DEFAULT_EXTENSION);
 
@@ -238,7 +254,6 @@
 			element.setAttribute(PARENT, parent.getId());
 		element.setAttribute(IS_ABSTRACT, isAbstract ? "true" : "false");
 		element.setAttribute(ARTIFACT_NAME, getArtifactName());
-		element.setAttribute(BINARY_PARSER, getBinaryParserId());
 		element.setAttribute(DEFAULT_EXTENSION, getDefaultExtension());
 		element.setAttribute(IS_TEST, isTest ? "true" : "false");
 		element.setAttribute(CLEAN_COMMAND, getCleanCommand());
@@ -278,6 +293,22 @@
 	}
 	
 	/* (non-Javadoc)
+	 * @see org.eclipse.cdt.managedbuilder.core.ITarget#getTargetOSList()
+	 */
+	public String[] getTargetOSList() {
+		if (targetOSList == null) {
+			// Ask parent for its list
+			if (parent != null) {
+				return parent.getTargetOSList();
+			} else {
+				// I have no parent and no defined list but never return null
+				return new String[0];
+			}
+		}
+		return (String[]) targetOSList.toArray(new String[targetOSList.size()]);
+	}
+
+	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.managedbuilder.core.ITarget#getOwner()
 	 */
 	public IResource getOwner() {
@@ -285,25 +316,41 @@
 	}
 
 	private int getNumTools() {
-		int n = (tools == null) ? 0 : tools.size();
+		int n = getToolList().size();
 		if (parent != null)
 			n += ((Target)parent).getNumTools();
 		return n;
 	}
 	
+
 	private int addToolsToArray(ITool[] toolArray, int start) {
 		int n = start;
 		if (parent != null)
 			n = ((Target)parent).addToolsToArray(toolArray, start);
 
-		if (tools != null) {
-			for (int i = 0; i < tools.size(); ++i)
-				toolArray[n++] = (ITool)tools.get(i); 
+		for (int i = 0; i < getToolList().size(); ++i) {
+			toolArray[n++] = (ITool)getToolList().get(i); 
 		}
 		
 		return n;
 	}
 	
+	private List getToolList() {
+		if (toolList == null) {
+			toolList = new ArrayList();
+			toolList.clear();
+		}
+		return toolList;
+	}
+
+	private Map getToolMap() {
+		if (toolMap == null) {
+			toolMap = new HashMap();
+			toolMap.clear();
+		}
+		return toolMap;
+	}
+
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.managedbuilder.core.ITarget#getTools()
 	 */
@@ -322,16 +369,19 @@
 
 	/**
 	 * @param id
-	 * @return
+	 * @return ITool
 	 */
 	public ITool getTool(String id) {
 		ITool result = null;
+
 		// See if receiver has it in list
-		result = (ITool)toolMap.get(id);
+			result = (ITool) getToolMap().get(id);
+
 		// If not, check if parent has it
 		if (result == null && parent != null) {
 			result = ((Target)parent).getTool(id);
 		}
+
 		return result;
 	}
 
@@ -339,13 +389,8 @@
 	 * @param tool
 	 */
 	public void addTool(ITool tool) {
-		if (tools == null) {
-			tools = new ArrayList();
-			toolMap = new HashMap();
-		}
-		
-		tools.add(tool);
-		toolMap.put(tool.getId(), tool);
+		getToolList().add(tool);
+		getToolMap().put(tool.getId(), tool);
 	}
 	
 	/* (non-Javadoc)
@@ -377,15 +422,33 @@
 	 * @see org.eclipse.cdt.core.build.managed.ITarget#getArtifactName()
 	 */
 	public String getArtifactName() {
-		// Return name or an empty string
-		return artifactName == null ? EMPTY_STRING : artifactName;
+		if (artifactName == null) {
+			// If I have a parent, ask it
+			if (parent != null) {
+				return parent.getArtifactName();
+			} else {
+				// I'm it and this is not good!
+				return EMPTY_STRING;
+			}
+		} else {
+			return artifactName;
+		}
 	}
 
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.managedbuilder.core.ITarget#getBinaryParserId()
 	 */
 	public String getBinaryParserId() {
-		return binaryParserId == null ? EMPTY_STRING : binaryParserId;
+		if (binaryParserId == null) {
+			// If I have a parent, ask it
+			if (parent != null) {
+				return parent.getBinaryParserId();
+			} else {
+				// I'm it and this is not good!
+				return EMPTY_STRING;
+			}
+		}
+		return binaryParserId;
 	}
 
 	/* (non-Javadoc)
Index: src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.core/src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java,v
retrieving revision 1.1
diff -u -r1.1 ToolReference.java
--- src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java	15 Sep 2003 20:44:24 -0000	1.1
+++ src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java	25 Sep 2003 20:19:44 -0000
@@ -11,6 +11,7 @@
 package org.eclipse.cdt.managedbuilder.internal.core;
 
 import java.util.ArrayList;
+import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -50,6 +51,15 @@
 	}
 	
 	/**
+	 * Adds the option reference specified in the argument to the receiver.
+	 * 
+	 * @param optionRef
+	 */
+	public void addOptionReference(OptionReference optionRef) {
+		getLocalOptionRefs().add(optionRef);
+	}
+	
+	/**
 	 * Created tool reference from an extension defined in a plugin manifest.
 	 * 
 	 * @param owner The <code>Configuration</code> the receiver will be added to.
@@ -58,7 +68,7 @@
 	public ToolReference(Configuration owner, IConfigurationElement element) {
 		this.owner = owner;
 		
-		parent = ((Target)owner.getTarget()).getTool(element.getAttribute("id"));
+		parent = ((Target)owner.getTarget()).getTool(element.getAttribute(ID));
 
 		owner.addToolReference(this);
 		
@@ -104,14 +114,13 @@
 	 */
 	public void serialize(Document doc, Element element) {
 		element.setAttribute(ITool.ID, parent.getId());
-		
-		if (optionReferences != null)
-			for (int i = 0; i < optionReferences.size(); ++i) {
-				OptionReference optionRef = (OptionReference)optionReferences.get(i);
-				Element optionRefElement = doc.createElement(ITool.OPTION_REF);
-				element.appendChild(optionRefElement);
-				optionRef.serialize(doc, optionRefElement);
-			}
+		Iterator iter = getLocalOptionRefs().listIterator();
+		while (iter.hasNext()) {
+			OptionReference optionRef = (OptionReference) iter.next();
+			Element optionRefElement = doc.createElement(ITool.OPTION_REF);
+			element.appendChild(optionRefElement);
+			optionRef.serialize(doc, optionRefElement);
+		}
 	}
 
 	public IConfiguration getConfiguration() {
@@ -254,6 +263,11 @@
 		return parent.producesFileType(outputExtension);
 	}
 
+	protected List getAllOptionRefs() {
+		// First get all the option references this tool reference contains
+		return ((Configuration)owner).getOptionReferences(parent);
+	}
+	
 	/* (non-Javadoc)
 	 * @see org.eclipse.cdt.core.build.managed.IBuildObject#getId()
 	 */
@@ -283,35 +297,63 @@
 	}
 
 	public boolean references(ITool target) {
-		if (equals(target))
+		if (equals(target)) {
 			// we are the target
 			return true;
-		else if (parent instanceof ToolReference)
+		}
+		else if (parent instanceof ToolReference) {
 			// check the reference we are overriding
 			return ((ToolReference)parent).references(target);
-		else
+		}
+		else if (target instanceof ToolReference) {
+			return parent.equals(((ToolReference)target).parent); 
+		}
+		else {
 			// the real reference
 			return parent.equals(target);
+		}
 	}
 	
+	/* (non-javadoc)
+	 * Answers an option reference that overrides the option, or <code>null</code>
+	 * 
+	 * @param option
+	 * @return OptionReference
+	 */
 	private OptionReference getOptionReference(IOption option) {
-		if (optionReferences != null)
-			for (int i = 0; i < optionReferences.size(); ++i) {
-				OptionReference optionRef = (OptionReference)optionReferences.get(i);
-				if (optionRef.references(option))
-					return optionRef;
-			}
+		// Get all the option references for this option
+		Iterator iter = getAllOptionRefs().listIterator();
+		while (iter.hasNext()) {
+			OptionReference optionRef = (OptionReference) iter.next();
+			if (optionRef.references(option))
+				return optionRef;
+		}
+
 		return null;
 	}
 	
-	public OptionReference createOptionReference(IOption option) {
-		return new OptionReference(this, option);
+	protected List getLocalOptionRefs() {
+		if (optionReferences == null) {
+			optionReferences = new ArrayList();
+			optionReferences.clear();
+		}
+		return optionReferences;
 	}
 	
-	public void addOptionReference(OptionReference optionRef) {
-		if (optionReferences == null)
-			optionReferences = new ArrayList();
-		optionReferences.add(optionRef);
+	/**
+	 * Answers a reference to the option. If the reference does not exist, 
+	 * a new reference is created. 
+	 * 
+	 * @param option
+	 * @return OptionReference
+	 */
+	public OptionReference createOptionReference(IOption option) {
+		// Check if the option reference already exists
+		OptionReference ref = getOptionReference(option);
+		if (ref == null) {
+			ref = new OptionReference(this, option); 
+		}
+		return ref;
 	}
 	
 	/* (non-Javadoc)
Index: ChangeLog
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/ChangeLog,v
retrieving revision 1.4
diff -u -r1.4 ChangeLog
--- ChangeLog	24 Sep 2003 14:20:49 -0000	1.4
+++ ChangeLog	25 Sep 2003 20:19:57 -0000
@@ -1,3 +1,24 @@
+2003-09-25 Sean Evoy
+	This patch contains a lot of changes needed to implement fixes for 42648 and 
+	43122. 
+	
+	The properties file has been updated to externalize some of the option labels
+	to try and address some of the concern about continuity between UIs on 
+	different platforms.
+	* plugin.properties
+	
+	There are changes in the plugin XML file to accomodate showing the targets 
+	only on the correct host platform. Option names have bee replaced with 
+	externalized equivalents where possible. The release and debug configurations 
+	for each configuration now apply "reasonable" defaults for debug and optimization
+	option. Finally, the Cygwinb tool specification has been brought closer to those 
+	for *nix.
+	* plugin.xml
+	
+	Only targets that correspond to the host platforms are shown in the drop-down
+	list.
+	* src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java
+
 2003-09-23 Sean Evoy
 	I added a fix for critical bug 43439. The new project wizard is ready to be hooked 
 	up to the help system content on F1. There is a new file with the string constant 
Index: plugin.properties
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/plugin.properties,v
retrieving revision 1.2
diff -u -r1.2 plugin.properties
--- plugin.properties	24 Sep 2003 14:20:49 -0000	1.2
+++ plugin.properties	25 Sep 2003 20:19:57 -0000
@@ -22,7 +22,21 @@
 OptionCategory.Warn=Warnings
 OptionCategory.Misc=Miscellaneous
 OptionCategory.Libs=Libraries
+
 Option.Posix.PreprocOnly=Preprocess only (-E)
+Option.Posix.Nostdinc=Do not search system directories (-nostdinc)
+
 Option.Posix.DefSym=Defined symbols (-D)
+Option.Posix.UndefSym=Undefined symbols (-U)
+
+Option.Posix.Optimize.None=None (-O0)
+Option.Posix.Optimize.Optimize=Optimize (-O1)
+Option.Posix.Optimize.More=Optimize more (-O2)
+Option.Posix.Optimize.Most=Optimize most (-O3)
+
+Option.Posix.Verbose=Verbose (-v)
+Option.OtherFlags=Other flags
+
+Option.Posix.Linker.Flags=Linker flags
 Option.Posix.Libs=Libraries (-l)
 Option.Posix.Libsearch=Library search path (-L)
Index: plugin.xml
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/plugin.xml,v
retrieving revision 1.5
diff -u -r1.5 plugin.xml
--- plugin.xml	24 Sep 2003 14:20:49 -0000	1.5
+++ plugin.xml	25 Sep 2003 20:19:58 -0000
@@ -61,19 +61,21 @@
          </filter>
       </page>
    </extension>
+<!-- Managed Make Builder Tool Specifications -->
    <extension
          id="cdt.managed.build.info"
          name="Managed Build Tools Description"
          point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo">
       <target
-            makeFlags="-k"
-            isTest="false"
-            cleanCommand="rm -rf"
             name="Cygwin"
-            binaryParser="org.eclipse.cdt.core.PE"
+            id="cygwin"
+            cleanCommand="rm -rf"
+            isTest="false"
             isAbstract="true"
             makeCommand="make"
-            id="cygwin">
+            binaryParser="org.eclipse.cdt.core.PE"
+            makeFlags="-k"
+            osList="win32">
          <tool
                sources="c,cc,cpp,cxx,C"
                name="%ToolName.compiler"
@@ -88,7 +90,7 @@
             </optionCategory>
             <option
                   defaultValue="false"
-                  name="Do not search system directories (-nostdinc)"
+                  name="%Option.Posix.Nostdinc"
                   category="cygwin.compiler.category.preprocessor"
                   command="-nostdinc"
                   valueType="boolean"
@@ -210,7 +212,7 @@
                </listOptionValue>
             </option>
             <option
-                  name="Undefined symbols (-U)"
+                  name="%Option.Posix.UndefSym"
                   category="cygwin.gnu.compiler.category.symbols"
                   command="-U"
                   valueType="stringList"
@@ -222,35 +224,29 @@
                   id="cygwin.compiler.category.general">
             </optionCategory>
             <option
-                  defaultValue="-c"
-                  name="Compiler Flags"
-                  category="cygwin.compiler.category.general"
-                  valueType="string"
-                  id="cygwin.compiler.general.ccflags">
-            </option>
-            <option
                   name="Optimization Level"
                   category="cygwin.compiler.category.general"
                   valueType="enumerated"
                   id="cygwin.compiler.general.optimization.level">
                <enumeratedOptionValue
-                     name="None (-O0)"
+                     name="%Option.Posix.Optimize.None"
+                     isDefault="false"
                      command="-O0"
                      id="cygwin.optimization.level.none">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize (-O1)"
+                     name="%Option.Posix.Optimize.Optimize"
                      command="-O1"
                      id="cygwin.optimization.level.optimize">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize more (-O2)"
+                     name="%Option.Posix.Optimize.More"
                      isDefault="true"
                      command="-O2"
                      id="cygwin.optimization.level.more">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize most (-O3)"
+                     name="%Option.Posix.Optimize.Most"
                      command="-O3"
                      id="cygwin.optimization.level.most">
                </enumeratedOptionValue>
@@ -294,13 +290,78 @@
                      builtIn="true">
                </listOptionValue>
             </option>
+            <optionCategory
+                  owner="org.eclipse.cdt.build.tool.cygwin.compiler"
+                  name="%OptionCategory.Warn"
+                  id="cygwin.compiler.category.warnings">
+            </optionCategory>
+            <option
+                  defaultValue="false"
+                  name="Check syntax only (-fsyntax-only)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-fsyntax-only"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.syntax">
+            </option>
             <option
                   defaultValue="false"
-                  name="Verbose"
-                  category="cygwin.compiler.category.general"
+                  name="Pedantic (-pedantic)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-pedantic"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.pedantic">
+            </option>
+            <option
+                  defaultValue="false"
+                  name="Pedantic warnings as errors (-pedantic-errors)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-pedantic-errors"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.pedantic.error">
+            </option>
+            <option
+                  defaultValue="false"
+                  name="Inhibit all warnings (-w)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-w"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.nowarn">
+            </option>
+            <option
+                  defaultValue="true"
+                  name="All warnings (-Wall)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-Wall"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.allwarn">
+            </option>
+            <option
+                  defaultValue="false"
+                  name="Warnings as errors (-werror)"
+                  category="cygwin.compiler.category.warnings"
+                  command="-werror"
+                  valueType="boolean"
+                  id="cygwin.gnu.compiler.warnings.toerrors">
+            </option>
+            <optionCategory
+                  owner="cdt.build.tool.linux.gnu.compiler"
+                  name="%OptionCategory.Misc"
+                  id="cygwin.compiler.category.other">
+            </optionCategory>
+            <option
+                  defaultValue="-c"
+                  name="%Option.OtherFlags"
+                  category="cygwin.compiler.category.other"
+                  valueType="string"
+                  id="cygwin.compiler.misc.other">
+            </option>
+            <option
+                  defaultValue="false"
+                  name="%Option.Posix.Verbose"
+                  category="cygwin.compiler.category.other"
                   command="-v"
                   valueType="boolean"
-                  id="cygwin.compiler.general.verbose">
+                  id="cygwin.compiler.misc.verbose">
             </option>
          </tool>
       </target>
@@ -315,10 +376,35 @@
          <configuration
                name="%ConfigName.Rel"
                id="cygwin.exec.release">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     command="-O3"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="cygwin.exec.debug">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     command="-O0"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     command="-g3"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                name="%ToolName.linker"
@@ -364,10 +450,35 @@
          <configuration
                name="%ConfigName.Rel"
                id="cygwin.so.release">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     command="-O3"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="cygwin.so.debug">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     command="-O0"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     command="-g3"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                name="%ToolName.linker"
@@ -415,10 +526,35 @@
          <configuration
                name="%ConfigName.Rel"
                id="cygwin.exp.release">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     command="-O3"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="cygwin.exp.debug">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     command="-O0"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     command="-g3"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                name="%ToolName.linker"
@@ -466,10 +602,35 @@
          <configuration
                name="%ConfigName.Rel"
                id="cygwin.lib.release">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     command="-O3"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="cygwin.lib.debug">
+            <toolReference
+                  id="org.eclipse.cdt.build.tool.cygwin.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     command="-O0"
+                     id="cygwin.compiler.general.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     command="-g3"
+                     id="cygwin.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                name="%ToolName.archiver"
@@ -492,14 +653,15 @@
          </tool>
       </target>
       <target
-            makeFlags="-k"
-            isTest="false"
-            cleanCommand="rm -rf"
             name="Linux"
-            binaryParser="org.eclipse.cdt.core.ELF"
+            id="linux.gnu"
+            cleanCommand="rm -rf"
+            isTest="false"
             isAbstract="true"
             makeCommand="make"
-            id="linux.gnu">
+            binaryParser="org.eclipse.cdt.core.ELF"
+            makeFlags="-k"
+            osList="linux">
          <tool
                sources="c,C,cc,cxx,cpp"
                name="%ToolName.compiler"
@@ -514,7 +676,7 @@
             </optionCategory>
             <option
                   defaultValue="false"
-                  name="Do not search system directories (-nostdinc)"
+                  name="%Option.Posix.Nostdinc"
                   category="linux.gnu.compiler.category.preprocessor"
                   command="-nostdinc"
                   valueType="boolean"
@@ -595,6 +757,13 @@
                      builtIn="true">
                </listOptionValue>
             </option>
+            <option
+                  name="%Option.Posix.UndefSym"
+                  category="linux.gnu.compiler.category.preprocessor"
+                  command="-U"
+                  valueType="stringList"
+                  id="linux.gnu.compiler.preprocessor.undef">
+            </option>
             <optionCategory
                   owner="cdt.build.tool.linux.gnu.compiler"
                   name="%OptionCategory.Dirs"
@@ -626,23 +795,23 @@
                   valueType="enumerated"
                   id="linux.gnu.compiler.optimization.level">
                <enumeratedOptionValue
-                     name="None (-O0)"
+                     name="%Option.Posix.Optimize.None"
                      command="-O0"
                      id="linux.gnu.compiler.optimization.level.none">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize (-O1)"
+                     name="%Option.Posix.Optimize.Optimize"
                      command="-O1"
                      id="linux.gnu.compiler.optimization.level.optimize">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize more (-O2)"
+                     name="%Option.Posix.Optimize.More"
                      isDefault="true"
                      command="-O2"
                      id="linux.gnu.compiler.optimization.level.more">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize most (-O3)"
+                     name="%Option.Posix.Optimize.Most"
                      command="-O3"
                      id="linux.gnu.compiler.optimization.level.most">
                </enumeratedOptionValue>
@@ -767,20 +936,20 @@
                   id="linux.gnu.compiler.category.other">
             </optionCategory>
             <option
+                  defaultValue="-c"
+                  name="%Option.OtherFlags"
+                  category="linux.gnu.compiler.category.other"
+                  valueType="string"
+                  id="linux.gnu.compiler.other.other">
+            </option>
+            <option
                   defaultValue="false"
-                  name="Verbose (-v)"
+                  name="%Option.Posix.Verbose"
                   category="linux.gnu.compiler.category.other"
                   command="-v"
                   valueType="boolean"
                   id="linux.gnu.compiler.other.verbose">
             </option>
-            <option
-                  defaultValue="-c"
-                  name="Other flags"
-                  category="linux.gnu.compiler.category.other"
-                  valueType="string"
-                  id="linux.gnu.compiler.other.other">
-            </option>
          </tool>
       </target>
       <target
@@ -793,10 +962,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="linux.gnu.exec.release">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="linux.gnu.exec.debug">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
@@ -862,6 +1053,12 @@
                   id="linux.gnu.linker.category.libs">
             </optionCategory>
             <option
+                  name="%Option.Posix.Linker.Flags"
+                  category="linux.gnu.linker.category.libs"
+                  valueType="string"
+                  id="linux.gnu.linker.libs.flags">
+            </option>
+            <option
                   name="%Option.Posix.Libs"
                   category="linux.gnu.linker.category.libs"
                   command="-l"
@@ -888,10 +1085,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="linux.gnu.so.release">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="linux.gnu.so.debug">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
@@ -967,6 +1186,12 @@
                   id="linux.gnu.solink.category.libs">
             </optionCategory>
             <option
+                  category="linux.gnu.solink.category.libs"
+                  name="%Option.Posix.Linker.Flags"
+                  id="linux.gnu.solink.libs.flags"
+                  valueType="string">
+            </option>
+            <option
                   name="%Option.Posix.Libs"
                   category="linux.gnu.solink.category.libs"
                   command="-l"
@@ -993,10 +1218,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="linux.gnu.lib.release">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="linux.gnu.lib.debug">
+            <toolReference
+                  id="cdt.build.tool.linux.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="linux.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="linux.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
@@ -1020,14 +1267,15 @@
          </tool>
       </target>
       <target
-            makeFlags="-k"
-            isTest="false"
-            cleanCommand="rm -rf"
             name="Solaris"
-            binaryParser="org.eclipse.cdt.core.ELF"
+            id="solaris.gnu"
+            cleanCommand="rm -rf"
+            isTest="false"
             isAbstract="true"
             makeCommand="make"
-            id="solaris.gnu">
+            binaryParser="org.eclipse.cdt.core.ELF"
+            makeFlags="-k"
+            osList="solaris">
          <tool
                sources="c,C,cc,cxx,cpp"
                name="%ToolName.compiler"
@@ -1042,7 +1290,7 @@
             </optionCategory>
             <option
                   defaultValue="false"
-                  name="Do not search system directories (-nostdinc)"
+                  name="%Option.Posix.Nostdinc"
                   category="solaris.gnu.compiler.category.preprocessor"
                   command="-nostdinc"
                   valueType="boolean"
@@ -1146,23 +1394,23 @@
                   valueType="enumerated"
                   id="solaris.gnu.compiler.optimization.level">
                <enumeratedOptionValue
-                     name="None (-O0)"
+                     name="%Option.Posix.Optimize.None"
                      command="-O0"
                      id="solaris.gnu.compiler.optimization.level.none">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize (-O1)"
+                     name="%Option.Posix.Optimize.Optimize"
                      command="-O1"
                      id="solaris.gnu.compiler.optimization.level.optimize">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize more (-O2)"
+                     name="%Option.Posix.Optimize.More"
                      isDefault="true"
                      command="-O2"
                      id="solaris.gnu.compiler.optimization.level.more">
                </enumeratedOptionValue>
                <enumeratedOptionValue
-                     name="Optimize most (-O3)"
+                     name="%Option.Posix.Optimize.Most"
                      command="-O3"
                      id="solaris.gnu.compiler.optimization.level.most">
                </enumeratedOptionValue>
@@ -1287,20 +1535,20 @@
                   id="solaris.gnu.compiler.category.other">
             </optionCategory>
             <option
+                  defaultValue="-c"
+                  name="%Option.OtherFlags"
+                  category="solaris.gnu.compiler.category.other"
+                  valueType="string"
+                  id="solaris.gnu.compiler.other.other">
+            </option>
+            <option
                   defaultValue="false"
-                  name="Verbose (-v)"
+                  name="%Option.Posix.Verbose"
                   category="solaris.gnu.compiler.category.other"
                   command="-v"
                   valueType="boolean"
                   id="solaris.gnu.compiler.other.verbose">
             </option>
-            <option
-                  defaultValue="-c"
-                  name="Other flags"
-                  category="solaris.gnu.compiler.category.other"
-                  valueType="string"
-                  id="solaris.gnu.compiler.other.other">
-            </option>
          </tool>
       </target>
       <target
@@ -1313,10 +1561,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="solaris.gnu.exec.release">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="solaris.gnu.exec.debug">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
@@ -1382,6 +1652,12 @@
                   id="solaris.gnu.linker.category.libs">
             </optionCategory>
             <option
+                  category="solaris.gnu.linker.category.libs"
+                  name="%Option.Posix.Linker.Flags"
+                  id="solaris.gnu.linker.libs.flags"
+                  valueType="string">
+            </option>
+            <option
                   name="%Option.Posix.Libs"
                   category="solaris.gnu.linker.category.libs"
                   command="-l"
@@ -1408,10 +1684,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="solaris.gnu.so.release">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="solaris.gnu.so.debug">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
@@ -1487,6 +1785,12 @@
                   id="solaris.gnu.solink.category.libs">
             </optionCategory>
             <option
+                  name="%Option.Posix.Linker.Flags"
+                  category="solaris.gnu.solink.category.libs"
+                  valueType="string"
+                  id="solaris.gnu.solink.libs.flags">
+            </option>
+            <option
                   name="%Option.Posix.Libs"
                   category="solaris.gnu.solink.category.libs"
                   command="-l"
@@ -1513,10 +1817,32 @@
          <configuration
                name="%ConfigName.Rel"
                id="solaris.gnu.lib.release">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="Optimize most (-O3)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="None"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <configuration
                name="%ConfigName.Dbg"
                id="solaris.gnu.lib.debug">
+            <toolReference
+                  id="cdt.build.tool.solaris.gnu.compiler">
+               <optionReference
+                     defaultValue="None (-O0)"
+                     id="solaris.gnu.compiler.optimization.level">
+               </optionReference>
+               <optionReference
+                     defaultValue="Maximum (-g3)"
+                     id="solaris.gnu.compiler.debugging.level">
+               </optionReference>
+            </toolReference>
          </configuration>
          <tool
                sources="o"
Index: src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java
===================================================================
RCS file: /home/tools/org.eclipse.cdt.managedbuilder.ui/src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java,v
retrieving revision 1.2
diff -u -r1.2 CProjectPlatformPage.java
--- src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java	24 Sep 2003 14:20:49 -0000	1.2
+++ src/org/eclipse/cdt/managedbuilder/ui/wizards/CProjectPlatformPage.java	25 Sep 2003 20:19:58 -0000
@@ -13,6 +13,7 @@
 
 import java.util.ArrayList;
 import java.util.Arrays;
+import java.util.List;
 import java.util.ListIterator;
 
 import org.eclipse.cdt.managedbuilder.core.IConfiguration;
@@ -21,6 +22,7 @@
 import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderHelpContextIds;
 import org.eclipse.cdt.managedbuilder.internal.ui.ManagedBuilderUIPlugin;
 import org.eclipse.cdt.utils.ui.controls.ControlFactory;
+import org.eclipse.core.boot.BootLoader;
 import org.eclipse.jface.viewers.CheckboxTableViewer;
 import org.eclipse.jface.viewers.ISelectionChangedListener;
 import org.eclipse.jface.viewers.SelectionChangedEvent;
@@ -202,11 +204,15 @@
 		// Get a list of platforms defined by plugins
 		ITarget[] allTargets = ManagedBuildManager.getDefinedTargets(null);
 		targets = new ArrayList();
+		String os = BootLoader.getOS();
 		// Add all of the concrete targets to the target list
 		for (int index = 0; index < allTargets.length; ++index) {
 			ITarget target = allTargets[index];
 			if (!target.isAbstract() && !target.isTestTarget()) {
-				targets.add(target);
+				List targetOSList = Arrays.asList(target.getTargetOSList());
+				if (targetOSList.contains(os)) {
+					targets.add(target);
+				}
 			}
 		}
 		targets.trimToSize();

Back to the top