1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Patch for Sean

This commit is contained in:
Hoda Amer 2004-03-19 16:59:11 +00:00
parent d980d24f00
commit 5608bc4601
2 changed files with 52 additions and 56 deletions

View file

@ -46,7 +46,6 @@ import org.eclipse.cdt.managedbuilder.core.IToolReference;
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature; import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
import org.eclipse.cdt.managedbuilder.internal.core.OptionReference; import org.eclipse.cdt.managedbuilder.internal.core.OptionReference;
import org.eclipse.cdt.managedbuilder.internal.core.ToolReference;
import org.eclipse.cdt.testplugin.FileManager; import org.eclipse.cdt.testplugin.FileManager;
import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IFolder;
@ -859,7 +858,7 @@ public class ManagedBuildTests extends TestCase {
assertEquals("Root Override Config", configs[1].getName()); assertEquals("Root Override Config", configs[1].getName());
tools = configs[1].getTools(); tools = configs[1].getTools();
assertEquals(1, tools.length); assertEquals(1, tools.length);
assertTrue(tools[0] instanceof ToolReference); assertTrue(tools[0] instanceof IToolReference);
assertEquals("Root Tool", tools[0].getName()); assertEquals("Root Tool", tools[0].getName());
topCategory = tools[0].getTopOptionCategory(); topCategory = tools[0].getTopOptionCategory();
options = topCategory.getOptions(configs[1]); options = topCategory.getOptions(configs[1]);
@ -896,7 +895,7 @@ public class ManagedBuildTests extends TestCase {
assertEquals("Complete Override Config", configs[2].getName()); assertEquals("Complete Override Config", configs[2].getName());
tools = configs[2].getTools(); tools = configs[2].getTools();
assertEquals(1, tools.length); assertEquals(1, tools.length);
assertTrue(tools[0] instanceof ToolReference); assertTrue(tools[0] instanceof IToolReference);
assertEquals("Root Tool", tools[0].getName()); assertEquals("Root Tool", tools[0].getName());
topCategory = tools[0].getTopOptionCategory(); topCategory = tools[0].getTopOptionCategory();
options = topCategory.getOptions(configs[2]); options = topCategory.getOptions(configs[2]);
@ -966,7 +965,7 @@ public class ManagedBuildTests extends TestCase {
ITool toolRef = tools[2]; ITool toolRef = tools[2];
// Make sure the 3rd tool is a tool reference // Make sure the 3rd tool is a tool reference
assertTrue(toolRef instanceof ToolReference); assertTrue(toolRef instanceof IToolReference);
// Make sure we get all the tool settings // Make sure we get all the tool settings
assertEquals(toolRef.getName(), indyToolName); assertEquals(toolRef.getName(), indyToolName);
@ -1009,7 +1008,7 @@ public class ManagedBuildTests extends TestCase {
} }
// Test that the tool command can be changed through the reference // Test that the tool command can be changed through the reference
((ToolReference)toolRef).setToolCommand(newCmd); ((IToolReference)toolRef).setToolCommand(newCmd);
assertEquals(toolRef.getToolCommand(), newCmd); assertEquals(toolRef.getToolCommand(), newCmd);
} }
@ -1126,7 +1125,7 @@ public class ManagedBuildTests extends TestCase {
// get the tool reference from the child // get the tool reference from the child
ITool[] childTools = child.getTools(); ITool[] childTools = child.getTools();
assertEquals(2, childTools.length); assertEquals(2, childTools.length);
ToolReference childToolRef = (ToolReference)childTools[1]; IToolReference childToolRef = (IToolReference)childTools[1];
assertEquals(parentTool, childToolRef.getTool()); assertEquals(parentTool, childToolRef.getTool());
// get and check the option reference // get and check the option reference
@ -1137,7 +1136,7 @@ public class ManagedBuildTests extends TestCase {
// get the tool reference from the grandchild // get the tool reference from the grandchild
ITool[] grandTools = grandchild.getTools(); ITool[] grandTools = grandchild.getTools();
assertEquals(3, grandTools.length); assertEquals(3, grandTools.length);
ToolReference grandToolRef = (ToolReference)grandTools[2]; IToolReference grandToolRef = (IToolReference)grandTools[2];
assertEquals(parentTool, grandToolRef.getTool()); assertEquals(parentTool, grandToolRef.getTool());
} }

