diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml index 8f677251d11..e1e6fa41835 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/plugin.xml @@ -4609,6 +4609,111 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip new file mode 100644 index 00000000000..06f064520f8 Binary files /dev/null and b/build/org.eclipse.cdt.managedbuilder.core.tests/resources/test30Projects/TestATO/TestATO.zip differ diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java new file mode 100644 index 00000000000..94cfc30a918 --- /dev/null +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/CmdLineApplicabilityCalculator.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright (c) 2005 Texas Instruments Inc. and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Texas Instruments Inc. - initial API and implementation + *******************************************************************************/ +package org.eclipse.cdt.managedbuilder.core.tests; + +import org.eclipse.cdt.managedbuilder.core.IHoldsOptions; +import org.eclipse.cdt.managedbuilder.core.IBuildObject; +import org.eclipse.cdt.managedbuilder.core.IOption; +import org.eclipse.cdt.managedbuilder.core.IOptionApplicability; + +/** + * + */ +public class CmdLineApplicabilityCalculator implements IOptionApplicability { + + /* (non-Javadoc) + * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionUsedInCommandLine() + */ + public boolean isOptionUsedInCommandLine( + IBuildObject config, + IHoldsOptions holder, + IOption option) { + return true; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionVisible() + */ + public boolean isOptionVisible( + IBuildObject config, + IHoldsOptions holder, + IOption option) { + return false; + } + + /* (non-Javadoc) + * @see org.eclipse.cdt.managedbuilder.core.IOptionApplicability#isOptionEnabled() + */ + public boolean isOptionEnabled( + IBuildObject config, + IHoldsOptions holder, + IOption option) { + return false; + } + +} diff --git a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java index 15632862633..cd845adfd62 100644 --- a/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java +++ b/build/org.eclipse.cdt.managedbuilder.core.tests/tests/org/eclipse/cdt/managedbuilder/core/tests/ManagedProject30MakefileTests.java @@ -33,7 +33,6 @@ import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager; import org.eclipse.cdt.managedbuilder.core.IConfiguration; import org.eclipse.cdt.managedbuilder.core.IResourceConfiguration; import org.eclipse.cdt.managedbuilder.core.ITool; -import org.eclipse.cdt.managedbuilder.core.IToolChain; import org.eclipse.cdt.managedbuilder.internal.core.Tool; import org.eclipse.cdt.managedbuilder.internal.core.ToolChain; import org.eclipse.cdt.managedbuilder.projectconverter.UpdateManagedProjectManager; @@ -79,6 +78,7 @@ public class ManagedProject30MakefileTests extends TestCase { suite.addTest(new ManagedProject30MakefileTests("testTopTC")); suite.addTest(new ManagedProject30MakefileTests("CDTFortranTest1")); suite.addTest(new ManagedProject30MakefileTests("CDTFortranTest2")); + suite.addTest(new ManagedProject30MakefileTests("TestATO")); return suite; } @@ -571,4 +571,17 @@ public class ManagedProject30MakefileTests extends TestCase { IProject[] projects = createProjects("CDTFortranTest2", null, null, true); buildProjects(projects, makefiles); } + + /* (non-Javadoc) + * tests the InputType assignToOption attribute + */ + public void TestATO(){ + IPath[] makefiles = { + Path.fromOSString("makefile"), + Path.fromOSString("objects.mk"), + Path.fromOSString("sources.mk"), + Path.fromOSString("subdir.mk")}; + IProject[] projects = createProjects("TestATO", null, null, true); + buildProjects(projects, makefiles); + } }