From b8059d7f27fb2f28cb77e7faa38ba6112d9a61cf Mon Sep 17 00:00:00 2001 From: Doug Schaefer Date: Mon, 23 Jun 2003 14:36:31 +0000 Subject: [PATCH] Patch for Sean Evoy: 1. Fix for bug 38665 - Need to select platform before configurations become visible 2. Icon files that were not delivered in my last patch 3. A new interface for clients of the build model to extract include paths and defined symbols for managed projects. Unmanaged projects to follow soon. --- core/org.eclipse.cdt.core.tests/ChangeLog | 6 + .../build/managed/tests/AllBuildTests.java | 165 ++++++++++++++++-- core/org.eclipse.cdt.core.tests/plugin.xml | 27 +++ core/org.eclipse.cdt.core/ChangeLog | 19 ++ .../build/managed/IManagedBuildPathInfo.java | 32 ++++ .../cdt/core/build/managed/IOption.java | 69 +++++--- .../build/managed/ManagedBuildManager.java | 45 +++-- .../core/build/managed/Configuration.java | 16 +- .../internal/core/build/managed/Option.java | 85 ++++++--- .../core/build/managed/OptionReference.java | 55 +++++- .../core/build/managed/ResourceBuildInfo.java | 59 ++++++- .../cdt/internal/core/build/managed/Tool.java | 22 ++- .../core/build/managed/ToolReference.java | 18 ++ .../schema/ManagedBuildTools.exsd | 8 +- core/org.eclipse.cdt.ui.tests/ChangeLog | 3 + core/org.eclipse.cdt.ui.tests/plugin.xml | 103 ----------- core/org.eclipse.cdt.ui/ChangeLog | 16 ++ .../properties/BuildToolSettingsPage.java | 38 ++-- .../properties/BuildToolsSettingsStore.java | 51 ++---- .../build/wizards/CProjectPlatformPage.java | 3 + .../icons/full/build16/config-librarian.gif | Bin 0 -> 171 bytes .../icons/full/build16/config-tool.gif | Bin 0 -> 211 bytes .../icons/full/wizban/newmngc_app.gif | Bin 0 -> 416 bytes .../icons/full/wizban/newmngcc_app.gif | Bin 0 -> 425 bytes core/org.eclipse.cdt.ui/plugin.xml | 8 +- 25 files changed, 614 insertions(+), 234 deletions(-) create mode 100644 core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildPathInfo.java create mode 100644 core/org.eclipse.cdt.ui/icons/full/build16/config-librarian.gif create mode 100644 core/org.eclipse.cdt.ui/icons/full/build16/config-tool.gif create mode 100644 core/org.eclipse.cdt.ui/icons/full/wizban/newmngc_app.gif create mode 100644 core/org.eclipse.cdt.ui/icons/full/wizban/newmngcc_app.gif diff --git a/core/org.eclipse.cdt.core.tests/ChangeLog b/core/org.eclipse.cdt.core.tests/ChangeLog index 31381fb7844..35fc8a774bb 100644 --- a/core/org.eclipse.cdt.core.tests/ChangeLog +++ b/core/org.eclipse.cdt.core.tests/ChangeLog @@ -2,6 +2,12 @@ Added MacroTests.java (invocation in AllCoreTests). Added MacroTests.c to resources. +2003-06-17 Sean Evoy + Moved the ManagedBuildInfo extension point from the plugin file in org.eclipse.cdt.ui.tests + Added new options to sub target for include paths and preprocessor symbols + Added test for IManagedBuildPathInfo + * build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java + 2003-06-17 Brent Nicolle Added Interface tests of IStructure.java. diff --git a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java index 21b46572e36..78bdf4e4afc 100644 --- a/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java +++ b/core/org.eclipse.cdt.core.tests/build/org/eclipse/cdt/core/build/managed/tests/AllBuildTests.java @@ -19,6 +19,7 @@ import junit.framework.TestSuite; import org.eclipse.cdt.core.build.managed.BuildException; import org.eclipse.cdt.core.build.managed.IConfiguration; +import org.eclipse.cdt.core.build.managed.IManagedBuildPathInfo; import org.eclipse.cdt.core.build.managed.IOption; import org.eclipse.cdt.core.build.managed.IOptionCategory; import org.eclipse.cdt.core.build.managed.IResourceBuildInfo; @@ -56,6 +57,7 @@ public class AllBuildTests extends TestCase { suite.addTest(new AllBuildTests("testProject")); suite.addTest(new AllBuildTests("testConfigurations")); suite.addTest(new AllBuildTests("testTargetArtifacts")); + suite.addTest(new AllBuildTests("testBuildPathInfoInterface")); suite.addTest(new AllBuildTests("cleanup")); return suite; @@ -89,6 +91,88 @@ public class AllBuildTests extends TestCase { assertNotNull(testSub); } + /** + * The purpose of this test is to exercise the build path info interface. + * To get to that point, a new target/config has to be created in the test + * project and the default configuration changed. + * + * @throws CoreException + */ + public void testBuildPathInfoInterface(){ + // Open the test project + IProject project = null; + try { + project = createProject(projectName); + } catch (CoreException e) { + fail("Failed to open project: " + e.getLocalizedMessage()); + } + + // Create a new target in the project based on the sub target + ITarget baseTarget = ManagedBuildManager.getTarget(project, "test.sub"); + assertNotNull(baseTarget); + ITarget newTarget = null; + try { + newTarget = ManagedBuildManager.createTarget(project, baseTarget); + } catch (BuildException e) { + fail("Failed adding new target to project: " + e.getLocalizedMessage()); + } + assertNotNull(newTarget); + // Copy over the configs + IConfiguration[] baseConfigs = baseTarget.getConfigurations(); + for (int i = 0; i < baseConfigs.length; ++i) { + newTarget.createConfiguration(baseConfigs[i], baseConfigs[i].getId() + "." + i); + } + + // Change the default configuration to the sub config + IConfiguration[] configs = newTarget.getConfigurations(); + assertEquals(3, configs.length); + IResourceBuildInfo buildInfo = ManagedBuildManager.getBuildInfo(project); + buildInfo.setDefaultConfiguration(newTarget.getConfiguration("sub.config.2")); + // Get the path information for the project + IManagedBuildPathInfo info = ManagedBuildManager.getBuildPathInfo(project); + assertNotNull(info); + + // Test the interface for include paths. It is important that the build model + // return the contents of all options flagged as containing include paths + String[] expectedPaths = {"/usr/include", "/opt/gnome/include", "/home/tester/include"}; + String[] actualPaths = info.getIncludePaths(); + assertTrue(Arrays.equals(expectedPaths, actualPaths)); + + // Test the interface for defined symbols (there are none but it should not return null) + String[] definedSymbols = info.getDefinedSymbols(); + assertNotNull(definedSymbols); + assertEquals(0, definedSymbols.length); + + // Add some defined symbols programmatically + String[] expectedSymbols = {"DEBUG", "GNOME"}; + IConfiguration defaultConfig = buildInfo.getDefaultConfiguration(newTarget); + ITool[] tools = defaultConfig.getTools(); + ITool subTool = null; + for (int i = 0; i < tools.length; i++) { + ITool tool = tools[i]; + if("tool.sub".equalsIgnoreCase(tool.getId())) { + subTool = tool; + break; + } + } + assertNotNull(subTool); + IOption symbolOpt = null; + IOption[] opts = subTool.getOptions(); + for (int i = 0; i < opts.length; i++) { + IOption option = opts[i]; + if (option.getValueType() == IOption.PREPROCESSOR_SYMBOLS) { + symbolOpt = option; + break; + } + } + assertNotNull(symbolOpt); + ManagedBuildManager.setOption(defaultConfig, symbolOpt, expectedSymbols); + + // Retest + definedSymbols = info.getDefinedSymbols(); + assertTrue(Arrays.equals(expectedSymbols, definedSymbols)); + } + /** * Create a new configuration based on one defined in the plugin file. * Overrides all of the configuration settings. Saves, closes, and reopens @@ -145,9 +229,18 @@ public class AllBuildTests extends TestCase { checkOptionReferences(project); } - public void testProject() throws CoreException, BuildException { + /** + * @throws CoreException + * @throws BuildException + */ + public void testProject() throws BuildException { // Create new project - IProject project = createProject(projectName); + IProject project = null; + try { + project = createProject(projectName); + } catch (CoreException e) { + fail("Test failed on project creation: " + e.getLocalizedMessage()); + } // There should not be any targets defined for this project yet assertEquals(0, ManagedBuildManager.getTargets(project).length); @@ -196,9 +289,17 @@ public class AllBuildTests extends TestCase { // Save, close, reopen and test again ManagedBuildManager.saveBuildInfo(project); - project.close(null); + try { + project.close(null); + } catch (CoreException e) { + fail("Failed on project close: " + e.getLocalizedMessage()); + } ManagedBuildManager.removeBuildInfo(project); - project.open(null); + try { + project.open(null); + } catch (CoreException e) { + fail("Failed on project open: " + e.getLocalizedMessage()); + } // Test that the default config was remembered IResourceBuildInfo info = ManagedBuildManager.getBuildInfo(project); @@ -213,7 +314,8 @@ public class AllBuildTests extends TestCase { checkRootTarget(targets[0], "z"); // Now test the information the makefile builder needs - checkBuildSettings(project); + checkBuildTestSettings(info); + ManagedBuildManager.removeBuildInfo(project); } /** @@ -222,15 +324,13 @@ public class AllBuildTests extends TestCase { * * @param project */ - private void checkBuildSettings(IProject project) { + private void checkBuildTestSettings(IResourceBuildInfo info) { String ext1 = "foo"; String ext2 = "bar"; String badExt = "cpp"; String expectedOutput = "toor"; String expectedCmd = "doIt"; - // Get that interface, Rover. Go get it. That's a good doggie! Good boy. - IResourceBuildInfo info = ManagedBuildManager.getBuildInfo(project); assertNotNull(info); assertEquals(info.getBuildArtifactName(), "BuildTest.toor"); @@ -330,7 +430,9 @@ public class AllBuildTests extends TestCase { assertEquals("-e2", rootOptions[3].getEnumCommand(selEnum)); } - + /* + * Do a full sanity check on the root target. + */ private void checkRootTarget(ITarget target, String oicValue) throws BuildException { // Target stuff assertTrue(target.isTestTarget()); @@ -439,28 +541,58 @@ public class AllBuildTests extends TestCase { assertEquals("-e2", options[1].getEnumCommand(valueList[1])); } - private void checkSubTarget(ITarget target) { + /* + * Do a sanity check on the values in the sub-target. Most of the + * sanity on the how build model entries are read is performed in + * the root target check, so these tests just verify that the the sub + * target properly inherits from its parent. For the new options + * in the sub target, the test does a sanity check just to be complete. + */ + private void checkSubTarget(ITarget target) throws BuildException { // Make sure this is a test target assertTrue(target.isTestTarget()); // Make sure the build artifact extension is there assertEquals(target.getDefaultExtension(), subExt); - // Tools + // Get the tools for this target ITool[] tools = target.getTools(); - // Root Tool + // Do we inherit properly from parent ITool rootTool = tools[0]; assertEquals("Root Tool", rootTool.getName()); - // Sub Tool + // Now get the tool defined for this target ITool subTool = tools[1]; assertEquals("Sub Tool", subTool.getName()); + // Confirm that it has three options + IOption[] subOpts = subTool.getOptions(); + assertEquals(3, subOpts.length); - // Configs + // Do a sanity check on the options + assertEquals("Include Paths", subOpts[0].getName()); + assertEquals(IOption.INCLUDE_PATH, subOpts[0].getValueType()); + String[] incPath = subOpts[0].getIncludePaths(); + assertEquals(2, incPath.length); + assertEquals("/usr/include", incPath[0]); + assertEquals("/opt/gnome/include", incPath[1]); + assertEquals("-I", subOpts[0].getCommand()); + assertEquals("Defined Symbols", subOpts[1].getName()); + assertEquals(IOption.PREPROCESSOR_SYMBOLS, subOpts[1].getValueType()); + String[] defdSymbols = subOpts[1].getDefinedSymbols(); + assertEquals(0, defdSymbols.length); + assertEquals("-D", subOpts[1].getCommand()); + assertEquals("More Includes", subOpts[2].getName()); + assertEquals(IOption.INCLUDE_PATH, subOpts[2].getValueType()); + String[] moreIncPath = subOpts[2].getIncludePaths(); + assertEquals(1, moreIncPath.length); + assertEquals("/home/tester/include", moreIncPath[0]); + assertEquals("-I", subOpts[2].getCommand()); + + // Get the configs for this target IConfiguration[] configs = target.getConfigurations(); - // Root Config + // Check inheritance IConfiguration rootConfig = configs[0]; assertEquals("Root Config", rootConfig.getName()); assertEquals("Root Override Config", configs[1].getName()); - // Sub Config + // Check the defined config for target IConfiguration subConfig = configs[2]; assertEquals("Sub Config", subConfig.getName()); } @@ -550,4 +682,5 @@ public class AllBuildTests extends TestCase { public void testThatAlwaysFails() { assertTrue(false); } + } diff --git a/core/org.eclipse.cdt.core.tests/plugin.xml b/core/org.eclipse.cdt.core.tests/plugin.xml index 52623d5209b..cc0eeb0b3f1 100644 --- a/core/org.eclipse.cdt.core.tests/plugin.xml +++ b/core/org.eclipse.cdt.core.tests/plugin.xml @@ -121,6 +121,33 @@ + + + diff --git a/core/org.eclipse.cdt.core/ChangeLog b/core/org.eclipse.cdt.core/ChangeLog index a30856dc562..3a1c0193b94 100644 --- a/core/org.eclipse.cdt.core/ChangeLog +++ b/core/org.eclipse.cdt.core/ChangeLog @@ -1,3 +1,22 @@ +2003-06-20 Sean Evoy + Added two new value types to the ManagedBuildTools schema for include paths + and defined symbols. + + Added interface so clients can query build model for include paths and + defined symbols + * build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java + * build/org/eclipse/cdt/core/build/managed/IManagedBuildPathInfo.java + * build/org/eclipse/cdt/internal/core/build/managed/ResourceBuildInfo.java + + Changed code in build model to support these new value types + * build/org/eclipse/cdt/internal/core/build/managed/Configuration.java + * build/org/eclipse/cdt/internal/core/build/managed/Option.java + * build/org/eclipse/cdt/core/build/managed/IOption.java + * build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java + * build/org/eclipse/cdt/internal/core/build/managed/Tool.java + * build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java + + 2003-06-19 Alain Magloire * model/org/eclipse/cdt/internal/core/model/CModelManager.java: diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildPathInfo.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildPathInfo.java new file mode 100644 index 00000000000..03fbcc20f11 --- /dev/null +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IManagedBuildPathInfo.java @@ -0,0 +1,32 @@ +package org.eclipse.cdt.core.build.managed; + +/********************************************************************** + * Copyright (c) 2002,2003 Rational Software Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Common Public License v0.5 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/cpl-v05.html + * + * Contributors: + * IBM Rational Software - Initial API and implementation +***********************************************************************/ + +public interface IManagedBuildPathInfo { + /** + * Answers a String array containing all the defined + * preprocessor symbols. If there are no defined symbols, the receiver + * will return an empty array, never null + * + * @return + */ + public String[] getDefinedSymbols(); + + /** + * Answers a String array containing all the known include + * search paths. If there are no paths defined, the receiver will + * return an empty array, never null + * + * @return + */ + public String[] getIncludePaths(); +} diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java index 9543517adab..2e442ea3dd5 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/IOption.java @@ -14,24 +14,28 @@ package org.eclipse.cdt.core.build.managed; * */ public interface IOption extends IBuildObject { - // Type for the value of the option public static final int BOOLEAN = 0; public static final int ENUMERATED = 1; public static final int STRING = 2; public static final int STRING_LIST = 3; + public static final int INCLUDE_PATH = 4; + public static final int PREPROCESSOR_SYMBOLS = 5; /** * If this option is defined as an enumeration, this function returns * the list of possible values for that enum. * - * If this option is not defined as an enumeration, it returns null. + * If this option is not defined as an enumeration, it returns null. * @return */ public String [] getApplicableValues(); /** - * @return the value for a boolean option. + * Answers the value for a boolean option. + * + * @return + * @throws BuildException */ public boolean getBooleanValue() throws BuildException; @@ -43,45 +47,64 @@ public interface IOption extends IBuildObject { public IOptionCategory getCategory(); /** - * @return a String containing the actual command line option - * associated with the IOption + * Answers a String containing the actual command line + * option associated with the option + * + * @return */ public String getCommand(); /** - * @return String containing the command associated with the - * enumeration name. - */ - public String getEnumCommand (String name); - - /** - * Returns the name of this option. - * * @return + * @throws BuildException */ - public String getName(); - - /** - * Returns the current value for this option if it is a List of Strings. - * - * @return - */ - public String [] getStringListValue() throws BuildException; + public String[] getDefinedSymbols() throws BuildException; /** - * @return a String containing the selected enumeration in an + * Answers the command associated with the enumeration name. For + * example, if the enumeration name was 'Default' for the debug + * level option of the Gnu compiler, and the plugin manifest defined + * that as -g, then the return value would be a String containing "-g" + * + * @return + */ + public String getEnumCommand (String name); + + /** + * Answers an array of String containing the includes paths + * defined in the build model. + * + * @return + * @throws BuildException + */ + public String[] getIncludePaths() throws BuildException; + + + /** + * Answers a String containing the selected enumeration in an * enumerated option. For an option that has not been changed by the user, * the receiver will answer with the default defined in the plugin manifest. * If the user has modified the selection, the receiver will answer with the * overridden selection. + * + * @return + * @throws BuildException */ - public String getSelectedEnum (); + public String getSelectedEnum () throws BuildException; + /** + * Returns the current value for this option if it is a List of Strings. + * + * @return + * @throws BuildException + */ + public String [] getStringListValue() throws BuildException; /** * Returns the current value for this option if it is a String * * @return + * @throws BuildException */ public String getStringValue() throws BuildException; diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java index 7adb6cd1471..8d261f0d547 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/core/build/managed/ManagedBuildManager.java @@ -118,19 +118,28 @@ public class ManagedBuildManager { } } - + + /** + * Answers the result of a best-effort search to find a target with the + * specified ID, or null if one is not found. + * + * @param resource + * @param id + * @return + */ public static ITarget getTarget(IResource resource, String id) { + ITarget target = null; + // Check if the target is spec'd in the build info for the resource if (resource != null) { IResourceBuildInfo buildInfo = getBuildInfo(resource); if (buildInfo != null) - return buildInfo.getTarget(id); + target = buildInfo.getTarget(id); } - - ITarget target = (ITarget)getExtensionTargetMap().get(id); - if (target != null) - return target; - - return null; + // OK, check the extension map + if (target == null) { + target = (ITarget)getExtensionTargetMap().get(id); + } + return target; } /** @@ -329,7 +338,7 @@ public class ManagedBuildManager { return buildInfo; } - public static IResourceBuildInfo getBuildInfo(IResource resource, boolean create) { + private static ResourceBuildInfo findBuildInfo(IResource resource, boolean create) { // Make sure the extension information is loaded first loadExtensions(); ResourceBuildInfo buildInfo = null; @@ -354,9 +363,23 @@ public class ManagedBuildManager { return buildInfo; } - public static IResourceBuildInfo getBuildInfo(IResource resource) { - return getBuildInfo(resource, false); + public static IResourceBuildInfo getBuildInfo(IResource resource, boolean create) { + return (IResourceBuildInfo) findBuildInfo(resource, create); } + public static IResourceBuildInfo getBuildInfo(IResource resource) { + return (IResourceBuildInfo) findBuildInfo(resource, false); + } + + /** + * Answers with an interface to the parse information that has been + * associated with the resource specified in the argument. + * + * @param resource + * @return + */ + public static IManagedBuildPathInfo getBuildPathInfo(IResource resource) { + return (IManagedBuildPathInfo) getBuildInfo(resource, false); + } } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java index 1369bb6a944..45af3a8f52a 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Configuration.java @@ -272,7 +272,21 @@ public class Configuration extends BuildObject implements IConfiguration { */ public void setOption(IOption option, String[] value) throws BuildException { // Is there a delta - String[] oldValue = option.getStringListValue(); + String[] oldValue; + switch (option.getValueType()) { + case IOption.STRING_LIST : + oldValue = option.getStringListValue(); + break; + case IOption.INCLUDE_PATH : + oldValue = option.getIncludePaths(); + break; + case IOption.PREPROCESSOR_SYMBOLS : + oldValue = option.getDefinedSymbols(); + break; + default : + oldValue = new String[0]; + break; + } if(!Arrays.equals(value, oldValue)) createOptionReference(option).setValue(value); } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java index ccc5876d104..d9209a9c2a3 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Option.java @@ -36,7 +36,7 @@ public class Option extends BuildObject implements IOption { private String defaultEnumName; private String command; - private static final String[] emptyStrings = new String[0]; + private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final String EMPTY_STRING = new String(); public Option(ITool tool) { @@ -46,24 +46,24 @@ public class Option extends BuildObject implements IOption { public Option(Tool tool, IConfigurationElement element) { this(tool); - // id + // Get the unique id of the option setId(element.getAttribute("id")); - // hook me up + // Hook me up to a tool tool.addOption(this); - // name + // Get the option Name (this is what the user will see in the UI) setName(element.getAttribute("name")); - // category + // Options can be grouped into categories String categoryId = element.getAttribute("category"); if (categoryId != null) setCategory(tool.getOptionCategory(categoryId)); - // command + // Get the command defined for the option command = element.getAttribute("command"); - // valueType + // Options hold different types of values String valueTypeStr = element.getAttribute("valueType"); if (valueTypeStr == null) valueType = -1; @@ -73,10 +73,14 @@ public class Option extends BuildObject implements IOption { valueType = IOption.STRING_LIST; else if (valueTypeStr.equals("boolean")) valueType = IOption.BOOLEAN; - else + else if (valueTypeStr.equals("enumerated")) valueType = IOption.ENUMERATED; + else if (valueTypeStr.equals("includePath")) + valueType = IOption.INCLUDE_PATH; + else + valueType = IOption.PREPROCESSOR_SYMBOLS; - // value + // Now get the actual value enumCommands = new HashMap(); switch (valueType) { case IOption.BOOLEAN: @@ -103,6 +107,8 @@ public class Option extends BuildObject implements IOption { value = enumList; break; case IOption.STRING_LIST: + case IOption.INCLUDE_PATH: + case IOption.PREPROCESSOR_SYMBOLS: List valueList = new ArrayList(); IConfigurationElement[] valueElements = element.getChildren("optionValue"); for (int i = 0; i < valueElements.length; ++i) { @@ -122,7 +128,7 @@ public class Option extends BuildObject implements IOption { List enumValues = (List)value; return enumValues != null ? (String[])enumValues.toArray(new String[enumValues.size()]) - : emptyStrings; + : EMPTY_STRING_ARRAY; } public boolean getBooleanValue() { @@ -144,37 +150,71 @@ public class Option extends BuildObject implements IOption { return command; } + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IOption#getDefinedSymbols() + */ + public String[] getDefinedSymbols() throws BuildException { + if (valueType != IOption.PREPROCESSOR_SYMBOLS) { + throw new BuildException("bad value type"); + } + List v = (List)value; + return v != null + ? (String[])v.toArray(new String[v.size()]) + : EMPTY_STRING_ARRAY; + } + /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getEnumCommand(java.lang.String) */ public String getEnumCommand(String name) { String cmd = (String) enumCommands.get(name); - return (cmd == null ? new String() : cmd); + return cmd == null ? EMPTY_STRING : cmd; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths() + */ + public String[] getIncludePaths() throws BuildException { + if (valueType != IOption.INCLUDE_PATH) { + throw new BuildException("bad value type"); + } + List v = (List)value; + return v != null + ? (String[])v.toArray(new String[v.size()]) + : EMPTY_STRING_ARRAY; } /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getDefaultEnumValue() */ - public String getSelectedEnum() { - return defaultEnumName; + public String getSelectedEnum() throws BuildException { + if (valueType != IOption.ENUMERATED) { + throw new BuildException("bad value type"); + } + return defaultEnumName == null ? EMPTY_STRING : defaultEnumName; } /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getStringListValue() */ - public String[] getStringListValue() { + public String[] getStringListValue() throws BuildException { + if (valueType != IOption.STRING_LIST) { + throw new BuildException("bad value type"); + } List v = (List)value; return v != null ? (String[])v.toArray(new String[v.size()]) - : emptyStrings; + : EMPTY_STRING_ARRAY; } /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getStringValue() */ - public String getStringValue() { - String v = (String) value; - return value == null ? EMPTY_STRING : v; + public String getStringValue() throws BuildException { + if (valueType != IOption.STRING) { + throw new BuildException("bad value type"); + } + return value == null ? EMPTY_STRING : (String)value; } /* (non-Javadoc) @@ -204,16 +244,15 @@ public class Option extends BuildObject implements IOption { public IOption setValue(IConfiguration config, String value) throws BuildException { - if (valueType != IOption.STRING) + if (valueType != IOption.STRING + || valueType != IOption.ENUMERATED) throw new BuildException("Bad value for type"); if (config == null) { this.value = value; return this; } else { - // Magic time - return null; } } @@ -224,7 +263,9 @@ public class Option extends BuildObject implements IOption { public IOption setValue(IConfiguration config, String[] value) throws BuildException { - if (valueType != IOption.STRING_LIST) + if (valueType != IOption.STRING_LIST + || valueType != IOption.INCLUDE_PATH + || valueType != IOption.PREPROCESSOR_SYMBOLS) throw new BuildException("Bad value for type"); if (config == null) { diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java index 66abdfc2df1..0228a7408db 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/OptionReference.java @@ -53,7 +53,7 @@ public class OptionReference implements IOption { } /** - * Created from extension. + * Created from extension point. * * @param owner * @param element @@ -73,9 +73,15 @@ public class OptionReference implements IOption { value = element.getAttribute("defaultValue"); break; case IOption.ENUMERATED: - value = option.getSelectedEnum(); + try { + value = option.getSelectedEnum(); + } catch (BuildException e) { + value = new String(); + } break; case IOption.STRING_LIST: + case IOption.INCLUDE_PATH: + case IOption.PREPROCESSOR_SYMBOLS: List valueList = new ArrayList(); IConfigurationElement[] valueElements = element.getChildren("optionValue"); for (int i = 0; i < valueElements.length; ++i) { @@ -108,6 +114,8 @@ public class OptionReference implements IOption { value = (String) element.getAttribute("defaultValue"); break; case IOption.STRING_LIST: + case IOption.INCLUDE_PATH: + case IOption.PREPROCESSOR_SYMBOLS: List valueList = new ArrayList(); NodeList nodes = element.getElementsByTagName("optionValue"); for (int i = 0; i < nodes.getLength(); ++i) { @@ -141,6 +149,8 @@ public class OptionReference implements IOption { element.setAttribute("defaultValue", (String)value); break; case IOption.STRING_LIST: + case IOption.INCLUDE_PATH: + case IOption.PREPROCESSOR_SYMBOLS: ArrayList stringList = (ArrayList)value; ListIterator iter = stringList.listIterator(); while (iter.hasNext()) { @@ -173,6 +183,20 @@ public class OptionReference implements IOption { return option.getCommand(); } + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IOption#getDefinedSymbols() + */ + public String[] getDefinedSymbols() throws BuildException { + if (value == null) + return option.getDefinedSymbols(); + else if (getValueType() == IOption.PREPROCESSOR_SYMBOLS) { + ArrayList list = (ArrayList)value; + return (String[]) list.toArray(new String[list.size()]); + } + else + throw new BuildException("bad value type"); + } + /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getEnumCommand(java.lang.String) */ @@ -184,13 +208,29 @@ public class OptionReference implements IOption { * @see org.eclipse.cdt.core.build.managed.IBuildObject#getId() */ public String getId() { + // A reference has the same id as the option it references return option.getId(); } + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IOption#getIncludePaths() + */ + public String[] getIncludePaths() throws BuildException { + if (value == null) + return option.getIncludePaths(); + else if (getValueType() == IOption.INCLUDE_PATH) { + ArrayList list = (ArrayList)value; + return (String[]) list.toArray(new String[list.size()]); + } + else + throw new BuildException("bad value type"); + } + /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IBuildObject#getName() */ public String getName() { + // A reference has the same name as the option it references return option.getName(); } @@ -212,13 +252,15 @@ public class OptionReference implements IOption { /* (non-Javadoc) * @see org.eclipse.cdt.core.build.managed.IOption#getDefaultEnumValue() */ - public String getSelectedEnum() { + public String getSelectedEnum() throws BuildException { if (value == null) { // Return the default defined for the enumeration in the manifest. return option.getSelectedEnum(); - } else { + } else if (getValueType() == IOption.ENUMERATED) { // Value will contain the human-readable name of the enum return (String) value; + } else { + throw new BuildException("bad value type"); } } @@ -302,11 +344,14 @@ public class OptionReference implements IOption { * @throws BuildException */ public void setValue(String [] value) throws BuildException { - if (getValueType() == IOption.STRING_LIST) { + if (getValueType() == IOption.STRING_LIST + || getValueType() == IOption.INCLUDE_PATH + || getValueType() == IOption.PREPROCESSOR_SYMBOLS) { // Just replace what the option reference is holding onto this.value = new ArrayList(Arrays.asList(value)); } else throw new BuildException("bad value type"); } + } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ResourceBuildInfo.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ResourceBuildInfo.java index 82e3627c505..8cd236cbadc 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ResourceBuildInfo.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ResourceBuildInfo.java @@ -12,13 +12,16 @@ package org.eclipse.cdt.internal.core.build.managed; * **********************************************************************/ import java.util.ArrayList; +import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.ListIterator; import java.util.Map; import org.eclipse.cdt.core.build.managed.BuildException; +import org.eclipse.cdt.core.build.managed.IManagedBuildPathInfo; import org.eclipse.cdt.core.build.managed.IConfiguration; +import org.eclipse.cdt.core.build.managed.IOption; import org.eclipse.cdt.core.build.managed.IResourceBuildInfo; import org.eclipse.cdt.core.build.managed.ITarget; import org.eclipse.cdt.core.build.managed.ITool; @@ -27,7 +30,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -public class ResourceBuildInfo implements IResourceBuildInfo { +public class ResourceBuildInfo implements IResourceBuildInfo, IManagedBuildPathInfo { private IResource owner; private Map targetMap; @@ -273,4 +276,58 @@ public class ResourceBuildInfo implements IResourceBuildInfo { defaultTarget = target; } + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IBuildParseInfo#getDefinedSymbols() + */ + public String[] getDefinedSymbols() { + // Return the include paths for the default configuration + ArrayList paths = new ArrayList(); + IConfiguration config = getDefaultConfiguration(getDefaultTarget()); + ITool[] tools = config.getTools(); + for (int i = 0; i < tools.length; i++) { + ITool tool = tools[i]; + IOption[] opts = tool.getOptions(); + for (int j = 0; j < opts.length; j++) { + IOption option = opts[j]; + if (option.getValueType() == IOption.PREPROCESSOR_SYMBOLS) { + try { + paths.addAll(Arrays.asList(option.getDefinedSymbols())); + } catch (BuildException e) { + // we should never get here + continue; + } + } + } + } + paths.trimToSize(); + return (String[])paths.toArray(new String[paths.size()]); + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.core.build.managed.IBuildParseInfo#getIncludePaths() + */ + public String[] getIncludePaths() { + // Return the include paths for the default configuration + ArrayList paths = new ArrayList(); + IConfiguration config = getDefaultConfiguration(getDefaultTarget()); + ITool[] tools = config.getTools(); + for (int i = 0; i < tools.length; i++) { + ITool tool = tools[i]; + IOption[] opts = tool.getOptions(); + for (int j = 0; j < opts.length; j++) { + IOption option = opts[j]; + if (option.getValueType() == IOption.INCLUDE_PATH) { + try { + paths.addAll(Arrays.asList(option.getIncludePaths())); + } catch (BuildException e) { + // we should never get here + continue; + } + } + } + } + paths.trimToSize(); + return (String[])paths.toArray(new String[paths.size()]); + } + } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java index 713663b02e8..38144dee074 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/Tool.java @@ -233,14 +233,32 @@ public class Tool extends BuildObject implements ITool, IOptionCategory { break; case IOption.STRING_LIST : - String cmd = option.getCommand(); + String listCmd = option.getCommand(); String[] list = option.getStringListValue(); for (int j = 0; j < list.length; j++) { String temp = list[j]; - buf.append(cmd + temp + WHITE_SPACE); + buf.append(listCmd + temp + WHITE_SPACE); } break; + case IOption.INCLUDE_PATH : + String incCmd = option.getCommand(); + String[] paths = option.getIncludePaths(); + for (int j = 0; j < paths.length; j++) { + String temp = paths[j]; + buf.append(incCmd + temp + WHITE_SPACE); + } + break; + + case IOption.PREPROCESSOR_SYMBOLS : + String defCmd = option.getCommand(); + String[] symbols = option.getDefinedSymbols(); + for (int j = 0; j < symbols.length; j++) { + String temp = symbols[j]; + buf.append(defCmd + temp + WHITE_SPACE); + } + break; + default : break; } diff --git a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java index 57bbfb48082..c388d540880 100644 --- a/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java +++ b/core/org.eclipse.cdt.core/build/org/eclipse/cdt/internal/core/build/managed/ToolReference.java @@ -168,6 +168,24 @@ public class ToolReference implements ITool { } break; + case IOption.INCLUDE_PATH : + String incCmd = option.getCommand(); + String[] paths = option.getIncludePaths(); + for (int j = 0; j < paths.length; j++) { + String temp = paths[j]; + buf.append(incCmd + temp + WHITE_SPACE); + } + break; + + case IOption.PREPROCESSOR_SYMBOLS : + String defCmd = option.getCommand(); + String[] symbols = option.getDefinedSymbols(); + for (int j = 0; j < symbols.length; j++) { + String temp = symbols[j]; + buf.append(defCmd + temp + WHITE_SPACE); + } + break; + default : break; } diff --git a/core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd b/core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd index fce56ce8345..022f635c190 100644 --- a/core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd +++ b/core/org.eclipse.cdt.core/schema/ManagedBuildTools.exsd @@ -118,7 +118,9 @@ - An option can be one of the following types; 'string' for catch-all entries for options that cannot be easily defined any other way, 'string list' for entries that consist of a list of values such as defined symbols or paths, 'boolean' for options that have two values, and 'enumerated' for options that are one-of a list of values. + General options can be one of the following types; 'string' for catch-all entries for options that cannot be easily defined any other way, 'string list' for entries that consist of a list of values such as defined symbols or paths, 'boolean' for options that have two values, and 'enumerated' for options that are one-of a list of values. + +Two additional types exist to flag options of special relevance to the build model; 'include', and 'definedSymbols'. You can pre-populate with optionValues, and they will display in the UI the same way the 'StringList' options do. The build model will look specifically for these value types when clients query for include paths and preprocessor defines. @@ -131,6 +133,10 @@ + + + + diff --git a/core/org.eclipse.cdt.ui.tests/ChangeLog b/core/org.eclipse.cdt.ui.tests/ChangeLog index 0f64ba36ffb..f10cfa8fe11 100644 --- a/core/org.eclipse.cdt.ui.tests/ChangeLog +++ b/core/org.eclipse.cdt.ui.tests/ChangeLog @@ -1,3 +1,6 @@ +2003-06-20 Sean Evoy + Moved the ManagedBuildInfo extension point to the plugin file in org.eclipse.cdt.core.tests + 2003-06-17 Brent Nicolle Added Interface tests of IStructure.java. diff --git a/core/org.eclipse.cdt.ui.tests/plugin.xml b/core/org.eclipse.cdt.ui.tests/plugin.xml index eb641992693..69a13d4d06a 100644 --- a/core/org.eclipse.cdt.ui.tests/plugin.xml +++ b/core/org.eclipse.cdt.ui.tests/plugin.xml @@ -22,107 +22,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/org.eclipse.cdt.ui/ChangeLog b/core/org.eclipse.cdt.ui/ChangeLog index 400fe948b93..1d3776710b6 100644 --- a/core/org.eclipse.cdt.ui/ChangeLog +++ b/core/org.eclipse.cdt.ui/ChangeLog @@ -1,3 +1,19 @@ +2003-06-20 Sean Evoy + Added (again) the icons required for the new managed project wizard and property pages + * icons/full/build16/config-command.gif + * icons/full/build16/config-librarian.gif + * icons/full/build16/config-tool.gif + * icons/full/wizban/newmngc_app.gif + * icons/full/wizban/newmngcc_app.gif + + Fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=38665 + * build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java + + Adjusted the Option settings store and pages to properly handle new option types needed + to implement parser interface for include paths and defined symbols. + * build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java + * build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java + 2003-06-18 David Inglis fixed https://bugs.eclipse.org/bugs/show_bug.cgi?id=39053 diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java index 0e6a61a10ef..9f916cd7d0b 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java +++ b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolSettingsPage.java @@ -1,5 +1,6 @@ package org.eclipse.cdt.ui.build.properties; +import org.eclipse.cdt.core.build.managed.BuildException; import org.eclipse.cdt.core.build.managed.IConfiguration; import org.eclipse.cdt.core.build.managed.IOption; import org.eclipse.cdt.core.build.managed.IOptionCategory; @@ -58,27 +59,36 @@ public class BuildToolSettingsPage extends FieldEditorPreferencePage { // Figure out which type the option is and add a proper field editor for it switch (opt.getValueType()) { case IOption.STRING : - StringFieldEditor stringField = new StringFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); - addField(stringField); - break; + StringFieldEditor stringField = new StringFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); + addField(stringField); + break; case IOption.BOOLEAN : - BooleanFieldEditor booleanField = new BooleanFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); - addField(booleanField); - break; + BooleanFieldEditor booleanField = new BooleanFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); + addField(booleanField); + break; case IOption.ENUMERATED : - BuildOptionComboFieldEditor comboField = new BuildOptionComboFieldEditor(opt.getId(), opt.getName(), opt.getApplicableValues(), opt.getSelectedEnum(), getFieldEditorParent()); - addField(comboField); - break; + String sel; + try { + sel = opt.getSelectedEnum(); + } catch (BuildException e) { + // If we get this exception, then the option type is wrong + break; + } + BuildOptionComboFieldEditor comboField = new BuildOptionComboFieldEditor(opt.getId(), opt.getName(), opt.getApplicableValues(), sel, getFieldEditorParent()); + addField(comboField); + break; case IOption.STRING_LIST : - BuildOptionListFieldEditor listField = new BuildOptionListFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); - addField(listField); - break; + case IOption.INCLUDE_PATH : + case IOption.PREPROCESSOR_SYMBOLS : + BuildOptionListFieldEditor listField = new BuildOptionListFieldEditor(opt.getId(), opt.getName(), getFieldEditorParent()); + addField(listField); + break; // case IOption.SUMMARY : // SummaryFieldEditor summaryField = new SummaryFieldEditor(opt.getId(), opt.getName(), category.getTool(), getFieldEditorParent()); // addField(summaryField); // break; default : - break; + break; } } } @@ -117,6 +127,8 @@ public class BuildToolSettingsPage extends FieldEditorPreferencePage { ManagedBuildManager.setOption(configuration, option, strVal); break; case IOption.STRING_LIST : + case IOption.INCLUDE_PATH : + case IOption.PREPROCESSOR_SYMBOLS : String listStr = getPreferenceStore().getString(option.getId()); String[] listVal = BuildToolsSettingsStore.parseString(listStr); ManagedBuildManager.setOption(configuration, option, listVal); diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java index 31aa7e609a0..67f3bc5ff66 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java +++ b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/properties/BuildToolsSettingsStore.java @@ -194,6 +194,7 @@ public class BuildToolsSettingsStore implements IPreferenceStore { try { value = new Boolean(opt.getBooleanValue()); } catch (BuildException e) { + // Exception occurs if there's an option value type mismatch break; } optionMap.put(name, value); @@ -207,7 +208,7 @@ public class BuildToolsSettingsStore implements IPreferenceStore { case IOption.STRING : try { value = opt.getStringValue(); - } catch (BuildException e1) { + } catch (BuildException e) { break; } optionMap.put(name, value); @@ -216,7 +217,23 @@ public class BuildToolsSettingsStore implements IPreferenceStore { case IOption.STRING_LIST : try { value = createList(opt.getStringListValue()); - } catch (BuildException e2) { + } catch (BuildException e) { + break; + } + optionMap.put(name, value); + break; + case IOption.INCLUDE_PATH : + try { + value = createList(opt.getIncludePaths()); + } catch (BuildException e) { + break; + } + optionMap.put(name, value); + break; + case IOption.PREPROCESSOR_SYMBOLS : + try { + value = createList(opt.getDefinedSymbols()); + } catch (BuildException e) { break; } optionMap.put(name, value); @@ -239,36 +256,6 @@ public class BuildToolsSettingsStore implements IPreferenceStore { return (String)s; } return getDefaultString(name); - -// Object s = optionMap.get(name); -// if (s instanceof IOption) { -// IOption option = (IOption) s; -// String [] values = null; -// String list = null; -// try { -// switch (option.getValueType()) { -// // Return the enumerated options in a semicolon-separated list -// case IOption.ENUMERATED : -// values = option.getApplicableValues(); -// list = createList(values); -// break; -// // Just return the string -// case IOption.STRING : -// list = option.getStringValue(); -// break; -// // Return the list values in a semicolon-spearated string -// case IOption.STRING_LIST : -// values = option.getStringListValue(); -// list = createList(values); -// default: -// break; -// } -// } catch (BuildException e) { -// return getDefaultString(name); -// } -// return list == null ? getDefaultString(name) : list; -// } -// return getDefaultString(name); } /** diff --git a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java index 120811bc905..9a1f3f8a0d1 100644 --- a/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java +++ b/core/org.eclipse.cdt.ui/build/org/eclipse/cdt/ui/build/wizards/CProjectPlatformPage.java @@ -127,6 +127,9 @@ public class CProjectPlatformPage extends WizardPage { } }); + // Select the first target in the list + handleTargetSelection(); + // Do the nasty setErrorMessage(null); setMessage(null); diff --git a/core/org.eclipse.cdt.ui/icons/full/build16/config-librarian.gif b/core/org.eclipse.cdt.ui/icons/full/build16/config-librarian.gif new file mode 100644 index 0000000000000000000000000000000000000000..f966fc39d9b2531c732fd3025c47fe6a9e5f37d0 GIT binary patch literal 171 zcmZ?wbhEHb6krfw*vtR~4fgT#?d#|7-(P?K{{H{>jke}4S^`S$zk?d#+1 z=f~T}+uQ&D{~xGY@h1x-0|Os}4oEA=3KRa8_guU6Jj64}^o z>*eM3{{8zUWm0R`uH82;rntCxeY^Sme1Y!n?w!*DGBPr3ZEd5YqyPW^&wv4RKq4T! z7&syrj5%aHHY_;U%pok*CgoDEKmc^Ew8fRA;C@@$905nNMcmMzZ literal 0 HcmV?d00001 diff --git a/core/org.eclipse.cdt.ui/icons/full/wizban/newmngc_app.gif b/core/org.eclipse.cdt.ui/icons/full/wizban/newmngc_app.gif new file mode 100644 index 0000000000000000000000000000000000000000..beefb8ee95dbe4401b48c00573bfb3fef9dd708a GIT binary patch literal 416 zcmV;R0bl+{Nk%w1VGsZi0EGYm2nPm*g>l`&c(*kd>Vj%aOiQ1jpa1Tshlj<^I~wHV zn%yW@eU@meaOz?N2NJ`PnoyosyErpn*~U&BE%Cdc3>5|MI#J5R!a+zcw{A zkZD6jMS=_rit1=edUAB{bDNY?DvSzIjBEWl8i#kVyV>Vj%aOiZ7kpa1Tshlj<^I~o80 zbY^B|?(X;UST)nOah8;p?N2K-G@bwd+>(;Vri54S*_-N+dQebLyt}**5R!a+zcw{B zkZD8z^12KRih6l;`1kkfXiC7py`7z%|4JeM&B7lZ9f^vGy*wQMh+aiSf~u<4jg8CY zLLC7CgKKMQ_4M=qT`1VRdzqGy{r&!#na;A1TK}JWU0q$aw%q^r&;L^-;NIK+|Nj60 z00000A^8LW002DzEC2ui01yBW000Qa0DJVHVWXhIgERyRwBewG!-ozXa8TI8hK>#Z z036uJaiT(t8aGlnF!F%Mg*rk~;J|X^$qzOTge0k>BnJ}$VOFS+vBCoZ2X@}fX+wrl z2M-n)&~ZS<&>kN~;Mh>00EQDUs%j8{6DkcDV0rKWF(SYO7f)v_$Xein+Y2f(C_vD) z2LKBM8bC>VN<{16#Xa literal 0 HcmV?d00001 diff --git a/core/org.eclipse.cdt.ui/plugin.xml b/core/org.eclipse.cdt.ui/plugin.xml index 43194461a8a..f9055aa7a2d 100644 --- a/core/org.eclipse.cdt.ui/plugin.xml +++ b/core/org.eclipse.cdt.ui/plugin.xml @@ -230,7 +230,7 @@