View file

@ -33,12 +33,12 @@
point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo"> point="org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo">
<tool <tool
natureFilter="both" natureFilter="both"
name="Target Independent Tool"
sources="rc" sources="rc"
name="Target Independent Tool"
headerExtensions="h" headerExtensions="h"
outputFlag="/fo" outputFlag="/fo"
command="RC.EXE"
outputs="free" outputs="free"
command="RC.EXE"
id="target.independent.tool"> id="target.independent.tool">
<optionCategory <optionCategory
owner="target.independent.tool" owner="target.independent.tool"
@ -49,8 +49,8 @@
defaultValue="Live free or die" defaultValue="Live free or die"
name="String in Free" name="String in Free"
category="indy.cat.free" category="indy.cat.free"
valueType="string" id="org.eclipse.cdt.core.tests.option1"
id="org.eclipse.cdt.core.tests.option1"> valueType="string">
</option> </option>
<optionCategory <optionCategory
owner="indy.cat.free" owner="indy.cat.free"
@ -61,8 +61,8 @@
defaultValue="false" defaultValue="false"
name="Boolean in Chained" name="Boolean in Chained"
category="indy.cat.chained" category="indy.cat.chained"
valueType="boolean" id="org.eclipse.cdt.core.tests.option2"
id="org.eclipse.cdt.core.tests.option2"> valueType="boolean">
</option> </option>
</tool> </tool>
<target <target
@ -73,17 +73,17 @@
defaultExtension="toor" defaultExtension="toor"
isAbstract="false" isAbstract="false"
makeCommand="make" makeCommand="make"
binaryParser="org.eclipse.cdt.core.PE"
makeFlags="-k" makeFlags="-k"
binaryParser="org.eclipse.cdt.core.PE"
osList="win32"> osList="win32">
<tool <tool
natureFilter="cnature" natureFilter="cnature"
sources="foo,bar"
name="Root Tool" name="Root Tool"
sources="foo,bar"
headerExtensions="baz" headerExtensions="baz"
outputFlag="-r" outputFlag="-r"
outputs="toor"
command="doIt" command="doIt"
outputs="toor"
id="root.tool"> id="root.tool">
<optionCategory <optionCategory
owner="root.tool" owner="root.tool"
@ -93,39 +93,39 @@
<option <option
name="List Option in Top" name="List Option in Top"
command="-L" command="-L"
valueType="stringList" id="list.option"
id="list.option"> valueType="stringList">
<listOptionValue <listOptionValue
value="a"> value="a">
</listOptionValue> </listOptionValue>
<listOptionValue <listOptionValue
value="b" builtIn="false"
builtIn="false"> value="b">
</listOptionValue> </listOptionValue>
<listOptionValue <listOptionValue
value="c" builtIn="true"
builtIn="true"> value="c">
</listOptionValue> </listOptionValue>
</option> </option>
<option <option
defaultValue="false" defaultValue="false"
name="Boolean Option in Top" name="Boolean Option in Top"
command="-b" command="-b"
valueType="boolean" id="boolean.option"
id="boolean.option"> valueType="boolean">
</option> </option>
<option <option
defaultValue="x" defaultValue="x"
name="String Option in Category" name="String Option in Category"
category="category" category="category"
valueType="string" id="string.option"
id="string.option"> valueType="string">
</option> </option>
<option <option
name="Enumerated Option in Category" name="Enumerated Option in Category"
category="category" category="category"
valueType="enumerated" id="enumerated.option"
id="enumerated.option"> valueType="enumerated">
<enumeratedOptionValue <enumeratedOptionValue
name="Default Enum" name="Default Enum"
isDefault="true" isDefault="true"
@ -198,17 +198,17 @@
</configuration> </configuration>
<tool <tool
natureFilter="both" natureFilter="both"
sources="yarf"
name="Sub Tool" name="Sub Tool"
sources="yarf"
headerExtensions="arf,barf" headerExtensions="arf,barf"
outputs="bus"
outputPrefix="lib" outputPrefix="lib"
outputs="bus"
id="tool.sub"> id="tool.sub">
<option <option
name="Include Paths" name="Include Paths"
command="-I" command="-I"
valueType="includePath" id="sub.tool.opt.inc.paths"
id="sub.tool.opt.inc.paths"> valueType="includePath">
<listOptionValue <listOptionValue
value="/usr/include"> value="/usr/include">
</listOptionValue> </listOptionValue>
@ -216,45 +216,45 @@
value="/opt/gnome/include"> value="/opt/gnome/include">
</listOptionValue> </listOptionValue>
<listOptionValue <listOptionValue
value="/usr/gnu/include" builtIn="true"
builtIn="true"> value="/usr/gnu/include">
</listOptionValue> </listOptionValue>
</option> </option>
<option <option
name="Defined Symbols" name="Defined Symbols"
command="-D" command="-D"
valueType="definedSymbols" id="sub.tool.opt.def.symbols"
id="sub.tool.opt.def.symbols"> valueType="definedSymbols">
<listOptionValue <listOptionValue
value="BUILTIN" builtIn="true"
builtIn="true"> value="BUILTIN">
</listOptionValue> </listOptionValue>
</option> </option>
<option <option
name="More Includes" name="More Includes"
command="-I" command="-I"
valueType="includePath" id="sub.tool.opts.inc.paths.more"
id="sub.tool.opts.inc.paths.more"> valueType="includePath">
<listOptionValue <listOptionValue
value="C:\home\tester/include" builtIn="false"
builtIn="false"> value="C:\home\tester/include">
</listOptionValue> </listOptionValue>
<listOptionValue <listOptionValue
value="&quot;../includes&quot;" builtIn="false"
builtIn="false"> value="&quot;../includes&quot;">
</listOptionValue> </listOptionValue>
</option> </option>
<option <option
name="User Objects" name="User Objects"
valueType="userObjs" id="sub.tool.opt.objs"
id="sub.tool.opt.objs"> valueType="userObjs">
<listOptionValue <listOptionValue
value="obj1.o" builtIn="false"
builtIn="false"> value="obj1.o">
</listOptionValue> </listOptionValue>
<listOptionValue <listOptionValue
value="obj2.o" builtIn="false"
builtIn="false"> value="obj2.o">
</listOptionValue> </listOptionValue>
</option> </option>
</tool> </tool>
@ -262,8 +262,8 @@
<target <target
isTest="true" isTest="true"
name="Test Sub Sub" name="Test Sub Sub"
parent="test.sub"
binaryParser="org.eclipse.cdt.core.ELF" binaryParser="org.eclipse.cdt.core.ELF"
parent="test.sub"
defaultExtension="tss" defaultExtension="tss"
makeCommand="nmake" makeCommand="nmake"
id="test.sub.sub"> id="test.sub.sub">
@ -274,14 +274,11 @@
<dynamicElementProvider <dynamicElementProvider
class="org.eclipse.cdt.core.build.managed.tests.TestManagedConfigProvider"> class="org.eclipse.cdt.core.build.managed.tests.TestManagedConfigProvider">
</dynamicElementProvider> </dynamicElementProvider>
<dynamicElementProvider
class="org.eclipse.cdt.core.build.managed.tests.BadManagedConfigProvider">
</dynamicElementProvider>
<target <target
isTest="true" isTest="true"
name="Forward Grandchild" name="Forward Grandchild"
parent="test.forward.child.target"
binaryParser="org.eclipse.cdt.core.tests.target1" binaryParser="org.eclipse.cdt.core.tests.target1"
parent="test.forward.child.target"
id="test.forward.grandchild.target"> id="test.forward.grandchild.target">
<toolReference <toolReference
command="newcommand" command="newcommand"
@ -292,8 +289,8 @@
isTest="true" isTest="true"
osList="win32,solaris,linux" osList="win32,solaris,linux"
name="Forward Child" name="Forward Child"
binaryParser="org.eclipse.cdt.core.tests.target2"
parent="test.forward.parent.target" parent="test.forward.parent.target"
binaryParser="org.eclipse.cdt.core.tests.target2"
id="test.forward.child.target"> id="test.forward.child.target">
<toolReference <toolReference
id="test.forward.tool"> id="test.forward.tool">