blob: c256a2d68ed28f636f26ccee3d76106319f76dd6 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1">
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
<meta http-equiv="Content-Style-Type" content="text/css">
<title>Managed Build System Extensibility Document</title>
<link rel="stylesheet"
href="http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/cdt-home/cdt.css?cvsroot=Tools_Project"
type="text/css">
<link rel="stylesheet" href="../../../book.css" type="text/css">
<style>
<!--
h3
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:13.0pt;
font-family:Arial}
-->
</style>
<!--[if !mso]>
<style>h2
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:0in;
page-break-after:avoid;
font-size:14.0pt;
font-family:Arial;
font-style:italic}
table.MsoTableGrid
{border:1.0pt solid windowtext;
font-size:10.0pt;
font-family:"Times New Roman";
}
li.MsoNormal
{mso-style-parent:"";
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman";
margin-left:0in; margin-right:0in; margin-top:0in}
h4
{margin-top:12.0pt;
margin-right:0in;
margin-bottom:3.0pt;
margin-left:.6in;
text-indent:-.6in;
page-break-after:avoid;
tab-stops:list .6in;
font-size:12.0pt;
font-family:"Times New Roman";
}
table.MsoNormalTable
{mso-style-parent:"";
font-size:10.0pt;
font-family:"Times New Roman";
}
</style>
<![endif]-->
</head>
<body>
<!-- Document Header -->
<table border="0" cellpadding="2" width="100%">
<tbody>
<tr>
<td align="left" width="72%">Managed Build
System Extensibility Document<br>
This document describes the design of the
managed build system and how to extend it.</td>
<td width="28%"><img src="http://dev.eclipse.org/images/Idea.jpg"
alt="idea" height="86" width="120"></td>
</tr>
</tbody>
</table>
<table border="1">
<tr>
<td width="50%" rowspan="4">Authors</td>
<td width="50%"> <a href="mailto:sevoy@ca.ibm.com">Sean Evoy</a></td>
</tr>
<tr>
<td width="50%"><a href="mailto:leo.treggiari@intel.com">Leo Treggiari</a></td>
</tr>
<tr>
<td width="50%"><a href="mailto:mikhail.sennikovsky@intel.com">Mikhail
Sennikovsky</a></td>
</tr>
<tr>
<td width="50%"><a href="mailto:recoskie@ca.ibm.com">Chris Recoskie</a></td>
</tr>
<tr>
<td width="50%" rowspan="8">Revision Date</td>
<td width="50%">10/21/2003 - Version: 0.1.0</td>
</tr>
<tr>
<td width="50%">09/10/2004 - Version: 2.0.0</td>
</tr>
<tr>
<td width="50%">11/08/2004 - Version: 2.1.0</td>
</tr>
<tr>
<td width="50%">8/10/2005 - Version 3.0.0</td>
</tr>
<tr>
<td width="50%">9/28/2005 - Version 3.0.1</td>
</tr>
<tr>
<td width="50%">05/09/06 - Version 3.1</td>
</tr>
<tr>
<td width="50%">06/22/07 - Version 4.0</td>
</tr>
<tr>
<td width="50%">02/23/11 - Version 4.0.1</td>
</tr>
<tr>
<td width="50%" rowspan="8">Change History</td>
<td width="50%" height="22">0.1.0 - Document Creation</td>
</tr>
<tr>
<td width="50%">2.0.0 - Updated for CDT 2.0</td>
</tr>
<tr>
<td width="50%">2.1.0 - Updated for CDT 2.1</td>
</tr>
<tr>
<td width="50%">3.0 - Updated for CDT 3.0</td>
</tr>
<tr>
<td width="50%">3.0.1 - Updated for CDT 3.0.1</td>
</tr>
<tr>
<td width="50%">3.1 - Updated for CDT 3.1</td>
</tr>
<tr>
<td width="50%">4.0 - Added link to
<a href="../../cdt_build_system/whats_new/4.0/whats_new_CBS_40.html">&quot;what's
new in 4.0&quot; document</a></td>
</tr>
<tr>
<td width="50%">4.0.1 - Added Option/Category Enablement as of CDT 8.0</td>
</tr>
</table>
<br>
<!-- End of Document Header --><!-- Table of Contents -->
<div class="section">Table of Contents</div>
<br>
<div class="indent"><a href="#_TocSectionIntro">1 Introduction</a>
<A href="#_TocSectionIntro_1"><DIV class="indent">1.1 Who Needs This Information</DIV></A>
<A href="#_TocSectionIntro_2"><DIV class="indent">1.2 Managed Build System Overview</DIV></A>
<div class="indent"><a href="#_TocSectionIntro_3">1.3 The Standard Build System</a></div>
</div>
<div class="indent"><a href="#_TocSectionUIModel">2 User Model</a>
<div class="indent"><a href="#_TocSectionUIModel_1">2.1 User Scenarios</a></div>
</div>
<div class="indent"><a href="#_TocSectionGrammar">3 Build Model Grammar Elements</a>
<div class="indent"><a href="#_TocSectionGrammar_1">3.1 Model</a></div>
<div class="indent"><a href="#_TocSectionGrammar_2">3.2 Project Type</a></div>
<div class="indent"><a href="#_TocSectionGrammar_3">3.3 Managed Project</a></div>
<div class="indent"><a href="#_TocSectionGrammar_4">3.4 Configuration</a></div>
<div class="indent"><a href="#_TocSectionGrammar_5">3.5 Tool Chain</a></div>
<div class="indent"><a href="#_TocSectionGrammar_6">3.6 Builder</a></div>
<div class="indent"><a href="#_TocSectionGrammar_7">3.7 Target Platform</a></div>
<div class="indent"><a href="#_TocSectionGrammar_8">3.8 Tool</a></div>
<div class="indent"><a href="#_TocSectionGrammar_9">3.9 InputType</a></div>
<div class="indent"><a href="#_TocSectionGrammar_10">3.10 AdditionalInput </a></div>
<div class="indent"><a href="#_TocSectionGrammar_11">3.11 OutputType</a></div>
<div class="indent"><a href="#_TocSectionGrammar_12">3.12 Option Category</a></div>
<div class="indent"><a href="#_TocSectionGrammar_13">3.13 Option</a></div>
<div class="indent"><a href="#_TocSectionGrammar_14">3.14 List Option Value</a></div>
<div class="indent"><a href="#_TocSectionGrammar_15">3.15 Enumerated Option Value</a></div>
<div class="indent"><a href="#_TocSectionGrammar_16">3.16 Resource Configuration</a></div>
<div class="indent"><a href="#_TocSectionGrammar_17">3.17 Environment Variable Build Path</a></div>
<div class="indent"><a href="#_TocSectionGrammar_18">3.18 Managed Build Revision</a></div>
<div class="indent"><a href="#_TocSectionGrammar_19">3.19 Option/Category Enablement</a></div>
<div class="indent"><a href="#_TocSectionGrammar_20">3.20 Dynamic Element Provider</a></div>
</div>
<div class="indent"><a href="#_TocSectionUIElements">4 UI Representation</a>
<div class="indent"><a href="#_TocSectionUIElements_1">4.1 New Project Wizard</a></div>
<div class="indent"><a href="#_TocSectionUIElements_2">4.2 Build Property Page</a></div>
</div>
<div class="indent"><a href="#_TocSectionMakefile">5 Build File Generation</a>
<div class="indent"><a href="#_TocSectionMakefile_1">5.1 Default Build File Generator</a></div>
</div>
<div class="indent"><a href="#_TocSectionTutorial">6 Tutorial: An Example Tool
Integration</a>
<div class="indent"><a href="#_TocSectionTutorial_1">6.1 Setting up your Environment</a></div>
<div class="indent"><a href="#_TocSectionTutorial_2">6.2 Creating your Plug-in Project</a></div>
<div class="indent"><a href="#_TocSectionTutorial_3">6.3 Creating the Extension</a></div>
<div class="indent"><a href="#_TocSectionTutorial_4">6.4 Adding a ProjectType</a></div>
<div class="indent"><a href="#_TocSectionTutorial_5">6.5 Adding a Configuration</a></div>
<div class="indent"><a href="#_TocSectionTutorial_6">6.6 Adding a ToolChain</a></div>
<div class="indent"><a href="#_TocSectionTutorial_7">6.7 Adding a Builder</a></div>
<div class="indent"><a href="#_TocSectionTutorial_8">6.8 Adding a TargetPlatform</a></div>
<div class="indent"><a href="#_TocSectionTutorial_9">6.9 Adding a Tool</a></div>
<div class="indent"><a href="#_TocSectionTutorial_10">6.10 Adding Input and Output Types</a></div>
<div class="indent"><a href="#_TocSectionTutorial_11">6.11 Testing the ProjectType</a></div>
<div class="indent"><a href="#_TocSectionTutorial_12">6.12 Adding Tool Options</a></div>
<div class="indent"><a href="#_TocSectionTutorial_13">6.13 Taking the Next Step</a></div>
</div>
<div class="indent"><a href="#_TocSectionDynamic">7 Adding Dynamic Behavior</a>
<div class="indent"><a href="#_TocSectionDynamic_1">7.1 Overview</a></div>
<div class="indent"><a href="#_TocSectionDynamic_2">7.2 Replacing the Build File Generator</a></div>
<div class="indent"><a href="#_TocSectionDynamic_3">7.3 Replacing the Dependency Calculator</a></div>
<div class="indent"><a href="#_TocSectionDynamic_4">7.4 Replacing the Command Line Generator</a></div>
<div class="indent"><a href="#_TocSectionDynamic_5">7.5 Determining if a Tool Chain is Installed</a></div>
<div class="indent"><a href="#_TocSectionDynamic_6">7.6 Defining Environment Variables</a></div>
<div class="indent"><a href="#_TocSectionDynamic_7">7.7 Defining a Build Path Resolver</a></div>
<div class="indent"><a href="#_TocSectionDynamic_8">7.8 Defining Build Macros</a></div>
<div class="indent"><a href="#_TocSectionDynamic_9">7.9 Defining a Configuration Name Provider</a></div>
<div class="indent"><a href="#_TocSectionDynamic_10">7.10 Defining an Output Name Provider</a></div>
<div class="indent"><a href="#_TocSectionDynamic_11">7.11 Defining an Option Value Handler</a></div>
<div class="indent"><a href="#_TocSectionDynamic_12">7.12 Defining an Option Applicability Calculator</a></div>
<div class="indent"><a href="#_TocSectionDynamic_13">7.13 Defining a Dynamic Element Provider</a></div>
<div class="indent"><a href="#_TocSectionDynamic_14">7.14 Adding Custom Pages to the New Project Wizard</a><br>
<a href="#_TocSectionStartup_15">7.15 Defining Startup Behavior for Build Configuration Loading </a><br>
</div>
</div>
<div class="indent"><a href="#_TocSectionAdvanced">8 Advanced Features</a>
<div class="indent"><a href="#_TocSectionAdvanced_1">8.1 Converting CDT 2.0 Manifest Files</a></div>
<div class="indent"><a href="#_TocSectionAdvanced_2">8.2 Supporting Multiple Versions of a Tool-chain</a></div>
</div>
<!-- End of Table of Contents --><br>
<p class="section"><a name="_TocSectionIntro">1 Introduction</a></p>
<p style="margin-top: 0; margin-bottom: 0"><strong><span style="color:#FF0000">NOTE: </span>
</strong>the document describes the CDT Managed Build System (MBS) 3.x functionality.
Although there have been lots of significant changes made to the Build System in
the 4.0, the document still remains valid since all the 4.0 build system changes
were made by extending the MBS functionality described in this document.
As of CDT 8.0, MBS 4.0 is still used although with a number of improvements
not necessarily reflected in this document.</p>
<p style="margin-top: 0; margin-bottom: 0">Please refer to the
<a href="../../cdt_build_system/whats_new/4.0/whats_new_CBS_40.html">&quot;What's new
in the CDT Build System 4.0&quot; document</a> for the list and description of
additional new functionality presented in CDT 4.0</p>
<p>C and C++ developers are a diverse group. The tools they use, the
processes they follow, and the level of support they expect from their
development environments vary widely. The CDT provides a framework for
integrating those tools into Eclipse and the managed build system is
part of that framework. Understanding how the managed build system
works, and what steps are required to extend it is the focus of this
document.</p>
<p>Much of the text in this document is taken from the managed build system (MBS)
design documents that are contained in the Eclipse Bugzilla data base.&nbsp; The
authors of these documents include Mikhail Sennikovsky, Bob Monteleone, Sunil
Davasam, Chris Recoskie, Lars Kurth, and Bala Torati.&nbsp; These design
documents are a source of additional information regarding particular MBS
functionality.&nbsp; Note that these documents are not necessarily kept up to
date after the initial design, where-as this document attempts to be up to date.&nbsp;
Here is a list of some of the documents:</p>
<ul>
<li>Custom Build Steps (#88922)</li>
<li>Tool-chain Installation Support (#87478)</li>
<li>Tool-chain Multi-version Support (#89872)</li>
<li>Build Environment Variables (#88497)</li>
<li>Build Macros (#89210)</li>
<li>Custom Project Wizard Pages (#90334)</li>
<li>Shared Tool Options (#90481)</li>
</ul>
<p class="subsection"><a name="_TocSectionIntro_1">1.1 Who Needs This
Information</a></p>
<p>The information in this document describes the design of the managed
build system and discusses how to add new tool-chain definitions to it
through the <code>buildDefinitions</code> extension point. It is
intended for someone
who wants to understand how the managed build system works, or is
interested in adding their own tool-chain specification to it.</p>
<p>The CDT managed build system comes configured to generate Gnu makefiles
to build executables,
static libraries, and shared libraries using the Gnu compiler
collection (GCC). If you have
access to GCC tools on your platform and find the predefined project-types
sufficient for your
needs, then you do not need to modify anything. Please
feel free to skip sections 3, 6, 7 and 8, as they are primarily concerned
with adding new tool integrations to the build model.</p>
<p>If you are working with tools other than GCC, or you wish to create
project-types that CDT does not support out of the box, you can add a
description of your project-type/toolchain and make the CDT pick up the
information you provide with your definitions. With the CDT 4.0 you can do this
for both cases whether you are willing the CDT to automatically generate
makefiles for your project or not.</p>
<p>If you choose to add your own tools to the managed build system, it
is assumed that you are familiar with XML and the Eclipse extension
point mechanism. Having made the standard disclaimer, it should be said
that the tutorial in &sect; 6 presents a cookbook approach to adding a
new tool specification, so you can always jump right in and refer to
the online help in the <span style="font-style: italic;">Platform
Plug-in Developer Guide</span> if you
get stuck.</p>
<p class="subsection"><a name="_TocSectionIntro_2">1.2 Managed Build System
Overview</a></p>
<p>The managed build system consists of several components that
interact to build a project. At the core of the managed build system is
the build model. It is the central clearing house for all the
build-related information that internal and external clients require.
There are three internal clients; the user interface components, a
build file generator that is
responsible for generating correct build files for a project when it is built,
and the built-in parser supplied with the CDT. The external clients are the
end-user, who interacts with the build model through the user interface, and
tool
integrators who supply tool definitions to the build model. The diagram
below shows the basic set of
relationships
between these components.</p>
<p>
<img src="./image002.gif"
title="Figure 1 Managed build system overview"
alt="Build model logical elements" style="border: 0px solid ;"></p>
<h5>Figure 1 Managed build system overview</h5>
<p class="subsection">1.2.1 External Users</p>
<p>From the perspective of the build system, there are two external users. The
first is the end-user who interacts with it through the UI elements described in
§ 5. The UI includes a new project wizard that relies on the build system to
tell it what kinds of new projects can be created. When the project has been
created, the project property page uses the information in the build system to
populate its display. The user can change the information associated with the
tools for a project through the property page and the build system is
responsible for saving those changes between sessions. The second external user
is the tool integrator who adds information about their tool-chain to a plug-in
manifest as described in the tutorial in § 6. The tool integrator is the primary audience for this document.
</p>
<p class="subsection">1.2.2 Internal Users</p>
<p>There are three internal clients of the information in the managed
build system. The first is the build file generator that creates
correct build files for a project based on the tools and settings defined
for the project in the build system. The second is the built-in CDT
parser that relies on the build system to tell it about the include
paths and defined preprocessor symbols for a given project so that it
can properly construct an internal representation of the compilation
unit the file belongs to. The third client is the UI component of the
build system that queries the build model for the tools and options
defined for a project to build its display and store the user settings.</p>
<p class="subsection">1.2.3 Built-in Compiler Settings</p>
Every compiler relies on having a correct set of preprocessor
symbols
and header file search paths to perform proper builds. Even compilers
from the same vendor may use different symbols and search paths when
building for different operating systems. Some of these values may be
defined by the user, but others will be built into the tools themselves
so the user will be unaware of them. The CDT parser
described in the previous section needs
to know about the entire set to properly parse source files. It is the
responsibility of the MBS to answer both the user-supplied and built-in paths
and symbols to the parser. Of the two, the user-supplied include paths and
defines are trivial as they are entered by the user through the UI. The built-in
compiler settings on the other hand, are quite a bit harder to decipher and the
solution will vary from tool to tool. A discussion of the possible solutions is
provided in § 6.12.<br>
<p class="subsection">1.2.4 Tool Definitions and Settings Storage</p>
A key feature of the managed build system is that it is extensible.
Tool integrators
can use the grammar, described in &sect; 3, to add
their own tools to the
build system. The same grammar is used to save the settings that the
user overrides through the UI between sessions, in the project's .cdtbuild file.<p class="subsection"><a name="_TocSectionIntro_3">1.3 The Standard Build
System</a></p>
<p>There is also a standard build system supplied as part
of the CDT framework that is unrelated to the managed build system. The
standard system provides a small set of tools to build a user&rsquo;s
projects. The user is expected to supply a makefile which includes
enough information to build their project. The UI allows the user to
switch between targets defined in the makefile, and can dynamically
discover build settings at run-time to allow the parser to function
correctly.</p>
<p>The decision to use the standard or managed build system is a
trade-off. For users with an existing project that already has a set of
working makefiles, or for users that prefer (or need) to write their
own
makefiles,
the standard system may be perfect. However, many users find writing
and maintaining makefiles for projects to be a chore. For these users,
the trade-off for the convenience of not having to maintain them is the
flexibility of being in control of the makefiles.</p>
<p class="section"><a name="_TocSectionUIModel">2</a> User Model</p>
<p class="MsoNormal" style="margin-top:6.0pt">The CDT user&rsquo;s model of the MBS
contains the following primary objects:&nbsp;</p>
<table class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0" style="border-collapse: collapse; border: medium none" id="table9">
<tr>
<td width="127" valign="top" style="width: 95.4pt; border: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Project Type</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: 1.0pt solid windowtext; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">A tool-integrator-defined
class of project which acts as a template for the projects that a user
will create.&nbsp; The template specifies one or more default configurations,
and can optionally provide code generation capability to create an
initial set of input resources for the project.&nbsp; The template can also
present various options in Wizard Pages that allow the user to further
customize the project. </td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Project</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">A user-defined instance of
a particular project type along with a set of user specified input
resources and configurations.</td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Configuration</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">A particular tool-chain
(possibly customized with additional or different tools), a set of
options for those tools, and other information which define a unique way
to build a project.&nbsp; Examples include building a project for debugging,
building a project for release, or building a project for a different
target platform.</td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Tool-chain</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">An ordered set of tools
used to transform the project resources into the final output (build
artifacts) of the project.&nbsp; A tool integrator can provide a family
of tool-chains that support different host/target platform combinations,
and different versions of the tool-chain.</td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Tool&nbsp; </td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">A utility of some sort
that is used in the build process.&nbsp; A tool will generally process one or
more resources to produce output resources.&nbsp; Most tools have a set of
options that can be used to modify the behavior of the tool.</td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Option</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">An individual control that
the user can set to modify the behavior of a tool.</td>
</tr>
<tr>
<td width="127" valign="top" style="width: 95.4pt; border-left: 1.0pt solid windowtext; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">Option Category</td>
<td width="463" valign="top" style="width: 347.4pt; border-left: medium none; border-right: 1.0pt solid windowtext; border-top: medium none; border-bottom: 1.0pt solid windowtext; padding-left: 5.4pt; padding-right: 5.4pt; padding-top: 0in; padding-bottom: 0in">
<p class="MsoNormal" style="margin-top:6.0pt">A named set of options
used for grouping similar options together in a hierarchy.</td>
</tr>
</table>
<p class="subsection"><a name="_TocSectionUIModel_1">2.1 User Scenarios</a></p>
<p>The following sections describe how the user interacts with MBS.&nbsp; Text
in <span style="color:#FF0000">red </span>indicates MBS functionality that is not yet
implemented, but is intended to be implemented in future releases of MBS.</p>
<h3 class="subsection">2.1.1 Creating a New Project</h3>
<p class="MsoNormal" style="margin-top:6.0pt">The CDT user&rsquo;s experience with the
MBS begins when she creates a new Managed Make project.&nbsp; The user picks the type
of project to create from the list of project types defined in the installed
manifest files.&nbsp; The list of project types is, by default, filtered by:</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in; margin-right: 0in; margin-top: 6.0pt; margin-bottom: .0001pt">
<span style="font-family: Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>The project type must contain at least one default configuration
that uses a tool-chain that supports the host operating system and architecture.</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in; margin-right: 0in; margin-top: 6.0pt; margin-bottom: .0001pt">
<span style="font-family: Symbol; ">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>If the project type implements the method
of verifying that its support has been installed, the method must return TRUE.</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in; margin-right: 0in; margin-top: 6.0pt; margin-bottom: .0001pt">
<span style="font-family: Symbol; color: red">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span><span style="color:red">The user may remove installed and
possibly-installed (i.e. the project type does NOT implement the method of
verifying that its support has been installed) project types from future
consideration by turning them off in the MBS Preferences page.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user may turn off project type
filtering, however configurations that use tool-chains that are not installed
will not be able to be built on the host system.</p>
<p class="MsoNormal" style="margin-top:6.0pt">After selecting the project type,
the user selects 1 &#8230; <em>n </em>configurations for her new project from the list
of configurations defined in the project type.&nbsp;
Different configurations can use different tool-chains. The list of
configurations is, by default, filtered by:</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in; margin-right: 0in; margin-top: 6.0pt; margin-bottom: .0001pt">
<span style="font-family: Symbol">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>The tool-chain used by the configuration must support the host
operating system and architecture.</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in; margin-right: 0in; margin-top: 6.0pt; margin-bottom: .0001pt">
<span style="font-family: Symbol; ">·<span style="font:7.0pt &quot;Times New Roman&quot;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span></span>If the tool-chain implements the method of
verifying that its support has been installed, the method must return TRUE.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The user may turn off
configuration filtering, however configurations that use tool-chains that are
not installed will not be able to be built on the host system.</p>
<p class="MsoNormal" style="margin-top:6.0pt">After selecting the initial set of
configurations for the project, the user can select any of the standard tabs in
the &ldquo;Additional Project Settings&rdquo; page in order to customize additional options
that are common to all Managed Build system projects (e.g., the projects that the new project depends upon, etc.).</p>
<p class="MsoNormal" style="margin-top:6.0pt">The user
can proceed to any additional pages provided by the project type in order to
customize project type specific options.&nbsp; For example, these additional options
can result in generating initial code for the project and/or setting tool
options that are different from the project type defaults.</p>
<p class="MsoNormal" style="margin-top:6.0pt">After creating the new project,
the user can use any of the Eclipse methods of adding files to the project.</p>
<h3 class="subsection">2.1.2 Adding a New Configuration</h3>
<p class="MsoNormal" style="margin-top:6.0pt">The user can create a new
configuration based upon the settings used by one of the existing
configurations.&nbsp; <span style="color:red">The user can select a different
tool-chain from the project type if desired.&nbsp; This allows a project type to be
defined (e.g., &ldquo;Gnu Executable&rdquo;) that contains tool-chains for multiple
combinations of host and target platforms, and/or for multiple versions of a
tool-chain.&nbsp; It should be easy for a user to take an existing CDT project to a
different host system and quickly create a configuration that builds on that
host system using a version of the tool-chain that supports the new host.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user
can also pick 1 &#8230; <em>n </em>configurations from the list of default
configurations defined in the project type.&nbsp; The list of configurations is, by
default, filtered as specified above.</p>
<h3 class="subsection">2.1.3 Modifying the Tool-chain of the Configuration</h3>
<p class="MsoNormal">The user can select a configuration
and modify the following attributes of the tool-chain: </p>
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="1">
<li style="margin-top: 6.0pt">
The command used to invoke a
particular tool in the tool-chain.</li>
<li style="margin-top: 6.0pt">
The set of error parsers to
be used with the build output and the order that the error parsers will be
invoked </li>
<li style="margin-top: 6.0pt">
The binary parser to be used
with the build binary outputs.</li>
<li style="margin-top: 6.0pt">
The set of file extensions
that are processed by a tool.</li>
<li style="margin-top: 6.0pt">
The
addition of Custom Build steps before or after the build.&nbsp; The user specifies the commands
to be executed by the step.</li>
<li style="margin-top: 6.0pt">
The mapping of an individual
resource to a Custom Build step.&nbsp; The user specifies the commands to be
executed by the step, the input
dependencies of the step, and the output files that are created by the
step.</li>
<li style="margin-top: 6.0pt">
The mapping of
a set of file extensions to a Custom Build step.&nbsp; The user specifies the commands
to be executed by the step, the input
dependencies of the step, and the output resources that are created by the
step.</li>
<li style="margin-top: 6.0pt">
<span style="color:red">The
tool-chain itself:&nbsp; The user can change the tool-chain to be used with the
configuration.&nbsp; All applicable settings are automatically transferred to the
new tool-chain.</span></li>
<li style="margin-top: 6.0pt">
<span style="color:red">The
mapping of an individual resource to a tool:&nbsp; </span>
<span style="color:red">The available tools come from the configuration&rsquo;s
tool-chain, from a different tool-chain or from individually defined tools.</span></li>
<li style="margin-top: 6.0pt">
<span style="color:red">The
mapping of a set file extensions to a category of tools
or a specific tool:&nbsp; The user can modify the current assignments and add new
assignments.&nbsp; The available tools come from the configuration&rsquo;s tool-chain,
from a different tool-chain or from individually defined tools.</span></li>
</ol>
<h3 class="subsection">2.1.4 Modifying the Tool Options of the Configuration</h3>
<p class="MsoNormal" style="margin-top:6.0pt">The user can modify the options of
an individual configuration<span style="color:#FF0000">, or he can make changes to a set of configurations
that he has selected</span>.&nbsp; <span style="color:#FF0000">The user can select a set of configurations individually</span><span style="color:red">
or by selecting a &ldquo;category&rdquo; of configurations.&nbsp; The names of the categories are
defined by the configuration provider &#8211; &ldquo;debug&rdquo; and &ldquo;release&rdquo; are commonly
supported.&nbsp; Categories which group configurations by target platform could also
be useful.&nbsp; </span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user can modify the options of
a tool used by the configuration. &nbsp;<span style="color:red">A tool can verify
that the new value is valid and an error message will be displayed if the value
is not valid.&nbsp; The current value of a build setting is bolded if the value if
different from the default value for the tool.&nbsp; The user can easily set the
value back to the default value without knowing what the default value is.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt"><span style="color:red">The user
can modify certain &ldquo;well known&rdquo; build settings for multiple selected
configurations, even when the configurations do not use the same tool-chain.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user
can use Build Macros in all options that accept text.&nbsp; MBS pre-defines many
useful macros and allows tool integrators and the CDT user to define
additional macros.&nbsp; Additional macros can be defined in the MBS preferences page
and for individual projects or configurations.&nbsp; Build Macros are referenced in strings by
enclosing them in braces, preceded by a dollar sign.</p>
<p class="MsoNormal" style="margin-top:6.0pt"><span style="color:red">Tool
integrators may define property setting &ldquo;wizards&rdquo; that modify sets of tool
options in order to reach an overall user-desired goal.&nbsp; An example would be a
&ldquo;Most Highly Optimized Build&rdquo; wizard that set options on multiple tools.</span></p>
<h3 class="subsection">2.1.5 Modifying the Tool Options of an Individual File</h3>
<p class="MsoNormal" style="margin-top:6.0pt">The user can specify different
configuration specific build settings for individual files in the project.<span style="color:red">
The current value of a build setting is bolded if the value is different from
the value in the configuration.&nbsp; The user can easily set the value back to
the configuration value without knowing what that value is.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user can add or remove a
Custom Build step for an individual resource.<span style="color:red">&nbsp; </span>
The step<span style="color:red"> can execute before or after the tool assigned
to the resource, or they can </span>execute instead of the tool assigned to the
resource.&nbsp; The user specifies the tool command line, the input dependencies
of the step, and the output resources that are created by the step.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The user
can mark individual files to not be used in the building of the selected
configuration(s).</p>
<h3 class="subsection">2.1.6 Building a Configuration</h3>
<p class="MsoNormal">The user can build projects from within the Eclipse/CDT
user interface, or from a command line that can be placed in a batch/script
file.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The user can build the currently
active configuration<span style="color:red">, or select a different set of
configurations to build.</span></p>
<p class="MsoNormal" style="margin-top:6.0pt">The user
can rebuild an individual resource separate from building the entire project.</p>
<h3 class="subsection">2.1.7 Upgrading a Project to a New MBS or Tool-chain
Version.</h3>
<p class="MsoNormal">MBS defines a version number that is stored in every MBS
project file (.cdtbuild).</p>
<p class="MsoNormal" style="margin-top:6.0pt">When MBS reads a project file with
an older version number:</p>
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="1">
<li style="margin-top: 6.0pt">
MBS asks the user to confirm
the conversion.</li>
<li style="margin-top: 6.0pt">
If the user confirms the
conversion, the project file is converted and the project can no longer be
loaded by previous versions of MBS.</li>
<li style="margin-top: 6.0pt">
If the user does not confirm
the conversion, the MBS information is loaded in a read-only mode, and any
changes made to the MBS information will be discarded when the project is
closed.</li>
</ol>
<p class="MsoNormal" style="margin-top:6.0pt">When MBS reads a project file with
a newer version number, it displays an error message, and does not load the MBS
information.&nbsp; None of the MBS operations are available on the project (for
example, editing build properties, cleaning, building, &#8230;).</p>
<p class="MsoNormal" style="margin-top:6.0pt">Some of the build model elements (tool-chain, tool, or builder) can
also define a version number.&nbsp; The version number is appended to the end of
the element id, and stored by MBS with each reference to the element.&nbsp; MBS attempts
to resolve references in the following manner:</p>
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="1">
<li style="margin-top: 6.0pt">
MBS looks up the id with the
version specified with the reference.&nbsp; </li>
<li style="margin-top: 6.0pt">
If not found, MBS looks up
all occurrences of the id, and selects a match in the following order:
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="a">
<li style="margin-top: 6.0pt">
the id with the closest
higher version number that lists the referenced version in its <em>
versionsSupported</em> attribute</li>
<li style="margin-top: 6.0pt">
the id with no version
information specified</li>
</ol>
</li>
</ol>
<p class="MsoNormal" style="margin-top:6.0pt">If a match is found, there are 2
scenarios:</p>
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="1">
<li style="margin-top: 6.0pt">
The version is still
actively supported by the tool integrator, and the MBS information is
loaded.</li>
<li style="margin-top: 6.0pt">
The version specifies that a
conversion to a later version of the tool-chain/tool/builder is required.&nbsp;
At the discretion of the tool-chain/tool/builder, the conversion may occur
automatically, or the converter may prompt the user to confirm the upgrade.&nbsp;
The same rules apply as above for whether or not the user confirms the
conversion.</li>
</ol>
<p class="MsoNormal" style="margin-top:6.0pt">If no match is found, MBS displays
an error message, and does not load the MBS information.&nbsp; None of the MBS
operations are available on the project (for example, editing build properties,
cleaning, building, &#8230;).</p>
<p class="section">3<a name="_TocSectionGrammar"> Build Model Grammar Elements</a></p>
<p>The managed build system defines a grammar to describe tool and build
information. This information is used to store invariant data, like the command
line invocation for a specific compiler, for example. The build system also
stores user settings between sessions, like the level of debugging information
that is needed for a particular build configuration. The following section
describes the format of the grammar and what the information is used for by the
build model.&nbsp; See the CDT 3.0 Gnu tool-chain definitions for an example of
using the managed build object model.</p>
<h3>Common Attributes</h3>
<p>Many of the MBS elements require the specification of the <em>id </em>
attribute.&nbsp; The attribute value typically takes a form similar to Eclipse
package names, e.g. &quot;cdt.managedbuild.tool.gnu.c.linker&quot;.&nbsp; Each <em>id</em>
must be unique within MBS and among all of the loaded manifest files.&nbsp; It is suggested that you include your company/organization name in
the <em>id</em>s that you create.</p>
<p>Many of the MBS elements can specify the <em>name </em>attribute.&nbsp; The
attribute value is used in the MBS user interface, and may therefore change if
your tool-chain supports more than one language.&nbsp; You can use a plugin.properties file in order to define these strings in an external file (see
the Gnu tool-chain definitions for an example).</p>
<p>Many of the MBS elements can specify the <em>superClass </em>attribute.&nbsp;
The attribute value is the id of an element of the same type as this element.&nbsp;
For most attributes, when the value of an attribute is not specified in an
element, the value will default to the value defined by the first super-class
ancestor that specifies a value for the attribute.</p>
<h3>Schema Notes</h3>
<ul>
<li>Attributes highlighted in <span style="background-color: #FFFF00">yellow</span>
indicate functionality that is new since CDT 3.0.1.</li>
<li>Attributes highlighted in <span style="background-color: #00FFFF">aqua</span>
indicate attributes that have been deprecated.&nbsp; Each of these
attributes describes the new method to use to obtain equivalent
functionality.</li>
<li>The &quot;Required&quot; column can contain 3 values.&nbsp; &quot;Yes&quot; means
that the attribute is required by the schema for every instance of the element.&nbsp;
&quot;No&quot; means that the attribute is never required and an appropriate default is
supplied if necessary.&nbsp; &quot;In Hierarchy&quot; means that the attribute is not
required by the schema, but MBS requires that the attribute be specified
either by the element itself, or inherited from one of its ancestors (see the <em>superClass
</em>attribute).</li>
</ul>
<p class="subsection"><a name="_TocSectionGrammar_1">3.1 Model</a></p>
<p class="MsoNormal" style="margin-top:6.0pt">The figure below shows a UML model
of the schema elements.&nbsp; It is simplified by leaving out the fact that the
configuration, toolChain, tool, targetPlatform, and builder definition elements
can be defined at the top level in a manifest file.</p>
<p>
<img
src="./image003.gif"
title="Figure 2 Managed build model elements"
alt="Build model grammar elements" style="border: 0px solid ;"></p>
<h5>Figure 2 Managed build model elements</h5>
<p class="subsection"><a name="_TocSectionGrammar_2">3.2 ProjectType</a></p>
<p class="MsoNormal">The projectType element represents the project-type in the
user model.&nbsp; It is a tool-integrator-defined class of project which acts as a
template for the projects that a user will create.&nbsp; The projectType contains one
or more children of type configuration.&nbsp; These are the default configurations
that the user can choose from. &nbsp;Note that there is no reason to define a projectType element in a .cdtbuild file.&nbsp; It would never be used since
projectType elements are used to populate the New Project dialog boxes.</p>
<p class="MsoNormal" style="margin-top:6.0pt">You must provide a unique identifier for the project-type in the <em>id</em>
attribute. The build model uses this information to distinguish between the
project-type definitions it finds.&nbsp; You must
also
provide a meaningful <var>name</var> that will be displayed to the
user
in the UI and new project wizards.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Project-types can be arranged into
hierarchies to promote the efficient sharing of configurations. If you have
defined a project-type that should not be selected by the user, but is a root
for other project-types, it may be declared abstract by setting the <em>
isAbstract</em> attribute to &lsquo;true&rsquo;. Abstract project-types do not appear in the
UI.&nbsp; Descendents of an abstract project-type will have the same
configurations that the abstract project-type has. For these children to
function properly, their <em>superClass</em> attribute must contain
the unique identifier of the super-class project-type.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A concrete project type must have
at least one configuration defined for it. A configuration must define (or
inherit) a set of tool-chain definitions that work together to produce the build
goal as an output.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A projectType may define a project
level environment variable provider in the <em>projectEnvironmentSupplier</em> attribute.&nbsp; See §
7.6 for additional information.<br>
</p>
<p class="MsoNormal" style="margin-top:6.0pt">A projectType may define a project
level macro provider in the <em>projectMacroSupplier</em> attribute.&nbsp; See §
7.8 for additional information.<br>
</p>
<p class="subsection">3.2.1 Schema</p>
<table
style="border: medium none ; border-collapse: collapse; width: 669px; "
border="1" cellpadding="0" cellspacing="0" height="170">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top;" height="22">
<p align="left">Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top;" height="22">
<p align="left">Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;" height="22">
<p align="left">Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="33">
<p>id</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="33">
<p>A unique identifier that the model manager will use to keep track of
this specific element.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="33">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="17">
<p>name</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
<p>The name for the projectType that is displayed to the user in the
UI.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="17">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
The unique identifier of the projectType that this projectType is derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
<p>isAbstract</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
<p>Flags the projectType as abstract.&nbsp; An abstract
projectType can not be selected by the user in the UI, but projectTypes
derived from this projectType will inherit its attributes and children.&nbsp;
The default value is false.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
<p>isTest</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
<p>A projectType can be flagged for test purposes only.&nbsp; It
can be manipulated programmatically, in JUnit tests for example, but not
selected by the user in the UI.&nbsp; The default value is false.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49" bgcolor="#FFFFFF">
projectMacro Supplier</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The name of a class that implements the IProjectBuildMacroSupplier
interface in order to provide project level build macros.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49" bgcolor="#FFFFFF">
projectEnvironment Supplier</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The name of a class that implements the IProjectEnvironmentVariableSupplier
interface in order to provide project level environment variables.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49" bgcolor="#FFFFFF">
configurationName Provider</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The name of a class that implements the IConfigurationNameProvider
interface in order to provide a default name for a configuration.&nbsp;
The configuration names in a user's project must be unique.&nbsp; A
projectType can contain configuration children with the same name.&nbsp;
In this case, a configurationNameProvider must be specified to make the
names unique before they are displayed to the user in the New Project
and New Configuration dialog boxes.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49" bgcolor="#FFFFFF">
convertToId</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The identifier of a projectType, that project types loaded using this
definition should be converted to. MBS will invoke a proper converter.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_3">3.3 Managed Project</a></p>
<p class="MsoNormal">The managedProject element represents a project instance in
the .cdtbuild file.&nbsp; Note that there is no reason to define a project element in
a manifest file &#8211; it would never be used.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The following steps occur when a
CDT user creates a new Managed Build project:</p>
<ol>
<li>A new managedProject element is
created.&nbsp; Its <em>projectType</em> attribute is set to the projectType that
the user selected.&nbsp; Its <em>name</em> attribute is set to the project name
that the user entered.</li>
<li>When the user adds a
default configuration, the selected configuration element is cloned to
become a child of the managedProject element created in step 1.</li>
<li>Add a tool-chain element
that specifies as its <em>superClass</em> the tool-chain that is the child of
the selected configuration element.</li>
<li>For each tool element
child of the tool-chain that is the child of the selected configuration
element, create a tool element child of the cloned configuration&rsquo;s
tool-chain element that specifies the original tool element as its <em>
superClass</em>.</li>
</ol>
<p class="MsoNormal" style="margin-top:6.0pt">This prepares the new
project/configurations for modification by the user.</p>
<p class="subsection">3.3.1 Schema</p>
<table
style="border: medium none ; border-collapse: collapse; width: 669px; "
border="1" cellpadding="0" cellspacing="0" height="72" id="table3">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top;" height="22">
<p align="left">Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top;" height="22">
<p align="left">Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;" height="22">
<p align="left">Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="17">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
The name for the managedProject that is displayed to the user in the
UI. This is the name that the user entered in the New Project wizard.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="17">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="33">
projectType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="33">
The unique identifier of the projectType that was used when
creating this project.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="33">
yes</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_4">3.4 Configuration</a></p>
<p class="MsoNormal" style="margin-top:6.0pt">The configuration element
represents the configuration in the user model.&nbsp; A tool-integrator defines
default configurations as children of the project type.&nbsp; These provide a
template for the configurations added to the user&rsquo;s project, which are stored in
the project&rsquo;s .cdtbuild file.&nbsp; A projectType must have at least one default
configuration defined for it, and a project must always contain at least one
configuration.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The configuration contains one
child of type tool-chain.&nbsp; This describes how the project&rsquo;s resources are
transformed into the build artifact.&nbsp; The configuration is responsible for
maintaining the name of the final build goal. The user selects the name of the
build artifact in the UI, and the configuration maintains it in the <em>
artifactName</em> and <em>artifactExtension </em>attributes.&nbsp; The
configuration can contain one or more children of type resourceConfiguration.&nbsp;
These describe build settings of individual resources that are different from
the configuration as a whole.&nbsp; </p>
<p class="MsoNormal" style="margin-top:6.0pt">Each configuration must have a unique identifier specified in the <var>id</var>
attribute that will be used by the build model to manage the
configuration. It must also have a <var>name</var> that will be
displayed in the UI in the build property page and new project wizards.&nbsp;
The configuration contains the information needed to &ldquo;clean&rdquo; the build files on
the host machine. &nbsp;The configuration can specify the <em>cleanCommand</em>
attribute which specifies a command that removes the build files.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The<em> prebuildStep,
preannounceBuildStep, postbuildStep </em>and <em>postannouncebuildStep </em>
attributes define a custom build step to be run before and/or after the the
build steps defined by the tool-chain.&nbsp; These attributes are not typically
defined in the manifest file, but are instead added by a user from the
configuration properties user interface.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Additional configuration attributes are described in the schema table below.</p>
<p class="subsection">3.4.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table4">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
A unique identifier that the model manager will use to keep
track of this specific configuration.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
Human-readable name for the configuration to be used in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
parent</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The unique identifier of the configuration that this
configuration is derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
artifactName</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The name of the build goal defined by the configuration.&nbsp;
This can be set by the user in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
artifactExtension</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The extension that the build goal will have, for example
&lsquo;.exe&rsquo; or &lsquo;.so&rsquo;</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
in hierarchy</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
cleanCommand</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The command to remove intermediary and output files on the
build machine.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
in hierarchy</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
errorParsers</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The semi-colon separated list of the default error parsers
to be used with this configuration.&nbsp;The list is ordered with the first
error parser on the list invoked first, the second error parser second,
and so on.&nbsp; The list may contain the error parsers defined by CDT and/or
other installed error parser extensions.&nbsp; The list of error parsers to
be used may be changed by the user on a per-configuration basis.&nbsp; When
specified, this overrides the tool-chain errorParsers attribute.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
prebuildStep</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the pre-build command(s), which runs prior to the standard MBS
build.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
preannouncebuild Step</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the post-build command(s), which runs after the standard MBS
build.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
postbuildStep</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the string to be displayed when the pre-build command step is
run.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
postannouncebuild Step</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the string to be displayed when the post-build command step is
run.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
description</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the description of the configuration that will be displayed to
the user while creating a project and managing configurations.&nbsp; The
description is only displayed in the UI - it is not considered to be
part of the configuration name.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_5">3.5 Tool Chain</a></p>
<p class="MsoNormal" style="margin-top:6.0pt">The toolChain element represents
the tool chain in the user model.&nbsp; It is a tool-integrator-defined set
of tools that transform the project&rsquo;s input into the project&rsquo;s outputs. &nbsp;A
tool-chain can be defined as part of a configuration, or as an independent
specification that is referenced in a separate configuration via the toolChain
superclass attribute.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The toolChain contains one or more
children of type tool.&nbsp; These define the tools used in the tool-chain.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The toolChain contains one child
of type targetPlatform.&nbsp; This defines the architecture/os combination(s) where
the outputs of the project can be deployed.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The toolChain contains one child
of type builder.&nbsp; This defines the &ldquo;build&rdquo; or &ldquo;make&rdquo; utility that is used to
drive the transformation of the inputs into outputs. </p>
<p class="MsoNormal" style="margin-top:6.0pt">The tooChain may contain one or
more children of type optionCategory and option.&nbsp; These define tool-chain
wide settings that are not specific to a particular tool.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Typically a tool-chain is hosted
only on a limited subset of operating system/architecture combinations. For
example, it does not make much sense to allow a user to try to build a Solaris
shared library project if they are running Eclipse and CDT on Windows. You can
specify the operating systems and architectures that the tool-chain is supported
on as a comma-separated list in the <em>osList</em> and <em>archList</em>
attributes. </p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool-chain should specify the <em>
targetTool </em>attribute to identify the tool that runs to generate the primary
build output.&nbsp; If this is not specified, MBS uses the file extension
of the build artifact name supplied by the user.&nbsp; This will work when the
user uses one of the extensions expected by the tool, but will not work if they
do not.</p>
<p class="MsoNormal" style="margin-top:6.0pt">MBS supports multiple versions of
a tool-chain.&nbsp; The <em>versionsSupported</em><strong> </strong>attribute contains a
list of supported versions of a particular tool chain. This indicates that there
is no need to perform a conversion when user imports/loads a project with one of
the supported tool chain versions. When a tool integrator decides to no longer
support a version of a tool chain, they continue to ship the old tool chain
definition and specify the id with version number of the tool chain definition
to convert to in the <em>convertToId</em> attribute.&nbsp; If changes to the project
information need to be performed by the conversion, the tool chain must provide
a converter extension to perform the conversion.&nbsp; If no converter extension is
provided, then there won&rsquo;t be any conversion.&nbsp; See § 8.2 for additional
information.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool-chain may define a
configuration level environment variable provider in the <em>configurationEnvironmentSupplier</em> attribute.&nbsp; See §
7.6 for additional information.<br>
</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool-chain may define a
configuration
level macro provider in the <em>configurationMacroSupplier</em> attribute.&nbsp; See §
7.8 for additional information.<br>
</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool-chain may be associated
with a scanner configuration profile that defines how to discover built-in compiler defines and
includes search paths.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Additional tool-chain attributes are described in
the schema table below.</p>
<p class="subsection">3.5.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table5">
<tbody>
<tr>
<th
style="border-left:1.5pt double windowtext; border-right:1pt solid windowtext; border-top:1.5pt double windowtext; border-bottom:1.5pt double windowtext; width: 17%; vertical-align: top; text-align: left; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
Attribute</th>
<th
style="border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; width: 62%; vertical-align: top; text-align: left; border-left-style:none; border-left-width:medium; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
A unique identifier that the model manager will use to keep track of this
specific toolChain.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Human-readable name for the toolChain to be used in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The unique identifier of the toolChain that this toolChain
is derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
isAbstract</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Flags the toolChain as abstract.&nbsp; An abstract toolChain
must be defined as a top level object in the model definition and cannot
be selected by the user in the UI, but tool-chains derived from this
tool-chain will inherit its attributes and children.&nbsp; The default value
is false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
targetTool</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<span style="font-family: Arial">A semi-colon separated
list of the identifiers&nbsp;of the tools that can be used to create the
build artifact.&nbsp; A list is required, for example, when there are 2
versions of a target tool that are used with different project natures.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
secondaryOutputs</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<span style="font-family: Arial">A semi-colon separated
list of the identifiers of other output types, besides the primary
output of the targetTool, that are also considered to be build
artifacts.&nbsp; The build file generator will ensure that the outputs
get built.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
osList</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<span class="typewriter"><span style="font-size: 10.0pt">
The comma separated list of operating systems that the tool-chain is supported on. &nbsp;The
valid list of</span></span> operating system<span class="typewriter"><span style="font-size: 10.0pt">s
is the string values returned by Platform.getOS().</span></span><br>
I<span class="typewriter"><span style="font-size: 10.0pt">f
the osList attribute is not specified, or if the value is &quot;all&quot;, then
the tool-chain is supported on all operating systems. &nbsp;Otherwise, the
tool-chain is only displayed when CDT is running on one of the specified
operating systems, unless the user has turned off filtering.</span></span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
archList</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span class="typewriter"><span style="font-size: 10.0pt">
The comma separated list of architectures that the tool-chain is supported on. &nbsp;The
valid list of</span></span> <span class="typewriter">
<span style="font-size: 10.0pt">
architectures is the string values returned by Platform.getOSArch().</span></span><br>
<span class="typewriter"><span style="font-size: 10.0pt">
If the archList attribute is not
specified, or if the value is &quot;all&quot;, then the tool-chain is supported on
all architectures. &nbsp;Otherwise, the tool-chain is only displayed when CDT
is running on one of the specified architectures, unless the user has
turned off filtering.</span></span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">errorParsers</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">The semi-colon separated list of the default error
parsers to be used with this tool-chain.&nbsp;The list is ordered with the
first error parser on the list invoked first, the second error parser
second, and so on.&nbsp; The list may contain the error parsers defined by
CDT and/or other installed error parser extensions.&nbsp; When specified,
this overrides the tool errorParsers attributes of the tool children of
the tool-chain and the builder child of the tool-chain.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
configurationMacro Supplier</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The name of a class that implements the IConfigurationBuildMacroSupplier
interface in order to provide configuration level build macros.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
configurationEnviron mentSupplier</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The name of a class that implements the IConfigurationEnvironmentVariableSupplier
interface in order to provide configuration level environment variables.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
isToolChain Supported</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
<p class="MsoNormal">The name of a class that implements the
<span style="font-size: 12.0pt; font-family: Times New Roman">
IManagedIsToolChainSupported </span>interface.&nbsp; This provides a
method to be called to determine if support for the tool-chain is
currently installed on the system.&nbsp; MBS uses this information in
order to filter the choices presented to the CDT user and to inform the
user when support needed by their project is not installed. If the <em>
isToolChainSupported </em>callback is not provided by the tool-chain
definition, the tool-chain is treated as supported.&nbsp; If all
configurations defined for the given project type are not supported the
project type is treated as unsupported.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
versionsSupported</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
Specifies a comma delimited list of versions of this tool-chain that can
be loaded without invoking a converter.&nbsp; See § 8.2 for additional
information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 92.15pt;"
valign="top" height="49">
convertToId</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
The identifier of a tool-chain, that tool-chains loaded using this
definition should be converted to. MBS will invoke the proper converter.&nbsp;
See § 8.2 for additional information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="49">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top"><span style="background-color: #00FFFF">scannerInfoCollector</span></td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">REMOVED - see the scannerConfigDiscoveryProfileId attribute</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">scannerConfig
DiscoveryProfileId</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">Specifies the id of a scanner configuration discovery profile for
gathering the built-in compiler settings for a toolchain.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">optionPathConverter
</td>
<td style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">The name of a class that implements
IOptionPathConverter. Some tools like Cygwin on Windows understand non-standard paths, e.g. "/usr/local/include"
which are not valid on the platform itself and cannot be understood by CDT's PathEntry framework.
The path converter will be called each time when a tool's include or library path settings
are evaluated for use by PathEntry and can change the given path to a platform-compatible format. <br>
An optionPathConverter can be defined globally per toolchain or per tool.
When path translation is required the tool is asked for it's optionPathConverter.
If a converter is defined for the tool it will be used and override any toolchain settings.
If a converter is not defined on the tool, the tool will ask it's toolchain for a converter.
</td>
<td style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_6">3.6 Builder</a></p>
<p class="MsoNormal" style="margin-top:6.0pt">The builder element represents the
utility that drives the build process (typically, but not necessarily, a variant
of &ldquo;make&rdquo;).&nbsp; It defines the command needed to invoke the build utility in the <em>
command</em> attribute. Any special flags that need to be passed to the builder
are defined in the <em>arguments</em> attribute. &nbsp;&nbsp;The builder can specify the
error parser(s) to be used to parse its output.&nbsp; The builder also specifies a
Java class that generates the build file.&nbsp; MBS provides built-in gnu makefile
generation.</p>
<p class="MsoNormal">The builder can specify a number of arguments that apply to
build macros and how they interact with the build file generator.&nbsp; </p>
<p class="MsoNormal">The builder can specify the template of how to convert a
build macro that contains an environment variable into the build file
environment variable format by specifying the <em>variableFormat</em> attribute.
</p>
<p class="MsoNormal">The builder can specify the builder internal (reserved)
macro names and the macro names reserved by a build file generator (used to
store the list of objects files, input files, etc.). This information will be
used by the build file generator in the case where the build environment
variable macros are not to be expanded in the build file. If an environment
variable build macro name conflicts with the name of some reserved macro, it
always gets resolved in the build file. See the <em>reservedMacroNames</em> and <em>
reservedMacroNameSupplier</em> attributes below.</p>
<p class="MsoNormal">The builder can provide the values for the file-context
build macros.&nbsp; To provide the value for the macro ${&lt;macro_name&gt;}, the <em>
macro&lt;macro_name&gt;Value</em> attribute should be specified. The value of this
attribute should be set to the value of the given macro. MBS will resolve the
value of unsupported file-context macros to their actual macro value. In this
case, a separate rule for each file will be generated when file-specific macros
are used.&nbsp; See the gnu tool-chain for an example of setting these
attributes for gnu make.</p>
<p class="MsoNormal" style="margin-top:6.0pt">MBS supports multiple versions of
a builder.&nbsp; The <em>versionsSupported</em><strong> </strong>attribute contains a list
of supported versions of a particular builder. This indicates that there is no
need to perform a conversion when user imports/loads a project with one of the
supported builder versions. When a tool integrator decides to no longer support
a version of a builder, they continue to ship the old builder definition and
specify the id with version number of the new builder to convert to in the <em>
convertToId</em> attribute.&nbsp; If changes to the project information need to be
performed by the conversion, the tool chain definition must provide a converter
extension to perform the conversion.&nbsp; If no converter extension is provided,
then there won&rsquo;t be any conversion.&nbsp; See § 8.2 for additional information.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Additional builder attributes are described in
the schema table below.</p>
<p class="subsection">3.6.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table6">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
A unique identifier that the model manager will use to keep
track of this specific builder.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Human-readable name for the builder to be used in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The unique identifier of the builder that this builder is
derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
isAbstract</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Flags the builder as abstract.&nbsp; An abstract builder must be
defined as a top level object in the model definition and cannot be
selected by the user in the UI, but builders derived from this builder
will inherit its attributes and children.&nbsp; The default value is false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
command</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Specifies the default command to start the build
utility for your toolchain. If the user changes this through the UI, the
overriden value will be stored in the project build file. The build
model will default to this value if the user ever resets a change.&nbsp;
The default is &quot;make&quot;.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
arguments</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Specifies the additional, default arguments
that will be passed to the build utility when it is called by the
builder. If the user changes the flags through the UI, the overriden
value will be stored in the project build settings file. The build model
will default to this value if the user ever resets a change. The default
is &ldquo;-k&rdquo;.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
errorParsers</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Specifies the default list of error parsers used by the builder. These
error parsers are added to this list specified by the parent tool-chain.
It is an ordered, semi-colon separated list of parser IDs. The order
specifies the order in which the error parsers are invoked during a
build.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
buildfileGenerator</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The name of a class that implements IManagedBuilderMakefileGenerator.&nbsp;
See § 7.2 for additional information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
variableFormat</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">The value of this attribute should
be set to the expression representing the variable format. For example,
to generate macros with the ${macro} format, the attribute would contain
${=}.&nbsp; To generate macros with the @macro format, the attribute would
contain @=.&nbsp; If the attribute is not specified or contains the
empty string, this would mean that the builder can not treat environment
variables as its own variables. In this case, the build macros that
contain environment variables are resolved by MBS to their actual
value.&nbsp; The user can also specify that build macros that contain
environment variables be resolved to their actual value, as explained
earlier.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="background-color: #FFFF00">i</span>sVariableCase
Sensitive</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">Specifies whether the
builder variables are case sensitive or not. Can be set to either &ldquo;true&rdquo;
or &ldquo;false&rdquo;. The default is &ldquo;true&rdquo;. If the builder does not support
case-sensitive variables and there are some build environment variables
that differ only in case (Environment variables on Unix-like operating
systems are case sensitive), then those macros will always get resolved
in the buildfile.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
reservedMacro
Names</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">Comma-separated list of reserved
macro names. The macro name could contain either the exact name or the
java regular expression. The latter could be used to supply the pattern
of variable names that are generated by MBS in case the &ldquo;buildVariable&rdquo;
attribute of the &ldquo;InputType&rdquo; element is not specified, etc.&nbsp; If
this attribute is specified and the reservedMacroNameSupplier is not
specified, the following macro names will be treated as reserved:</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in">
1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial">&nbsp;&nbsp;&nbsp;</span>a
macro name that is equal to one of the names specified in the
reservedMacroNames value</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in">
2.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial">&nbsp;&nbsp;&nbsp;</span>a
macro name that matches one of the regexp patterns specified in the
reservedMacroNames value</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in">
3.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial">&nbsp;&nbsp;&nbsp;</span>a
macro name that is equal to one of the build variable names specified
InputType elements of the tools used in the tool-chain</p>
<span style="font-family: Arial">If this attribute is not
specified, MBS will assume that there are no reserved macro names that
could conflict with the build environment variable macros, except names
specified in the &ldquo;buildVariable&rdquo; attribute of the &ldquo;InputType&rdquo; elements:
these names will always be treated as reserved.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
reservedMacro
NameSupplier</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">Should be set to the name of the
class that implements the IReservedMacroNameSupplier interface. If this
attribute is specified the reservedMacroNames attribute is ignored, and
the following macro names will be treated as reserved:</p>
<p class="MsoNormal" style="text-indent: -.25in; margin-left: .25in">
1.<span style="font-style: normal; font-variant: normal; font-weight: normal; font-family: Arial">&nbsp;&nbsp;&nbsp;</span>macro
names that the IReservedMacroNamesSupplier specifies as reserved</p>
<p style="text-indent: -0.25in; margin-left: 0.25in">
<span style="font-family: Arial">2.&nbsp;&nbsp; a macro
name that is equal to one of the build variable names specified
InputType elements in the tools used in the tool-chain.&nbsp;
</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputFile
NameValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputFileName macro value. The macro
specifies the input file name. The input file has the following meaning:<br>
1. If a tool does not accept building multiple files of the primary
input type with one tool invocation, the input file is the file of the
primary input type being built.<br>
2. If a tool accepts building multiple files of the primary input type
with one tool invocation the input file is undefined and the macros
representing the input file contain information about one of the inputs
of the primary input type being built.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputFile
ExtValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputFileExt macro value. The macro
specifies the extension of the input file.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputFile
BaseNameValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputFileBaseName macro value. The macro
specifies the base name of the input file. That is the file name with an
extension stripped.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputFile
RelPathValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputFileRelPath macro value. The macro
specifies the input file path relative to the builder current directory.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputDir
RelPathValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputDirRelPath macro value. The macro
specifies the input file directory path relative to the builder current
directory.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroInputDir
RelPathValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the InputDirRelPath macro value. The macro
specifies the input file directory path relative to the builder current
directory.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroOutput FileNameValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the OutputFileName macro value. The macro specifies the output
file name. The output file has the following meaning:<br>
1. If a tool is not capable of producing multiple files of the primary
output type with one tool invocation the output file is the file of the
primary output type that is built with a given tool invocation.<br>
2. If a tool is capable of producing multiple files of the primary
output type with one tool invocation the output file is undefined and
the macros representing the output file contain information about one of
the files of the primary output type that are built with a given tool
invocation.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroOutput FileExtValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the OutputFileExt macro value. The macro specifies the output
file extension.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroOutput FileBaseNameValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the OutputFileBaseName macro value. The macro specifies the
output file base name. That is the output file name with an extension
stripped.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroOutput FileRelPathValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the OutputFileRelPath macro value. The macro specifies the
output file path relative to the current builder directory.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
macroOutput DirRelPathValue</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Represents the OutputDirRelPath macro value. The macro specifies the
output file directory path relative to the current builder directory.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
versionsSupported</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies a comma delimited list of versions of this Builder that can be
loaded without invoking a converter.&nbsp; See § 8.2 for additional
information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
convertToId</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The identifier of a Builder that Builders loaded using this definition
should be converted to. MBS will invoke the proper converter.&nbsp; See
§ 8.2 for additional information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_7">3.7 Target Platform</a></p>
<p class="MsoNormal">The targetPlatform element represents the os/architecture
combination(s) upon which the output of a tool-chain can be deployed.&nbsp; The <em>
osList </em>and <em>archList</em> attributes contain the Eclipse names of the
operating systems and architectures described by this element.&nbsp;</p>
<p class="MsoNormal" style="margin-top:6.0pt">CDT offers a facility for parsing
binary files if it knows which output format the build artifact has been
produced with. The <em>binaryParser</em> attribute must contain the id of the
appropriate parser if you want build artifacts of the tool-chain to be parsed in
the workspace.</p>
<p class="subsection">3.7.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table7">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
A unique identifier that the model manager will use to keep track of this
specific targetPlatform.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Human-readable name for the targetPlatform to be used in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The unique identifier of the targetPlatform that this
targetPlatform is derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
isAbstract</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Flags the targetPlatform as abstract.&nbsp; An abstract
targetPlatform must be defined as a top level object in the model
definition and can not be selected by the user in the UI, but target
platforms derived from this target platform will inherit its attributes
and children.&nbsp; The default value is false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
osList</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<span class="typewriter"><span style="font-size: 10.0pt">
The list of operating systems that is valid for this target platform.
&nbsp;The valid list of</span></span> operating system<span class="typewriter"><span style="font-size: 10.0pt">s
is the string values returned by Platform.getOS().&nbsp; </span></span>I<span class="typewriter"><span style="font-size: 10.0pt">f
the osList attribute is not specified, or if the value is &quot;all&quot;, then
the target platform supports all operating systems.</span></span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
archList</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span class="typewriter"><span style="font-size: 10.0pt">
The list of architectures that is valid for this target platform. &nbsp;The
valid list of</span></span> architecture<span class="typewriter"><span style="font-size: 10.0pt">s
is the string values returned by Platform.getOSArch().&nbsp; </span></span>I<span class="typewriter"><span style="font-size: 10.0pt">f
the archList attribute is not specified, or if the value is &quot;all&quot;, then
the target platform supports all architectures.</span></span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">binaryParser</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">Semi-colon separated list of the ids of the appropriate parser(s) for the build
artifact</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_8">3.8 Tool</a></p>
<p class="MsoNormal" style="margin-top:6.0pt">The tool element represents the
tool in the user model. <span style="color:red">&nbsp;</span>A tool must have a
unique <em>id</em> for the build model, and a <em>name</em> that is displayed to a
user through the UI. &nbsp;A tool can be defined as part of a tool-chain, or as an
independent specification.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool may contain one or more
children of type option which define the tool command line settings that can be
changed by the user.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool may contain one or more
children of type optionCategory.&nbsp; These are used to simplify the user&rsquo;s
managements of the tool&lsquo;s settings by dividing the options into a hierarchy of
categories. </p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool may contain one or more
children of type inputType and outputType.&nbsp; These define the inputs and
outputs of the tool in the detail necessary for build file generation.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A tool may contain one or more
children of type envVarBuildPath.&nbsp; These specify the names of the
environment variables used by the tool for specifying the include and the
library paths.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Certain tools logically belong to
certain kinds of projects. For example, the Gnu compiler is invoked differently
for C and C++ source files. You can specify a filter for a tool based on the
nature of a project using the <em>natureFilter</em> attribute. When a new C
project is created, a &ldquo;cnature&rdquo; is added to it. New C++ projects have both a
&ldquo;cnature&rdquo; and &ldquo;ccnature&rdquo;. The build model interprets the filter as follows. If
you specify a &lsquo;cnature&rsquo; filter, then the tool will only be displayed if the
project has a &ldquo;cnature&rdquo; and does <em>not</em> have a &ldquo;ccnature&rdquo;. If you specify a
&lsquo;ccnature&rsquo; filter, then the tool will be displayed if the project has a &ldquo;ccnature&rdquo;.
The default if no filter is specified is to display the tool for all projects.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Each tool specifies a <em>command</em>
that will be placed in the build file during the build file generation stage of
building.&nbsp; If the tool
requires a special output flag, such as &lsquo;-o&rsquo; for a compiler or linker, the
implementer must specify that in the <em>outputFlag</em> attribute.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The <em>commandLineGenerator</em>
attribute allows the implementer to specify a class that implements the <code>IManagedCommandLineGenerator</code>
interface.&nbsp; An explanation of how to replace the default command line
generator can be found in § 7.4. </p>
<p class="MsoNormal" style="margin-top:6.0pt">MBS supports multiple versions of
a tool.&nbsp; The <em>versionsSupported</em><strong> </strong>attribute contains a list of
supported versions of a particular tool. This indicates that there is no need to
perform a conversion when user imports/loads a project with one of the supported
tool versions. When a tool integrator decides to no longer support a version of
a tool, they continue to ship the old tool definition and specify the id with
version number of the tool to convert to in the <em>convertToId</em> attribute.&nbsp;
If changes to the project information need to be performed by the conversion,
the tool chain must provide a converter extension to perform the conversion.&nbsp; If
no converter extension is provided, then there won&rsquo;t be any conversion.&nbsp;
See § 8.2 for additional information.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Additional tool attributes are
described in the schema table below.</p>
<p class="subsection">3.8.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
<p>Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
<p>Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
<p>Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>id</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>A unique identifier for the tool that will be used by the
build model.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>name</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>Human-readable name for the tool to be used in the UI.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The unique identifier of the tool that this tool is derived
from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
isAbstract</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Flags the tool as abstract.&nbsp; An abstract tool must be
defined as a top level object in the model definition and can not be
selected by the user in the UI, but tools derived from this tool will
inherit its attributes and children.&nbsp; The default value is false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p><span style="background-color: #00FFFF">sources</span></p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>DEPRECATED - see the inputType element.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
&nbsp;</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p><span style="background-color: #00FFFF">outputs</span></p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>DEPRECATED - see the outputType element.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
&nbsp;</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>outputFlag</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>An optional flag for tools that allow users to specify a name
for the artifact of the tool. For example, the GCC compiler and linker
tools typically allow the user to specify the name of the output with
the '-o' flag, whereas the archiver that creates libraries does not.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p><span style="background-color: #00FFFF">outputPrefix</span></p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>DEPRECATED - see the outputType element.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
&nbsp;</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="background-color: #00FFFF">headerExtensions</span></td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>DEPRECATED - see the inputType element.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
&nbsp;</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
natureFilter</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Filters the display (and use) of the tool by the nature of the project.
Selecting a value of &amp;apos;cnature&amp;apos; insures that the tool will be
displayed IFF there is a cnature associated with the project. A ccnature
will filter this tool out. If &amp;apos;ccnature&amp;apos; is selected, the tool
will only be available for C++ projects. If &amp;apos;both&amp;apos; is
selected, the tool will be displayed when either nature is present. This
attribute is required if it is not inherited from its superClass. The
default value is &quot;both&quot;.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
command</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The command that invokes the tool. For example, gcc for the
Gnu C compiler, or g++ for the Gnu C++ compiler.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
in hierarchy</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
commandLinePattern</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies a command &ldquo;pattern&rdquo; that indicates how the parts
of the command line are used to create the entire command line.&nbsp; The
pattern consists of the replaceable variables COMMAND, FLAGS,
OUTPUT_FLAG, OUTPUT_PREFIX, OUTPUT and INPUTS.&nbsp; The default command line
pattern is <br>
${COMMAND} ${FLAGS} ${OUTPUT_FLAG}${OUTPUT_PREFIX}${OUTPUT} ${INPUTS},
except when customBuildStep is true, where the default is $(COMMAND).&nbsp;
White space and other characters are significant and are copied to the
generated command.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
customBuildStep</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">When True, indicates that
the Tool represents a CDT end-user-defined custom build step.&nbsp; The default is
False.&nbsp; When True, the default value of the commandLinePattern attribute
changes to &ldquo;$(command)&rdquo;.&nbsp; This attribute is used by the
implementation of Custom Build Steps on the MBS configuration property
page.&nbsp; It is not intended for use by tools defined by a
tool-integrator.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
errorParsers</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Contains a semi-colon separated, ordered, list of error
parser ids.&nbsp; MBS adds the error parser(s) to the end of the toolChain
error parser list, if not already present, when a project resource is
defined to use the tool.&nbsp; The error parser(s) can be removed by the CDT
user, and is automatically removed when there are no more project
resources that use the tool.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
announcement</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies a string that is written to the build output prior to each
invocation of the tool. The default value is &ldquo;Invoking tool-name
(tool-id)&#8230;&rdquo;</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
icon</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Path to a 16x16 pixel big icon that is to be displayed instead of the
default icon. The path is relative to the plug-in directory which
defines the build definitions.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
versionsSupported</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies a comma delimited list of versions of this tool that can be
loaded without invoking a converter.&nbsp; See § 8.2 for additional
information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
convertToId</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The identifier of a tool that tools loaded using this definition should be
converted to. MBS will invoke the proper converter.&nbsp; See § 8.2 for
additional information.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p><span style="background-color: #00FFFF">dependencyCalculator</span></p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>DEPRECATED - see the inputType element.<br>
</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
&nbsp;</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>commandLineGenerator</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">The name of a class that implements
IManagedCommandLineGenerator in order to provide custom command line
generation logic.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>optionPathConverter</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">The name of a class that implements
IOptionPathConverter. Some tools like Cygwin on Windows understand non-standard paths, e.g. "/usr/local/include"
which are not valid on the platform itself and cannot be understood by CDT's PathEntry framework.
The path converter will be called each time when a tool's include or library path settings
are evaluated for use by PathEntry and can change the given path to a platform-compatible format. <br>
If a path converter is not defined on the tool, the tool will also ask it's toolchain for a path converter.
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_9">3.9
Input Type</a></p>
<p class="MsoNormal">This element is a child of the Tool element.&nbsp; It describes
one category of input to the tool.&nbsp; A Tool may have multiple InputType element
children.&nbsp; The element may reference an Eclipse content type that corresponds to
the input type.&nbsp; If Eclipse/CDT has not defined an appropriate content type,
then the tool integration can provide an Eclipse content type extension.&nbsp; A
content type describes things such as the file extensions that identify the type
(see the Eclipse
<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
org.eclipse.core.runtime.contentTypes</span> extension point.)&nbsp; </p>
<p class="MsoNormal" style="margin-top:6.0pt">CDT pre-defines the following
content types:</p>
<ul>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">cSource&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .c</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">cHeader&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .h</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">cxxSource&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
.C,.cpp,.cxx,.cc</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">cxxHeader&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .hpp,.hh,.hxx</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">asmSource&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .asm,.s</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">objectFile&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .o,.obj</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">executable&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; .exe</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">staticLibrary&nbsp;&nbsp;&nbsp;&nbsp; .lib,.a</li>
<li>
<p class="MsoNormal" style="margin-top:6.0pt">sharedLibrary&nbsp;&nbsp; .dll,.so,.dylib</li>
</ul>
<p class="MsoNormal" style="margin-top:6.0pt">A tool can define more than one
input type.&nbsp; The primary input type is used in a different manner than any
secondary input types.&nbsp; For a multipleOfType == false primary input type,
the tool is called for each project resource that is of the primary input type.&nbsp;
All files of every secondary input type are added to each invocation of the
tool.&nbsp; For a multipleOfType == true primary input type, the primary inputs
are listed before the secondary inputs.</p>
<p class="MsoNormal" style="margin-top:6.0pt">Calculated dependencies of an
input type are not described by a separate input type, but are instead
determined by a dependency calculator extension callback when necessary.&nbsp; The <var>dependencyCalculator</var> attribute allows the
implementer to specify a class that implements the <code>IManagedDependencyGenerator2</code>
interface. It is the responsibility of this class to answer all of the
source-level dependencies for a given input. A discussion of why this
is important for make-based build utilities can be found in &sect;
5.1.3. An explanation of how to replace the default dependency
calculator can be found in &sect; 7.3.<br>
</p>
<p class="MsoNormal" style="margin-top:6.0pt">Other
attributes of the InputType element are described in the table below.</p>
<p class="subsection">3.9.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table12">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">A unique identifier that
the MBS will use to track this element.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="19">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="19">
<span style="font-family: Arial">The name of the input type
that is displayed to the user in the UI.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="19">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
superclass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">The unique identifier of
the inputType that this inputType is derived from.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
sourceContentType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">The id of an Eclipse
content type that describes this input type.&nbsp; If both the sources
attribute and the sourceContentType attribute are specified, the
sourceContentType will be used if it is defined in Eclipse.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
sources</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">A comma-separated list of
file extensions that the tool will produce output for.&nbsp; Note that the
user will not be able to modify the set of file extensions as they can
when sourceContentType is specified.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
dependencyContent Type</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">The id of an Eclipse
content type used for dependency files.&nbsp; If both the
dependencyExtensions attribute and the dependencyContentType attribute
are specified, the dependencyContentType will be used if it is defined
in Eclipse.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
dependencyExtensions</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">A comma-separated list of
file extensions used by dependency files. Note that the user will not be
able to modify the set of file extensions as they can when
dependencyContentType is specified.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
option</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The id of an Option element that is used on the command line to identify
inputs of this type. If specified, the name(s) of the input files for
this input type are taken from the value specified for the option.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
assignToOption</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The id of an Option element whose value is to be assigned to the file(s)
calculated for this input type. The default is not to assign the input
file(s) to a command line option but to assign the files to the
${Inputs} part of the command line. Note that the option value is only
updated during build file generation and therefore could be out of sync
with the project until build file generation occurs.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
multipleOfType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">True if all of the inputs
of this category are used in one invocation of the tool.&nbsp; The inputs can
be project resources, or the outputs of other tools in the tool-chain.&nbsp;
The default is False.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
primaryInput</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">True is this is considered
the primary input of the tool.&nbsp; The default is False.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
dependencyCalculator</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">The name of a class that
provides the source file dependency calculation for the input type.&nbsp; The
class implements the IManagedDependencyGenerator2 interface.&nbsp; The default
is none.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
buildVariable</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">A variable used in the
build file to represent the list of input files.&nbsp; The same variable name
can be used by an outputType to identify a set of output files that
contribute to this tool&rsquo;s input (i.e., those using the same
buildVariable name).&nbsp; A build variable is ignored when multipleOfType is
false and this is the primary input of the tool. &nbsp;The default name is
chosen by MBS.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_10">3.10
Additional Input</a></p>
<p class="MsoNormal">This element is a child of the InputType element.&nbsp; It
describes additional input of a particular input type.<span style="font-size:10.0pt;font-family:Arial">
</span>An InputType may have multiple AdditionalInput element children.&nbsp;
This element is only present if additional inputs and/or dependencies are
specified by the user (or tool integrator).</p>
<p class="subsection">3.10.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table14">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
paths</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<span style="font-family: Arial">Defines a semi-colon
separated list of the relative or absolute path of the resource(s) to
which this element applies.&nbsp; The resource(s) must be a member of the
project, the output from another tool in the tool-chain, or an external
file.&nbsp; The file name of a path can use GNU Make pattern rule syntax (in
order to generate the name from the output file name).</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="18">
kind</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="18">
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Arial">
Defines the kind of additional input.&nbsp; The valid string values are:
</span></p>
<ul style="margin-top: 0in; margin-bottom: 0in" type="disc">
<li class="MsoNormal">
<span style="font-size:10.0pt;font-family:Arial">
AdditionalDependency &#8211; added as a tool dependency, but not to the
command line.</span></li>
<li class="MsoNormal">
<span style="font-size:10.0pt;font-family:Arial">AdditionalInput &#8211;
added as an additional input to the command line, but not as a
dependency.</span></li>
<li class="MsoNormal">
<span style="font-size:10.0pt;font-family:Arial">
AdditionalInputDependency &#8211; added as both.</span></li>
</ul>
<span style="font-family: Arial">The default is
</span><span style="font-size: 10.0pt; font-family: Arial">
AdditionalInputDependency.</span></td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="18">
No</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_11">3.11
Output Type</a></p>
<p class="MsoNormal">This element is a child of the Tool element.&nbsp; It
describes one category of output created by the tool.&nbsp; A Tool may have multiple
OutputType element children.&nbsp; The element may reference an Eclipse content type
that corresponds to the output type.&nbsp; If Eclipse/CDT has not defined an
appropriate content type, then the tool integration can provide an Eclipse
content type extension.&nbsp; It describes things such as the file extensions that
identify the type (see the Eclipse
<span style="font-size:10.0pt;font-family:&quot;Courier New&quot;">
org.eclipse.core.runtime.contentTypes</span> extension point.) </p>
<p class="MsoNormal" style="margin-top:6.0pt">A number of the OutputType
attributes provide a mechanism for MBS to determine the name(s) of the output
file(s) generated from this OutputType.&nbsp; This is necessary in order for MBS
to generate correct build files, and to allow for input ordering.&nbsp; The precedence
order for determining the output resource names is the following:</p>
<ol style="margin-top: 0in; margin-bottom: 0in" start="1" type="1">
<li style="margin-top: 6.0pt">
If this is the &ldquo;target&rdquo; tool in the tool-chain, and this is the primary
OutputType, use the user-defined artifact name and extension.</li>
<li style="margin-top: 6.0pt">
If the <em>option</em> attribute is specified, use the value of the option.</li>
<li style="margin-top: 6.0pt">
If the <em>nameProvider </em>attribute is specified, call the nameProvider and use
the returned name(s).</li>
<li style="margin-top: 6.0pt">
If the <em>outputNames </em>attribute is specified, use the value of the attribute.</li>
<li style="margin-top: 6.0pt">
Use the <em>namePattern</em> attribute value to construct the name from the input
file name.</li>
</ol>
<p>&nbsp;If the output of the tool usually has a special prefix, like the prefix
&lsquo;lib&rsquo; for libraries on POSIX systems, the implementer must specify this in the <em>outputPrefix</em>
attribute.</p>
<p class="subsection">3.11.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table13">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
id</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
A unique identifier that the MBS will use to track this element.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="19">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The name of the output type that is displayed to the user in the UI.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="18">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
superclass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The unique identifier of the outputType that this outputType is derived
from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
outputContentType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The id of an Eclipse content type that describes this output type. If both
the outputs attribute and the outputContentType attribute are specified,
the outputContentType will be used if it is defined in Eclipse.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
outputs</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The default extension that the tool will produce from a given input. Note
that the user will not be able to modify the set of file extensions as
they can when outputContentType is specified.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
option</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The id of the option that is used on the command line to specify this
output.&nbsp; The default is to use the Tool &ldquo;outputFlag&rdquo; attribute if
primaryOutput is True.&nbsp; If option is not specified, and primaryOutput is
False, then the output file(s) of this outputType are not added to the
command line.&nbsp; If specified, the nameProvider, namePattern and
outputNames are ignored.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
multipleOfType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
True if multiple outputs of this type are created by one invocation of the
tool.&nbsp; The default is False.&nbsp; If True, the nameProvider
attribute or outputNames attribute must be specified.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
primaryInputType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Id of the input type that is used in determining the build &ldquo;rules&rdquo; for the
output type and for the default name of the output file.&nbsp; The default is
the input type with primaryInput == true.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
primaryOutput</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
If True, then this is the primary output of the tool.&nbsp; The default is
False.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="83">
outputPrefix</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="83">
Some tools produce files with a special prefix that must be specified.&nbsp;
For example, a librarian on POSIX systems expects the output to be lib.a
so &lsquo;lib&rsquo; would be the prefix.&nbsp; The default is to use the Tool
&ldquo;outputPrefix&rdquo; attribute if primaryOutput is True, otherwise the default
is an empty string.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top" height="83">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
outputNames</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies the semi-colon delimited, complete set of output resource names
created by the output type.&nbsp; If specified, the namePattern is
ignored.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
namePattern</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
Specifies a name pattern with the file extension, using the Gnu pattern
rule syntax, for deriving the output resource name from the input
resource name.&nbsp; The default, &ldquo;%&rdquo;, is to use the input file base filename
with the output extension.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
nameProvider</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
The name of a class that implements the IManagedOutputNameProvider
interface.&nbsp; When specified, the namePattern and outputNames attributes
are &nbsp;ignored.&nbsp; When multipleOfType is true, this attribute, or
the outputNames attribute, is required
in order for MBS to know the names of the output files.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
buildVariable</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
A variable used in the build file to represent the list of output files.&nbsp;
The same variable name can be used by an inputType to identify a set of
output files that contribute to the tool&rsquo;s input (i.e., those using the
same buildVariable name).&nbsp; The default name is chosen by MBS.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
No</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_12">3.12 Option Category</a></p>
<p>The optionCategory element represents the option category in
the user model.&nbsp; A tool can have a large number of options. To help organize the user
interface for these options, a hierarchical set of option categories
can
be defined. A unique identifier must be specified in the <var>id</var>
attribute. This will be used by the build model to manage the category.
The user will see the value assigned to the <var>name</var>
attribute. If the category is nested inside another category, the
unique
identifier of the higher level category must be specified in the <var>owner</var>
attribute, otherwise specify the identifier of the tool
the category belongs to.</p>
<p class="subsection">3.12.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-left:1.5pt double windowtext; border-right:1pt solid windowtext; border-top:1.5pt double windowtext; border-bottom:1.5pt double windowtext; width: 106px; vertical-align: top; text-align: left; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
<p>Attribute</p>
</th>
<th
style="border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; width: 66%; vertical-align: top; text-align: left; border-left-style:none; border-left-width:medium; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
<p>Description</p>
</th>
<th
style="border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; width: 13%; vertical-align: top; border-left-style:none; border-left-width:medium; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
<p>Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>id</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>Used by the build model to uniquely identify the option
category.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>name</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>A human-readable category name, such as 'Pre-processor
Options'. This will be the name the user sees displayed in the UI.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>owner</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>Option categories can belong to a tool, a toolChain or be nested inside
other option categories. This is the ID of the owner of the category.&nbsp; The default owner
if the parent tool or tool-chain.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top" height="53">
icon</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top" height="52">
Path to a 16x16 pixel big icon that is to be displayed instead of the
default icon.&nbsp; The path is relative to the plug-in directory which
defines the build definitions.</td>
<td
style="border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; width: 13%; vertical-align: top; border-left-style:none; border-left-width:medium; border-top-style:none; border-top-width:medium; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in" height="52">
<p>no</p></td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_13">3.13 Option</a></p>
<p class="MsoNormal">The option element represents the option in the user model.&nbsp;
Options are used to organize and maintain the command arguments that are sent to
tools during the build. Users interact with the build model through the UI to
set the value of options.&nbsp; Each option must have a unique <em>id</em> for the
build model to properly manage it. A descriptive <em>name</em> that will appear in
the UI must be specified. Options can be organized into categories to keep the
UI more manageable. If an option category has been defined for the tool, and the
option should be displayed as part of that category, then the unique identifier
of the option category must be specified in the <em>category</em> attribute.</p>
<p class="subsection">3.13.1 Option Types</p>
<p>Some options contain commands to turn a feature off or on, such as
setting a flag to see descriptive messages from a tool. Others contain
lists of values, such as a set of directories to search for files.
Still
others are a single selection from a pre-determined range of choices,
like the level of debugging information to produce, or the type of
architecture to build for. The <var>valueType</var> attribute is used
to
indicate to the build model what kind of option it is.</p>
<p>Specifying the type of value an option contains is an important
design decision, since it controls how the build model treats the
contents of the option&rsquo;s attributes, and just as importantly, how the
option is displayed to the user. The basic types are <code>string</code>,
<code>boolean</code>, <code>stringList</code>, and <code>enumerated</code>.
</p>
<p>There are also four specialized cases of list options, <code>includePath</code>,
<code>definedSymbols</code>, <code>libs</code>, and <code>userObjs</code>
to manage the
list of paths to search for header files, the defined preprocessor
symbols, external libraries to link against, and object module to link
in respectively.</p>
<p class="subsection">3.13.1.1 String Options</p>
<p class="MsoNormal" style="margin-top:6.0pt">String options are used for tool
commands that take a user-defined value.&nbsp; The UI representation for a string
option is a text box.</p>
<p class="subsection">3.12.1.2 Boolean Options</p>
<p>Boolean options are used to specify an option that is
either true or false. The UI representation for a boolean option is a
check box. The value of the option is set true by selecting the check
box, and false by deselecting it. If true, the <var>command</var>
associated with
the option will be passed to the tool when it is invoked. If false, the
value associated with the <var>commandFalse</var> attribute will be passed.</p>
<p class="subsection">3.13.1.3 Enumerated Options</p>
<p class="MsoNormal" style="margin-top:6.0pt">Enumerated options are used when
the tool command takes a value from a pre-determined range of choices. The UI
representation for an enumerated option is a combo box.&nbsp; Enumerated options may
have enumeratedOptionValue children.&nbsp; Note that when an enumerated option has
enumeratedOptionValue children, the children define the complete set of possible
option values and override the enumeratedOptionValue children of any superclass.</p>
<p class="subsection">3.13.1.4 String List Options</p>
<p class="MsoNormal" style="margin-top:6.0pt">String list options are used for a
tool command that takes a list of user-defined values.&nbsp; The UI representation
for a string list option is a multi-line text box and button bar.&nbsp; String list
options may have listOptionValue children.</p>
<p class="subsection">3.13.1.4.1 Special List Options</p>
<p>There are four special cases of string list options; <code>includePaths</code>
specify the paths to search for header files, <code>definedSymbols</code>
for user-defined preprocessor defines, <code>libs</code> for libraries
that must be linked into the final build goal, and <code>userObjs</code>
for external object files that must be linked.</p>
<p>While specifying these types of options as type <var>stringList</var>
will make them appear in the UI correctly, the build model will not be
able to recognize them as special in any way. Since certain functions
of
the CDT require this information to function correctly, it is important
to flag these types of options appropriately. For example, the search
and indexing function may not perform correctly if the includes paths
and defined symbols are not set for a project. Similarly, the build file
generator may not be able to generate dependencies correctly if it is
unaware that there are libraries and external object files that
participate in
the final build step.</p>
<p class="subsection">3.13.1.4.2 Browse Types</p>
<p>Certain types of list and string options that deal with files or directories
are easier for the user to manipulate if there is a browse button supplied in
the UI. This is especially true for include and library search paths, as well as
library and object file lists. Because the UI needs to know what &quot;type&quot; of
browser to display, the implementer may
specify the <var>browseType</var> for list and string options as <code>none</code>
(default), <code>file</code>, or <code>directory</code>. Note that
the <var>browseType</var> attribute is only used for list and string options. It
is ignored for all other option types.<br>
</p>
<p class="subsection">3.13.2 Values and Default Values</p>
<p class="MsoNormal" style="margin-top:6.0pt">An option can define a default
value that applies to the option until a value has been specified. An option
defines its default value using the <em>defaultValue</em> attribute.&nbsp; When an
option has a value that has been specifically set, the value is contained in the
<em>value</em> attribute.&nbsp; In order to determine the current value of an option,
MBS performs the following steps until a value is found:</p>
<ol>
<li>Examine the <em>value</em>
attribute of the option.</li>
<li>Examine the <em>value</em>
attribute of the option&rsquo;s <em>superClass </em>recursively.</li>
<li>Examine the <em>
defaultValue</em> attribute of the option.</li>
<li>Examine the <em>
defaultValue</em> attribute of the option&rsquo;s <em>superClass recursively</em>.</li>
<li>Use the default value for
the option type.</li>
</ol>
<p class="MsoNormal" style="margin-top:6.0pt">The type of option will determine
how the build model treats the value it finds associated with the attribute.
Options that define simple string values will use the value as-is as described
below.&nbsp; For boolean options any value but the string &lsquo;true&rsquo; will be treated as
false. List options treat all the defined list option values as default, and
enumerated options search through the defined enumerated values for the default.</p>
<p class="subsection">3.13.3 Option Commands</p>
<p class="MsoNormal" style="margin-top:6.0pt">The values stored in the options
are passed to build tools with unique flags, depending on the compiler and the
option. For example, an option defining the paths a linker should search for
libraries might contain a large number of search paths, but each path is passed
to the linker with a &lsquo;-L&rsquo; flag. The <em>command</em> attribute is used to hold the
actual flag to pass along with the option value. </p>
<p class="MsoNormal" style="margin-top:6.0pt">The build model handles the value
it finds associated with the command attribute differently depending on the type
of value the option is managing based on the following heuristic. For string
options the option value is appended to the value of the <em>command </em>
attribute. The <em>command </em>attribute can be empty in order to support an area
for typing in additional options. &nbsp;For enumerated options, the <em>command</em>
associated with the selected enumerated value is used, not the command defined
in the option. For boolean options, the <em>command</em> is used if the option
value is set to true, otherwise the value of the <em>commandFalse</em> attribute
is used. For list options, the <em>command</em> is applied to each element of the
list.</p>
<table style="border: medium none ; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Option Value Type</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Uses Default Value</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Uses Command</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>UI Element</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>string</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Yes</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
Yes</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Text box</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>boolean</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Yes</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Yes if true, else commandFalse</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Check box</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>enumerated</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Yes</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>No.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Combo box</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>stringList</p>
</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>No.</p>
</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>Yes.</p>
</td>
<td
style="border-style: none double double none; border-width: medium 1.5pt 1.5pt medium; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 110.7pt;"
valign="top" width="148">
<p>List and button bar</p>
</td>
</tr>
</tbody>
</table>
<p class="subsection">3.13.4 <span style="background-color: #FFFF00">Option
Applicability</span></p>
<p>This section will be provided in a future version of the document.</p>
<p class="subsection">3.13.5 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
<p>Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
<p>Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
<p>Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>id</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>A unique identifier for the option that will be used by the
build model.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>name</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>Human-readable name for the option to be used in the UI.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
superClass</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The unique identifier of the option that this option is
derived from.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
isAbstract</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Flags the option as abstract.&nbsp; An abstract option must be
defined as a top level object in the model definition and can not be
selected by the user in the UI, but options derived from this option
will inherit its attributes and children.&nbsp; The default value is false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
category</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
This is the id of the option category for this option. The id
can be the id of the tool which is also a category.&nbsp; The default category
is the parent tool.&nbsp; Note that an optionCategory id must be
supplied as the value for an option that is a child of a toolChain.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
valueType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
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.<br>
<br>
Additional special types exist to flag options of special relevance to
the build model; 'include', 'libs', 'userObjs' 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. The makefile generator treats the libs and
userObjs entries differently than other stringLists.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
in hierarchy</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
value</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
Value assigned to the option by the end user or in a
default configuration.&nbsp; For options containing a Boolean
value, the string &lsquo;true&rsquo; is treated as true, any other value as false.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;" height="18">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>defaultValue<br>
</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>Optionally specifies the value for the option if the user has
not edited it. For options containing a Boolean value, the string
&lsquo;true&rsquo; is treated as true, any other value as false.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>command</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>An optional value that specifies the actual command that will
be passed to the tool on the command line.&nbsp; The command
provides a &ldquo;pattern&rdquo; for specifying where the value should be placed for
options of type string and stringlist.&nbsp; The pattern can
contain the replaceable variable &ldquo;value&rdquo;.&nbsp; If no ${value} is specified
in the command, the option value is appended to the end of the specified
command.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">commandFalse</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">An optional value, used only with options of
type Boolean, that specifies the actual command that will be passed to
the tool on the command line when the value of the Boolean option is
False.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">browseType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">This value is used for string and stringlist (and related)
options only. If you need a list option to prompt the user to browse
for a file or directory when adding a new value, set the value of the
attribute accordingly. By default the value is treated as no browsing
needed.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">resourceFilter</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">Specifies the resource types that this option
applies to.&nbsp; The values are &ldquo;project&rdquo;, &ldquo;file&rdquo;, and &ldquo;all&rdquo;.&nbsp; The default
is &ldquo;all&rdquo;.&nbsp; Specifying &ldquo;project&rdquo; indicates that the option is displayed
when modifying a configuration&rsquo;s options, but not when modifying an
individual file&rsquo;s options.&nbsp; Specifying &ldquo;file&rdquo; indicates the opposite.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">valueHandler</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">The name of a class that implements the IManagedOptionValueHandler
interface.&nbsp; This interface is used to dynamically manage the value
of an option.&nbsp; See § 7.11. </td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">valueHandlerExtra Argument</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">An optional extra text string that is passed into the valueHandler.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">applicability Calculator</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">The name of class which is used to determine dynamically at
runtime whether the option is visible, enabled, and used in command line
generation. This class must implement the IOptionApplicability
interface. If no calculator is specified then the option is always
visible, enabled, and used in command line generation.&nbsp; See § 7.12. </td>
<td
style="border-style: none double double none; border-width: medium 1.5pt 1.5pt medium; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top"><span style="background-color: #FFFF00">tip</span></td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">Specifies a &quot;tip&quot; that can be displayed in hover help or on the
property page.</td>
<td
style="border-style: none double double none; border-width: medium 1.5pt 1.5pt medium; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_14">3.14 List Option Value</a></p>
<p>Some options are best described using a list of values. This build
model element is used to define an individual element of a list option.
Typically, these options are populated by the user, not by the person
describing the option. However, if you define one or more values in
your
extension point, they will be displayed in the UI when the user edits
the build settings for the project. If the user modifies those
settings,
the overridden values will be stored by the build model and displayed
in
the UI.</p>
<p>There is an exception to this, however. Certain core functions in
the
CDT rely on the built-in parser to function correctly. In order to
return accurate values, the CDT parser must mimic (as closely as
possible) the preprocessor that ships with the tool. Unfortunately, these tools often have a number of built-in
symbols and include paths that the user is never required to set, and
may be unaware even exist. In those cases, the tool integrator must set those values in the tool definition and flag them by
setting the value of the <var>builtIn</var> attribute to true. Built
in
list option values are never shown to the user, and are only passed to
clients of the build model that specifically request them.</p>
<p class="subsection">3.14.1 Schema</p>
<table
style="border: medium none ; border-collapse: collapse; width: 642px;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
<p>Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
<p>Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
<p>Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>value</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>The contents of the list item. The build model will apply the command defined in the option to each value in the list.</p>
</td>
<td
style="border-style: none double solid solid; border-width: medium 1.5pt 1pt 1pt; border-left: 1pt solid windowtext; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">
<p>builtIn</p>
</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">
<p>This attribute flags the list value as a built-in value as opposed to
something the user has entered. Built-ins will not be passed to clients
that generate command lines (like the makefile generator). However,
clients that need to take these settings into account (like the indexing
service), will receive these settings. These values will appear grey in
the UI.</p>
</td>
<td
style="border-style: none double double solid; border-width: medium 1.5pt 1.5pt 1pt; border-left: 1pt solid windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>no</p>
</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_15">3.15 Enumerated Option
Value</a></p>
<p>Some options are best described as a single selection from a list of
choices. For example, users typically select the level of optimization
they want the compiler to apply when creating a build artifact. The
enumerate option value is used to define the elements of the list of
choices.</p>
<p>Each element of an enumerated option has a <var>name</var> that
will
be shown to the user in the UI. It also has a <var>command</var> which
should correspond to the command line option that gets passed to the
tool by the builder if this element is selected.</p>
<p>A default element can be indicated by setting the value of <var>isDefault</var>
to &lsquo;true&rsquo;. If the user has not overridden the selection in the UI, the
default element will be displayed. If no default is specified, the
first
element in the list is assumed to be the default and is displayed to
the
user.</p>
<p class="subsection">3.15.1 Schema</p>
<table
style="border: medium none ; border-collapse: collapse; width: 681px;"
border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
<p>Attribute</p>
</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
<p>Description</p>
</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
<p>Required</p>
</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>id</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>A unique identifier for the tool that will be used by the
build model.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>name</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>A descriptive name that will be displayed to the user in the
UI as one of the option values to select.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>yes</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>isDefault</p>
</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p>Flags this enumerated value as the default to apply to the
option if the user has not changed the setting.</p>
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>no</p>
</td>
</tr>
<tr>
<td
style="border-style: none solid double double; border-width: medium 1pt 1.5pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">
<p>command</p>
</td>
<td
style="border-style: none solid double none; border-width: medium 1pt 1.5pt medium; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt;"
valign="top">
<p>The command that the enumerated value translates to on the
command line.</p>
</td>
<td
style="border-style: none double double none; border-width: medium 1.5pt 1.5pt medium; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p>yes</p>
</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_16">3.16 Resource Configuration</a></p>
<p class="MsoNormal">The resourceConfiguration element is not visible in the
user model.&nbsp; It is a place to store build attributes of individual resources
that are different from the configuration as a whole.&nbsp; The resourceConfiguration
element can have a tool child that contains the overridden attributes and
options, and/or a tool child that contains a custom build step for the resource.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The resourceConfiguration
attributes are specified in the schema table below.</p>
<p class="subsection">3.16.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table8">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
resourcePath</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The path of the project resource to which this
resourceConfiguration applies.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
exclude</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Specifies whether the resource is excluded from building in
the parent configuration.&nbsp; The default value is false.&nbsp; The
resourceConfiguration element retains its tool children, if any
exist, even when excluded from the build.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
rcbsApplicability</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Identifies how the user desires to apply a resource custom build step:<br>
1. Apply rcbs tool before any other tools defined for the resource.<br>
2. Apply rcbs tool after any other tools defined for the resource.<br>
3. Apply rcbs tool overriding any other tools defined for the resource.<br>
4. Disable (don&amp;apos;t apply) the rcbs tool.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
toolsToInvoke</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
Identifies which tools to invoke by a semicolon separated list of child
tool ids. Applies as follows:<br>
1. Defaults to all tools in the order found<br>
2. Use specified ordered list of children to invoke<br>
3. If empty string, treat as if no resource configuration existed, i.e.,
use project level tool.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_17">3.17
Environment Variable Build Path</a></p>
<p class="MsoNormal">The tool-integrator can specify the names of the
environment variables used by the tool for specifying the include and the
library paths.&nbsp; To specify the build paths variables (either the include
path variables or library path variables) the tool-integrator must define the
envVarBuildPath element as the child of the tool element.&nbsp; The tool element may have several envVarBuildPath elements,
each of those representing the list of environment variable names and the
delimiter or the Build Path Resolver used for those variables.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The envVarBuildPath
attributes are specified in the schema table below.</p>
<p class="subsection">3.17.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table17">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
pathType</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The build path type. Can be one of the following: &ldquo;buildpathInclude&rdquo;,
&ldquo;buildpathLibrary&rdquo;</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
</a>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
variableList</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
comma-separated list of the environment variable names used to store the
include paths</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
pathDelimiter</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p class="MsoNormal">Represent the delimiter used to separate the paths.
If omitted the default system delimiter will be used. That is the &ldquo;:&rdquo;
for Unix-like systems and the &ldquo;;&rdquo; for Windows systems.&nbsp; If the
&ldquo;buildPathResolver&rdquo; attribute is specified, the &ldquo;pathDelimiter&rdquo; is
ignored</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
buildPathResolver</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p class="MsoNormal">The name of a class that implements the IBuildPathResolver interface
that the tool-integrator can supply in order to provide his/her own
logic of resolving the variable values to the build paths</p>
<p class="MsoNormal"><strong>Design note:</strong> the reason why this callback is
needed is because some tools may store the build paths in some special
way or in the format other than &lt;path1&gt;&lt;delimiter&gt;&lt;path2&gt;&lt;delimiter&gt;&#8230;&lt;pathN&gt;.&nbsp;
The example of such a tool is gcc for Win32 Cygwin.&nbsp; The cygwin
version of gcc does not accept the windows-style paths stored in the
build paths environment variables.&nbsp; The path must be specified in
the POSIX format and using the &ldquo;:&rdquo; delimiter, for example: &ldquo;/cygdrive/c/includes:/cygdrive/d/&#8230;&rdquo;</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
no</td>
</tr>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_18">3.18 Managed Build Revision</a></p>
<p>Version identifier for the managed build extension point. It is a
string representation, consisting of three (3) tokens separated by a
decimal point. The 3 tokens are positive integer numbers. This is used
by the build model when it loads a tool definition. The model will
compare the version string in the plugin manifest with its internal
version of the model grammar. If the manifest is compatible with the
internal version, the MBS will do its best to load the manifest
file.<br>
</p>
<p class="subsection">3.18.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table11">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
fileVersion</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
A
string containing the three version tokens </td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
</tbody>
</table>
</a>
<p class="subsection"><a name="_TocSectionGrammar_19">3.19 Option/Category Enablement</a></p>
<p>Tool integrators may supply element <i>enablement</i> to make an element (such as option and option categories) conditionally available</p>
<p>3.19.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table5">
<tbody>
<tr>
<th
style="border-left:1.5pt double windowtext; border-right:1pt solid windowtext; border-top:1.5pt double windowtext; border-bottom:1.5pt double windowtext; width: 17%; vertical-align: top; text-align: left; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
Attribute</th>
<th
style="border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; width: 62%; vertical-align: top; text-align: left; border-left-style:none; border-left-width:medium; padding-left:5.4pt; padding-right:5.4pt; padding-top:0in; padding-bottom:0in">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
type</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
<p class="MsoNormal">represents the applicability type for this enablement.
Can contain the following values:</p>
<p>UI_VISIBILITY - the given enablement expression specifies whether the option is to be visible in UI</p>
<p>UI_ENABLEMENT - the given enablement expression specifies the enable state of the controls that represent the option in UI</p>
<p>CMD_USAGE - the given enablement expression specifies whether the option is to be used in command line</p>
<p>CONTAINER_ATTRIBUTE - the given enablement expressions specifies the container attribute value</p>
<p>ALL - the combination of all the above values</p>
Several types could be specified simultaneously using the &quot;|&quot; as a delimiter, e.g.:
type=&quot;UI_VISIBILITY|CMD_USAGE&quot;
</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">attribute
</td>
<td style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">used with the CONTAINER_ATTRIBUTE enablement to specify the name of the attribute for which this enablement applies. Currently the following option attributes are supported:
&quot;command&quot;
&quot;commandFalse&quot;
&quot;defaultValue&quot;
&quot;value&quot;
&quot;artifactExtension&quot;
</td>
<td style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</tr>
<tr>
<td style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">value
</td>
<td style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">used with the CONTAINER_ATTRIBUTE enablement to specify the value of the attribute specified in the attribute for which this enablement applies.
</td>
<td style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</td>
</tr>
<tr>
<td style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">extensionAdjustment
</td>
<td style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
<p class="MsoNormal">used with the CONTAINER_ATTRIBUTE enablement. true specifies the enablement is defined for adjusting extension elements. false specifies the enablement is defined for non-extension element adjustment. Default value is true.
</td>
<td style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">no</td>
</td>
</tbody>
</table>
<p class="subsection"><a name="_TocSectionGrammar_20">3.20 Dynamic Element Provider</a></p>
<p>Tool integrators may supply this element to dynamically provide the definitions that are otherwise specified in the buildDefinitions extension point.&nbsp;
Each configuration element returned from this IManagedConfigElementProvider
interface is treated as if it were a direct sub-child of a buildDefinitions
extension. As such it should conform to buildDefinitions.exsd. The only
exception is it should not contain nested dynamicElementProvider elements.</p>
<p class="subsection">3.20.1 Schema</p>
<table
style="border: medium none ; width: 670px; border-collapse: collapse;"
border="1" cellpadding="0" cellspacing="0" id="table10">
<tbody>
<tr>
<th
style="border-style: double solid double double; border-color: windowtext; border-width: 1.5pt 1pt 1.5pt 1.5pt; padding: 0in 5.4pt; width: 20%; vertical-align: top; text-align: left;">
Attribute</th>
<th
style="border-style: double solid double none; border-width: 1.5pt 1pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 65%; vertical-align: top; text-align: left;">
Description</th>
<th
style="border-style: double double double none; border-width: 1.5pt 1.5pt 1.5pt medium; border-top: 1.5pt double windowtext; border-right: 1.5pt double windowtext; border-bottom: 1.5pt double windowtext; padding: 0in 5.4pt; width: 15%; vertical-align: top;">
Required</th>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt;"
valign="top">
name</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The name of the dynamic element provider.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
<tr>
<td
style="border-style: none solid solid double; border-width: medium 1pt 1pt 1.5pt; border-left: 1.5pt double windowtext; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
class</td>
<td
style="border-style: none solid solid none; border-width: medium 1pt 1pt medium; border-right: 1pt solid windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
The class that implements the IManagedConfigElementProvider interface. The
logic of determining the elements is left to the implementer, but they
must be correctly formed or the build model will have trouble loading.</td>
<td
style="border-style: none double solid none; border-width: medium 1.5pt 1pt medium; border-right: 1.5pt double windowtext; border-bottom: 1pt solid windowtext; padding: 0in 5.4pt; vertical-align: top;">
yes</td>
</tr>
</tbody>
</table>
</a>
<p class="section"></a><a name="_TocSectionUIElements">4 UI Representation</a></p>
<p>In addition to controlling the way a project is built, the build
model also defines how the user interface will appear. There are two
principle ways a user interacts with the build settings model. The
first
is at project creation time through the New Project wizards, the second
is through the build settings property page.</p>
<p class="subsection"><a name="_TocSectionUIElements_1">4.1 New Project Wizard</a></p>
<p>The new project wizard relies on the project-type and configuration
definitions from all managed build system manifest files to populate the list of choices
it
presents to the user. The figure below shows how the list of project types is
populated with any projectType whose <var>isTest</var> and <var>isAbstract</var>
attribute are set to <code>false</code>. The value of the projectType's <var>name</var>
attribute is
used to populate the drop-down list-box selection widget. See § 2.1.1 for a
description of creating a new project.&nbsp; Similarly,
the configuration
check list is populated with all the defined configurations associated
with the selected projectType. <br>
</p>
<p>
<img style="border: 0px solid ;"
src="./image024.gif"
title="Figure 3 New project wizard"
alt="New project wizard project type selection page"></p>
<h5>Figure 3 New project wizard</h5>
<p class="subsection"><a name="_TocSectionUIElements_2">4.2 Build Property Page</a></p>
<p>The contents of the build property page for a project are created by
examining the tool-chains, tools, option categories, and options defined for the
current configuration. In this section we will look at how
the user interface interprets the information in the build model to
display options to the user.</p>
<p class="subsection">4.2.1 Managing the Configuration</p>
<p>The active configuration information pane of the build property page
consists of two drop-down list controls and a button. The first
drop-down list is currently read-only, and displays the type of project.
The second contains a list of configurations that are defined for the
project. The figure below shows a project targeted solely at a Windows shared
library built with GCC that has two configurations; &lsquo;Release&rsquo; (not shown), and
&lsquo;Debug&rsquo;. Note that the build settings model is queried for the project-type and configuration <var>name</var> information.</p>
<p>
<img style="border: 0px solid ;"
src="./image026.gif"
title="Figure 4 Configuration selection"
alt="Project property page configuration selection/edit area"></p>
<h5>Figure 4 Configuration selection</h5>
<p>Users change the build settings for options associated with
tool-chains and tools. The UI relies on the information in the build
settings model for that information. The figure below shows how the
tool
list, displayed in a tree view, is populated. Tools and tool-chain categories are the root
elements of the tree. Categories are displayed as leaves of the tool
they belong to, or as root elements when they belong to a tool-chain. In all cases, the name defined in the plug-in manifest
is used as the text of the tree elements. Note that the tool uses an
externalized string to identify its name to help internationalize a
tool
specification, but this is not necessary.</p>
<p>
<img style="border: 0px solid ; width: 575px; height: 413px;"
src="./image028.gif"
title="Figure 5 Tools and option category display"
alt="Project property page tool selection area"></p>
<h5>Figure 5 Tools and option category display</h5>
<p>As mentioned in the discussion of the build settings model, options
know what type of data they manage. Different option types require
different UI widgets to properly represent that data to the user. The
figure below shows what UI elements are created for each type of option.</p>
<p>The Compiler Flags option contains a <var>string</var> option. In this
example, the option is intended to be the place the user enters all those extra
flags that are not defined anywhere else in the property page. Options
containing strings display their contents in a simple text box.</p>
<p>The Optimization Level option is an <var>enumerated</var> option.
These types of options force the user to select a single value from a
list of possible choices. Note that the <var>name</var> of the option
is
applied to the label in the UI, whereas the <var>name</var> of each
individual <var>enumeratedOptionValue</var> element is used to
populate
the list.</p>
<p>The Include Paths option is a special case of a <var>stringList</var>
option. The contents of this option are left undefined in this example,
so
the user sees an empty list. However, all list options are displayed in
a list control with an associated button bar for adding, removing, and
reordering list elements. Note that the <var>optionType</var>
attribute
is set to <code>includePath</code>. This notifies the build system
that
it must pay special attention to the values entered in this option.
There are clients of this information in the CDT that will query the
build system for this information, and this is currently the only way
to
flag these values as special.</p>
<p>
<img style="border: 0px solid ;"
src="./image030.gif"
title="Figure 6 Option display"
alt="Project property page option edit area"></p>
<h5>Figure 6 Option display</h5>
<p>Finally Verbose, a Boolean option, is displayed as a check-box.
Since
the default value for this option is defined as <code>false</code>,
the
check-box is left unselected when it is created.</p>
<p>Note that the UI actually builds itself <span
style="font-style: italic;">on the fly</span> based on the options descriptions
in the plug-in manifest. The order of the options is the basis of the page
layout. If the layout is not satisfactory, you must edit the manifest file itself. You must then
restart the workspace after editing the manifest for your changes to
take effect in the UI.</p>
<p class="section"><a name="_TocSectionMakefile">5 Build File Generation</a></p>
<p>The third element of the managed build system is the build file
generator. The build file generator is one of the clients of the
information stored in the build settings model. You can use the default
build file generator that is supplied with the CDT (for Gnu makefiles), or
replace it with a customized generator depending on the variant of build utility
that you wish to use. The relationship between the builder, the build file
generator, and a compiler dependency calculator are shown in the model below.</p>
<p>Note:&nbsp; This figure uses the deprecated interface
IManagedDependencyGenerator instead of IManagedDependencyGenerator2.&nbsp;
However the relationships between the parts remains the same.</p>
<p>
<img style="border: 0px solid ;"
src="./image031.gif"
title="Figure 6 Option display"
alt="Builder, generator, and dependency calculator model"></p>
<h5>Figure 6 Relationship between build file generator and dependency
calculator</h5>
<p class="subsection"><a name="_TocSectionMakefile_1">5.1 Default Build File
Generator</a></p>
<p>The best way to understand how the build file generator works is to
look at a real project. The figures below show the project that we will
be using for the purposes of this discussion. The source for the
project
is spread over the directories <code>source1/</code>, <code>source2/</code>,
and <code>source2/source21</code>. Header files are located in 2
locations; <code>headers/</code>, and <code>source2/source21</code>.
To illustrate the problem of calculating source-level dependencies for <span
style="font-style: italic;">make</span>, <span
style="font-style: italic;">Class1</span> is in a has-a relationship
with <span style="font-style: italic;">Class2</span>.<br>
</p>
<table style="text-align: left; width: 739px; height: 269px;" border="0"
cellpadding="2" cellspacing="2">
<tbody>
<tr>
<td> <img style="border: 0px solid ;"
src="./image032.gif"
title="" alt="Example project"> </td>
<td> <img style="width: 246px; height: 216px;"
alt="Has-a relationship between Class1 and Class2"
src="./image035.gif">
</td>
</tr>
</tbody>
</table>
<p><br>
</p>
<h5>Figure 7 Example project source files</h5>
<p>While simple, this example illustrates some of the problems projects
using <span style="font-style: italic;">make</span> typically face
when source files are organized
hierarchically. One approach to these types of problems is to generate
a
makefile for each subdirectory, then call make recursively, culminating
in the final build step which, in theory, brings all of the build
results together.</p>
<p>The problem with managing this type of approach lies in
understanding
all of the source-level dependencies and handling them properly when
the makefiles are
generated. In order for this to happen, all the dependencies have to be
properly specified and complete. As long as there are no dependencies
between resources in different subdirectories, the makefiles in a
recursive approach will contain a properly partitioned set of
dependencies. However, in a more realistic project organization, the
fragmentary makefiles will have incomplete representations of the
dependencies. In order to correct for this, we would have to do some of
the work that <span style="font-style: italic;">make</span> gives us
for free.</p>
<p>The approach the makefile generator takes is to use a single
makefile
to build the entire project. To keep the makefile manageable and
readable, the makefile generator creates makefile fragments for each
subdirectory of the project that contributes source
code and dependency fragments for each source file, and uses the
include capability of <span style="font-style: italic;">make</span> to
bring them all
together.</p>
<p>The figure below shows the makefile, makefile fragments, and
dependency fragments that are generated for the project. Note that all
generated files and directories are marked as derived so that a CM
system will not check them in.</p>
<p>
<img style="border: 0px solid ;"
src="./image034.gif"
title="" alt="Example project generated files"></p>
<h5>Figure 8 Generated makefiles</h5>
<p>In the next sections, we will examine the makefiles that are
generated by the default build file generator in more detail.</p>
<p class="subsection">5.1.1 Main Makefile</p>
<p> There is one main makefile generated for each project configuration. Based on
information for the configuration, the proper clean command is defined as a
macro. Note that for efficiency, wherever possible the default build file
generator takes advantage of Gnu make's &lsquo;:=&rsquo; and &lsquo;+=&rsquo; variable
assignment operators so that the contents of the makefile macros are
only evaluated when a value is assigned or modified, not every time
they are used. The makefile includes external makefiles that have a
list of build directories, object files, makefile fragments, and
dependency makefiles. </p>
<p>
<img border="0" src="./image036.gif" alt="generated makefile"></p>
<p>This makefile is passed as an argument to <span
style="font-style: italic;">make</span>, so it contains
<span style="font-style: italic;">clean</span>
and <span style="font-style: italic;">all</span>
targets.&nbsp; It contains the build rules for the following types of tools
defined in the tool-chain:</p>
<ol>
<li>The target tool as defined by the tool-chain</li>
<li>All tools where the primary input-type defines multipleOfType == true</li>
<li>All tools that consume the output of type #2 tools</li>
</ol>
<p class="subsection">5.1.2 Makefile Fragments</p>
<p>Obviously, the makefile we just looked at is incomplete. There are no rules
for building source files that are not built by the rules defined in the main
makefile.
However, the build file generator places that information into makefile
fragments for each subdirectory contributing source to the build. The
figure below shows what the fragment for the <code>source1/</code>
subdirectory looks like.</p>
<p><img style="border: 0px solid ;"
src="./image038.gif"
title="" alt="Generated fragment makefile"></p>
<p>As you can see, the fragment contributes one file, <code>class1.cpp</code>,
and a
rule to build all source files with the &lsquo;cpp&rsquo; extension in the
subdirectory where it is located. The content of
the dependency and command lines is derived from the build settings
model. The dependency line is supplied by the build
model which has a list of tools and know which (if any) build files
with a particular
extension. When a tool is found, it is asked for the extension of the
output.
For
the command line, the tool that builds for the extension supplies the
actual command, while the options for the tool supply the arguments to
pass to it. </p>
<p class="subsection">5.1.3 Dependency Makefile Fragments</p>
<p>There is one final piece to the puzzle, and that is a list of
dependencies for each source file in the build. Recall that <span
style="font-style: italic;">make</span>
will rebuild any file that is out of date in its dependency graph, but
it only adds the dependency to the graph if it is explicitly told to do
so. Thus, it is the responsibility of the makefile generator to
completely describe all dependencies for <span
style="font-style: italic;">make</span>. Consider the
dependencies of the final build target to <span
style="font-style: italic;">Class1</span>. It is obvious that if the
implementation file, <span style="font-style: italic;">Class1.cpp</span>,
changes then the object module, <span style="font-style: italic;">Class1.o</span>,
should be rebuilt. In fact, we described that dependency in the
makefile described in &sect; 5.1.2. What may be less clear is that the
object module should be updated if the class description in <span
style="font-style: italic;">Class1.h</span> changes. To make matters
more complex, <span style="font-style: italic;">Class1</span> is in a
has-a relationship with <span style="font-style: italic;">Class2</span>,
so any changes to <span style="font-style: italic;">Class2.h</span>
should result in a rebuild of <span style="font-style: italic;">Class1.o</span>.
Finally, the build file generator puts dummy build targets for each
header file in the dependency list. This is important because if the
header file is moved or deleted, make will try to find a rule to build
the dependency and if a dummy target is not present, it will stop.<br>
</p>
The dependency information added to the makefile depends upon the dependency
calculator used by the tools in the tool-chain.&nbsp; One mode supported by the
MBS is the use of GNU .d files.&nbsp; In this mode, the build file invokes the dependency generator command to generate a separate makefile fragment for each file participating in the build.
The figure below
shows the fragment for&nbsp; <span style="font-family: monospace;">Class1</span><code></code>.
<p>
<img style="border: 0px solid ;"
src="./image040.gif"
title="" alt="Generated dependency makefile fragment"
name="Generated Dependencies"></p>
<p>
Additional dependency calculator modes are supported by the MBS.&nbsp; See §
7.3.</p>
<p class="subsection">5.1.4 Support Makefiles</p>
<p>There are two other makefiles that are generated and included in the
main makefile. The first, <code>sources.mk</code>,
defines a list of source macros, such as <code>C_SRCS</code>, and all
of the subdirectories the builder believes contribute source code to
the build. The second, <code>objects.mk</code>,
contains two special macros used by the build, LIBS and USER_OBJS, which can be
contributed to by options that are marked with a special type in the tool-chain
definition.</p>
<p class="subsection">5.1.5 Inter-Project
Dependencies</p>
<p>A project may reference one or more additional projects in the
workspace. The makefile generator attempts to generate these
dependencies in two ways. First, the makefile must have a dependency on
the build goal of the referenced project in the main target, and it
must
include instructions for building those targets as a separate rule.</p>
<p>For the remainder of this discussion, let us consider the following
basic scenario. Project <code>Makefile Example</code> builds an
executable, <code>Messages.exe</code>. It
references a project, <code>UI Widgets</code>, which builds a shared
library, <code>UIWidgets.dll</code>.
The
main build target in the makefile for <code>Makefile Example</code>
would be generated with the output of <code>UI Widgets</code> as a
dependency. </p>
<p>
<img style="border: 0px solid ;"
src="./image042.gif"
title="" alt="Generated inter-project dependency target"></p>
<p>As you can see from the generated makefile above, the rule for the
target <code>Messages.exe</code> will be run if <code>UIWidgets.dll</code>
has
changed. This works well if the output of the referenced project can be
determined.
For the moment, this is only the case when the referenced project is
managed. Standard make
projects do not know what the output of their build step is since that
information is encoded in the makefile. If a managed project references
a
standard project, it will not have an explicit dependency on the output
of that project.</p>
<p>The managed builder relies on the Eclipse build framework to
properly determine the build order when projects involved in a build
reference other projects. As long as the build takes place inside the
CDT, the managed builder can trust that the build framework will build
the projects in the proper order. </p>
<p class="subsection">5.1.6 Makefile Generator Constraints</p>
<p>The current implementation of the default Gnu makefile generator assumes a
set of constraints that must be met in your tool-chain definition in order for
it to generate valid makefiles:</p>
<ol>
<li>Input files must be specified via project relative or absolute paths.</li>
<li>Output files must be specified via configuration build directory
relative or absolute paths.</li>
<li>A tool with a primary input type where the multipleOfType attribute is
set to true executes once during the build using all of the project
resources and generated outputs that match its input file extensions.&nbsp;
A subset of the full set of input files can be defined using the
buildVariable attribute in the inputType of the tool, and the outputType of
other tools.</li>
<li>If any inputType of a tool has the multipleOfType attribute set to true,
then primary inputType of the tool must have the multipleOfType attribute
set to true.</li>
<li>A tool with a primary input type where the multipleOfType attribute is
set to false executes per project resource and generated output that match
its input file extensions.&nbsp; A subset of the full set of input files can
be defined using the buildVariable attribute in the inputType of the tool,
and the outputType of other tools.</li>
<li>A tool must be able to determine all of its output file names and
dependencies given the name(s) of its primary input file(s).</li>
<li>The main makefile contains the rules for the &quot;target&quot; tool, for all
tools with a primary input type where the multipleOfType attribute is set to
true, and for any tool that consumes the output of these tools.</li>
<li>Each fragment makefile contains the rules for all project resources in
the current directory and for generated outputs that are not consumed by
tools where the multipleOfType attribute is set to true.</li>
</ol>
<p class="section"><a name="_TocSectionTutorial">6 Tutorial: An Example Tool
Integration</a></p>
<p>One of the features of the MBS is that you can add custom project-types and tool
integrations. The tutorial in this section will walk you through
the basic
steps of setting up your environment, creating a new plugin where you
can define a tool integration, and give you pointers for publishing the tool
integration for others to use.<br>
</p>
<p class="subsection">
<a name="_TocSectionTutorial_1">6.1 Setting up your
Environment</a></p>
<p>Tool integrations are specified by extending the <code>buildDefinitions</code>
extension point defined in the <code>org.eclipse.cdt.managedbuilder.core</code>
plug-in. This requires that you have access to the extension point and the
schema that describes it, which are available only from the SDK
version of CDT. To confirm that the SDK is installed, select <span
style="font-weight: bold;">Help &gt; About Eclipse SDK &gt;
Feature Details</span> and check that "Eclipse C/C++ Development Tools
(Source)" and "Eclipse C/C++ Development Tools SDK" appear in the list.
If they do not, simply install the SDK from the same update site you
used to install the CDT.<br>
</p>
<p class="subsection">
<a name="_TocSectionTutorial_2">6.2 Creating your
Plug-in
Project</a></p>
<p>Now that the source for the CDT is available, you will create a
plug-in project containing your tool definitions. Technically the extension can be defined in any plug-in
manifest,
but
for this tutorial we will create a new, empty plug-in project with an
empty plug-in manifest file.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Open the <span style="font-weight: bold;">New Project... </span>wizard
(<span style="font-weight: bold;">File &gt; New &gt; Project...</span>),
choose <span style="font-weight: bold;">Plug-in Project</span>
from the <span style="font-weight: bold;">Plug-in Development</span>
category and click the <span style="font-weight: bold;">Next &gt;</span>
button. <br>
</li>
<li>On the <span style="font-weight: bold;">Plug-in Project </span>page,
use <code>org.eclipse.cdt.example.toolchain</code>
as the name for your project, and click the <span
style="font-weight: bold;">Next &gt;</span> button. <br>
</li>
<li>On the <span style="font-weight: bold;">Plug-in Content</span>
page, you will see that the wizard has set the id to <code>org.eclipse.cdt.example.toolchain</code>
by default. We are going to be defining the tool integration in the
plug-in manifest file without writing any code, so de-select the <span
style="font-weight: bold;">"Generate the Java class that..."</span>
check-box and click on the <span style="font-weight: bold;">Finish</span>
button.</li>
<li>If asked if you would like to switch to the <span
style="font-weight: bold;">Plug-in
Development</span> perspective, answer <span style="font-weight: bold;">Yes</span>.</li>
</ol>
<p class="subsection">
<a name="_TocSectionTutorial_3">6.3 Creating the
Extension</a></p>
<p>You have installed the CDT source and
you have a brand new project with an empty manifest file. You are now
ready to add tool definitions to the managed build system by
extending the <code>buildDefinitions</code> extension point.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>If the MANIFEST.MF file for the plugin was not opened by default when you
switched to the <span style="font-weight: bold;">Plug-in Development</span>
perspective, double click on the <code>org.eclipse.cdt.example.toolchain</code>
project in the <span style="font-weight: bold;">Package Explorer</span>
to expand it. Click on the expansion icon beside META-INF, and then double click on
the <span style="font-weight: 700">MANIFEST.MF</span> file to edit
its contents.</li>
<li>We have to add a dependency between our project and the <code>org.eclipse.cdt.managedbuilder.core</code>
plug-in where the extension point is defined. Click on the <strong>Dependencies</strong>
tab located along the bottom of the manifest editor. Click the <span
style="font-weight: bold;">Add&#8230;</span> button located beside the <span
style="font-weight: bold;">Required Plug-Ins</span>
list. Select <code>org.eclipse.cdt.managedbuilder.core</code> from the
list and then click the <span style="font-weight: bold;">OK</span>
button.</li>
<li>Select the <span style="font-weight: bold;">Extensions</span>
tab located along the bottom of the
manifest editor. Click the <span style="font-weight: bold;">Add&#8230;</span>
button located beside the <span style="font-weight: bold;">All
Extensions</span> list.</li>
<li>You should now be on the <span style="font-weight: bold;">Extension
Points</span> tab on the <span style="font-weight: bold;">Extension
Point Selection</span> page. Make
sure that the <span style="font-weight: bold;">Show only extension
points from the required plug-ins</span>
check-box is selected. Select <code>org.eclipse.cdt.managedbuilder.core.buildDefintions</code>
from the list of extension points.&nbsp; Click the <span
style="font-weight: bold;">Finish</span> button.</li>
<li>In the Extension Details column in the manifest editor, use <code>org.eclipse.cdt.example.toolchain</code>
as the <span style="font-weight: bold;">ID</span> for the
extension, and <code>Example Tool Chain</code>
for the <span style="font-weight: bold;">Name</span>.</li>
</ol>
<p class="subsection">
<a name="_TocSectionTutorial_4">6.4 Adding a Project Type</a></p>
<p>Now we will add a new projectType, configuration, toolChain, builder,
targetPlatform and an example tool to
the extension.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on <code>org.eclipse.cdt.managedbuilder.core.buildDefinitions</code>
in the <span style="font-weight: bold;">All Extensions</span> column
of the manifest editor to access the context menu for the extension.
Select <span style="font-weight: bold;">New
&gt; projectType</span> to add a projectType definition. A new projectType with the id <code>org.eclipse.cdt.example.toolchain.projectType[n]</code>
should appear below the extension point. That's a bit verbose, so
rename it to <code>example.toolchain.executable</code>.<br>
</li>
<li>Let&rsquo;s give the new projectType a human-readable name. Locate the <span
style="font-weight: bold;">name</span>
property in the <span style="font-weight: bold;">Extension Element
Details</span> column. For now, let&rsquo;s use the name <code>Example
Executable</code> for our projectType.</li>
<li>Make sure that the values of <span style="font-weight: bold;">isTest</span>
and<strong> isAbstract</strong> are<strong> </strong>set
to false.<br>
</li>
</ol>
<p class="subsection">
<a name="_TocSectionTutorial_5">6.5 Adding a
Configuration</a></p>
<p>We have now added a basic project-type definition. We now want to define a
default configuration. Normally, you would consider defining both a release and
debug configuration, but we want to keep this example simple so we will restrict
ourselves to a single configuration.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on <span style="font-weight: bold;">Example
Executable</span> in the <span style="font-weight: bold;">All
Extensions</span> list. From the context menu select <span
style="font-weight: bold;">New &gt;
configuration</span>. <br>
</li>
<li>Change the value of the <span style="font-weight: bold;">name</span>
property and&nbsp; to be <code>Test Release</code> and the value of <span
style="font-weight: bold;">id</span> to be <code>
example.toolchain.configuration.release</code>.</li>
<li>Now set the clean command for the configuration. For the purposes of
this example, click on the <span style="font-weight: bold;">cleanCommand</span>
property to edit it and
enter <code>rm &#8211;f</code>.</li>
<li>Finally, we should supply a default set of error parsers that
apply to the configuration. Error parsers are used by the CDT to map input
from the shell back to source code elements. For simplicity, assume
that all of the default error parsers could be used to understand error
messages for our new target. In the errorParsers property, add the
following list <code>org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;<br>
org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser;<br>
org.eclipse.cdt.core.VCErrorParser</code></li>
</ol>
<p style="font-weight: normal;" class="subsection">
<strong>
<a name="_TocSectionTutorial_6">6.6 Adding a ToolChain</a></strong></p>
<p style="font-weight: normal;">
Each configuration requires a toolChain child that defines the set of tools used by
the configuration.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on <span style="font-weight: 700">Test Release</span> in the <span style="font-weight: bold;">All
Extensions</span> list. From the context menu select <span
style="font-weight: bold;">New &gt;
toolChain</span>. <br>
</li>
<li>Change the value of the <span style="font-weight: bold;">name</span>
property and&nbsp; to be <code>Example Tool-chain </code>&nbsp;and the value of <span
style="font-weight: bold;">id</span> to be <code>
example.toolchain.toolchain</code>.</li>
<li>We want the new project-type to appear when we run the new project wizard
on our host platform, so we have to define the operating systems that the
toolChain should be visible on. Locate the <span
style="font-weight: bold;">osList</span>
property and click it to edit the value. Enter <code>win32</code> if
you are running the tutorial on Windows, <code>linux</code> if you are
running on one of the Linux distributions, <code>solaris, hpux, </code>or<code>
aix</code> if
you are running on a version of Solaris, or <code>other</code> if none
of the above apply.</li>
</ol>
<p style="font-weight: normal;" class="subsection">
<strong>
<a name="_TocSectionTutorial_7">6.7 Adding a Builder</a></strong></p>
<p style="font-weight: normal;">
Each toolChain can have a builder child that describes the build utility used by
the tool-chain to create the build artifacts of the configuration.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on
<span style="font-weight: 700">Example Tool-chain</span> in the <span style="font-weight: bold;">All
Extensions</span> list. From the context menu select <span
style="font-weight: bold;">New &gt;
builder</span>.
</li>
<li>Change the value of the <span style="font-weight: bold;">name</span>
property to be <code>Example Builder </code>and the value of <span
style="font-weight: bold;">id</span> to be <code>
example.toolchain.builder</code>.</li>
<li>Locate the <span
style="font-weight: bold;">Command</span>
property, click on it to edit the value, and enter <code>make</code>.</li>
</ol>
<p class="subsection">
<a name="_TocSectionTutorial_8">6.8 Adding a TargetPlatform</a></p>
<p style="font-weight: normal;">
Each toolChain can have a targetPlatform child that describes the target
operating system(s)/architecture(s) that build artifacts created by the
tool-chain are intended to execute on.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on
<span style="font-weight: 700">Example Tool-chain</span> in the <span style="font-weight: bold;">All
Extensions</span> list. From the context menu select <span
style="font-weight: bold;">New &gt;
targetPlatform</span>.
</li>
<li>Change the value of the <span style="font-weight: bold;">name</span>
property and&nbsp; to be <code>Example Target Platform </code>&nbsp;and the value of <span
style="font-weight: bold;">id</span> to be <code>
example.toolchain.targetplatform</code>.</li></a></a>
<li>Our target platform is the same as our host platform.&nbsp; Enter the
same value for the <strong>osList</strong> property as entered for the ToolChain <strong>
osList</strong>.</li>
<li>Set the value of the binary parser property based on the platform
you will be using to create your example projects on. For example, if
you
are running this tutorial on Linux or Solaris, enter the value <code>org.eclipse.cdt.core.ELF</code>.
If you are running the tutorial on Windows, enter the value <code>org.eclipse.cdt.core.PE64</code>.</li>
</ol>
<p style="font-weight: normal;" class="subsection">
<strong>
<a name="_TocSectionTutorial_9">6.9 Adding a Tool</a></strong></p>
<p style="font-weight: normal;">
Each toolChain describes the set of tools used by the build utility to create
the build artifacts of the configuration.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Right click on <span style="font-weight: bold;">Example
Tool-chain</span> to get the context menu
and select <span style="font-weight: bold;">New &gt; tool</span>. Name
the tool <code>Compiler</code> and make its <span
style="font-weight: bold;">id</span> <code>example.toolchain.compiler</code>.</li>
<li>Let us assume that the tool should appear for both C and C++
projects, although this is not always the case. Locate the <span
style="font-weight: bold;">natureFilter</span>
property and select <code>both</code> from the list of choices.</li>
<li>Tools often have a flag to specify the primary output of a tool. For the
purposes of this example, set the <span style="font-weight: bold;">outputFlag</span>
property to <code>-o</code>.</li>
<li>Finally, we want to specify the command that is needed to invoke
the tool. For this example, we are not interested in actually calling a
real tool, so just enter <code>ccc</code> as the value for the <span
style="font-weight: bold;">command</span>
property.</li>
</ol>
<a name="_TocSectionTutorial_18">
<p style="font-weight: normal;" class="subsection">
<strong>
<a name="_TocSectionTutorial_10">6.10 Adding Input and Output Types</a></strong></p>
<p style="font-weight: normal;">
Each tool describes its inputs and outputs in InputType and OutputType elements.&nbsp; </p>
<ol>
<li>
<p style="font-weight: normal;">Right click on <strong>Compiler</strong> to get the
context menu and select <strong>New &gt; inputType</strong>.&nbsp; Name the inputType
<span style="font-family:Courier New">Compiler Input</span> and make
its<strong> id </strong><span style="font-family:Courier New">
example.toolchain.compiler.input.</span></p></li>
<li>
<p style="font-weight: normal;">Our imaginary compiler only works on c
source files. Locate the <span
style="font-weight: bold;">sourceContentType</span> property and set it to
<span style="font-family:Courier New">org.eclipse.cdt.core.cSource.</span></p></li>
<li>
<p style="font-weight: normal;">The build model needs to know if there are any special file
extensions that indicate a file is a &lsquo;header&rsquo; file. Set the
<span style="font-weight: 700">dependencyContentType</span>
property to be <code>org.eclipse.cdt.core.cHeader </code>
<code>and the <span style="font-weight: 700">
dependencyCalculator </span>property to be </code><code>
<span style="font-family:Courier New">
org.eclipse.cdt.managedbuilder.makegen.internal.DefaultIndexerDependencyCalculator</span></code>.
</p></li>
<li>
<p style="font-weight: normal;">Set the <strong>primaryInput</strong> property to
<span style="font-family:Courier New">true.</span></p></li>
<li>
<p style="font-weight: normal;">Right click on <strong>Compiler</strong> to get the
context menu and select <strong>New &gt; outputType</strong>.&nbsp; Name the outputType
<span style="font-family:Courier New">Compiler Output</span> and make
its<strong> id </strong><span style="font-family:Courier New">
example.toolchain.compiler.output.</span></p></li>
<li>
<p style="font-weight: normal;">Let us
assume that the output of the compiler is an object module that has the
extension &lsquo;o&rsquo;. Set the value of the <span style="font-weight: bold;">outputs</span>
property of the
tool to <code>o</code>.</p></li>
<li>
<p style="font-weight: normal;">The object modules created by your compiler
are typically used as a group by another tool, for example a linker or
archiver.&nbsp; Set the <strong>buildVariable</strong> property to be
<span style="font-family:Courier New">OBJS.</span> You would use the
same name as the <span style="font-weight: 700">buildVariable </span>with
the inputType of this other tool.</p>
</li>
<li>
<p style="font-weight: normal;">Set the <strong>primaryOutput</strong> property to
<span style="font-family:Courier New">true.</span></p></li>
</ol>
<p class="subsection">
<a name="_TocSectionTutorial_11">6.11 Testing the ProjectType</a></p>
<p>We have now defined enough information to create a project for
our
new example project-type, so let&rsquo;s go test it out.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Make sure our example project is selected in the <span
style="font-weight: bold;">Package
Explorer</span>. Select <span style="font-weight: bold;">Run &gt;
Debug As &gt; Eclipse Application</span>
to start a new run-time workbench instance that includes the new tool
information you have created. You may be prompted to save the resource
you were editing. If prompted, answer <span style="font-weight: bold;">Yes</span>.<br>
</li>
<li>In the new workspace, open the <span style="font-weight: bold;">C/C++</span>
perspective.</li>
<li>Run the new project wizard. From the Selection page choose either
a managed C or C++ project. Click the <span style="font-weight: bold;">Next
&gt;</span> button, give
your project any name you wish, and click <span
style="font-weight: bold;">Next &gt;</span> again. <br>
</li>
<li>You should now be at the <span style="font-weight: bold;">Select a type of
project</span> page. Your new
project-type will appear as a choice in the <span style="font-weight: bold;">Project
Type</span>
selection widget. Select it and note that the list of available
configurations now contains the single configuration we defined for the
project-type. <br>
</li>
<li>Click <span style="font-weight: bold;">Finish</span>.<br>
</li>
<li>Right click on your new project in the <span
style="font-weight: bold;">Navigator</span> or <span
style="font-weight: bold;">C/C++
Projects</span> view to access the context menu, and select <span
style="font-weight: bold;">Properties</span>
to open the property browser for the project. Select <span
style="font-weight: bold;">C/C++ Build</span>
from the choices, select the <strong>Tool Settings</strong> tab, and note that the tool we defined appears in the list.</li>
<li>Select the <strong>Build Settings</strong> tab.&nbsp; The user can change the
build output name and the build command from here, and the MBS
will manage that selection between sessions.</li>
<li>Select the <span style="font-weight: bold;">Error Parsers</span>
tab. Recall that you added all five parsers to the new target definition, so
they should all be selected in the list. The user can change that selection
from here, and the MBS
will manage that selection between sessions.<br>
</li>
<li>Select the <span
style="font-weight: bold;">Binary Parser</span> tab. Note that the
default binary parser you specified for the target should be selected
in the list. The user can change that selection from here, and the MBS
will manage that selection between sessions.</li>
</ol>
<p>At this point, you have no doubt noticed that the <span
style="font-weight: bold;">C/C++ Build</span> property page
does
not have any way to edit the settings for the tool other than the tool
command. That is because we
have not defined any options yet. It is time to edit the tool
definition again.</p>
<p class="subsection">
<a name="_TocSectionTutorial_12">6.12 Adding Tool Options</a></p>
<p>Users expect to be able to change the settings for their build tools through
the property page for a project. What they see is controlled by the way options
are defined in the tool integration. We will create an option category, and then
add three example options to it.</p>
<ol style="margin-top: 0in;" start="1" type="1">
<li>Shutdown the debug session.<br>
</li>
<li>Switch back to the <span style="font-weight: bold;">Plug-in
Development</span> perspective. Right
click on the <code>Compiler</code> entry in the extension description
to bring up the context menu. Select <span style="font-weight: bold;">New
&gt; optionCategory</span> to
add the category. Set the <span style="font-weight: bold;">name</span>
of the category to <code>General</code>.</li>
<li>You must specify the id of the tool the category belongs to in
the <span style="font-weight: bold;">owner</span> property. The
simplest way to do this is to copy the <span style="font-weight: bold;">id
</span>from the compiler description and paste it into the <span
style="font-weight: bold;">owner</span> property of the
category.<br>
</li>
<li>Set the unique <span style="font-weight: bold;">id</span> of the
category to <code>example.compiler.optionCategory.general</code>.</li>
<li>Right click on the tool, not the category, to bring up its
context menu and select <span style="font-weight: bold;">New &gt;
option</span> to add our first
option. Name the option <code>Include paths</code> and set the <span
style="font-weight: bold;">id</span> to <code>example.toolchain.compiler.general.incpath</code>.<br>
</li>
<li>Set the <span style="font-weight: bold;">valueType</span>
property to <code>includePath</code> from the list of choices. Please
refer to &sect; 3.13 for a description of option value types and what
this decision implies. <br>
</li>
<li>We expect users to enter paths in this option, so to enable the
right type of 'Browse" button when the user enters a new option value,
set the <span style="font-weight: bold;">browseType</span> property to
<code>directory</code>.<br>
</li>
<li>In
the <span style="font-weight: bold;">command</span> property, enter <code>-I</code>.
<br>
</li>
<li>In the <span style="font-weight: bold;">category</span>
property, put the unique <span style="font-weight: bold;">id</span> of
the category that you entered in step 4.</li>
<li>Add a "catch-all" option to the 'General' category of the
compiler (remember, you add the option to the tool and set its category
via the <span style="font-weight: bold;">category</span> property).
Set the <span style="font-weight: bold;">name</span> of the option to <code>Other
flags</code>, its <strong>id</strong> to <code>example.toolchain.compiler.general.otherflags</code>, its <span style="font-weight: bold;">valueType</span>
to <code>string</code>, and its <span style="font-weight: bold;">defaultValue</span>
to <code>-c</code>.</li>
<li>Add a check-box option to the 'General' category of the compiler. Name it <code>Error messages, </code>
set the<strong> id</strong> to <code>example.toolchain.compiler.general.errmsgs,</code> and set its
<strong>valueType</strong> to <code>boolean</code>.
This is a boolean option, so it might have a command associated with
the selected and unselected states. In this case we want to turn on
reporting when it is selected, and turn it off when it is deselected.
Set the <span style="font-weight: bold;">command</span> property to <code>-Wall</code>
to turn on error reporting, and set the <span
style="font-weight: bold;">commandFalse</span> property to <code>-w</code>
to disable it.<br>
</li>
</ol>
<p>At this point, you can test how your options appear in the UI by
debugging your run-time workbench. You should see something like this.</p>
<p>
<img style="border: 0px solid ;"
src="./image044.gif"
title="" alt="Tutorial project property page"></p>
<h5>Figure 9 MBS property page with tool, category, and options<br>
</h5>
<p class="subsection">
<a name="_TocSectionTutorial_13">6.13 Taking the Next Step</a></p>
<p>The purpose of the tutorial you just followed was to become familiar with the
steps involved in creating a simple tool-chain and to get a feeling for how the
choices you make in the specification of options affect the UI. In this section,
we will discuss some additional points that you need to consider before
specifying your own tool integration.</p>
<p class="subsection">6.13.1 Adding More
Tools</p>
<p>Unless you just happen to have a compiler on your system that is
invoked with &lsquo;ccc&rsquo;, the example tool we created is not going to build
anything. Further, the tool we defined transforms source files into object
files. Another tool, like a linker, would be needed to transform those object
files into a final build goal. For many tool-chains, defining
a
compiler and &ldquo;something else&rdquo; is usually sufficient, but you may have
to
define additional tools if your tool-chain requires intermediate build
steps to function properly.</p>
<p class="subsection">6.13.2 Defined
Symbols and Header File Search
Paths</p>
<p>There are elements of the CDT core that require build information
to
function properly. Things like the indexing service, search, or content
assist will only function correctly if the built-in parser can
retrieve information about the paths to search for include files and
the
preprocessor symbols defined for the project. </p>
<p>MBS gathers information about the defined symbols and include paths from a
number of sources:</p>
<p><strong>User-defined symbols and include paths:&nbsp; </strong>You can flag certain
tool options as
special so the build model will know to pay special attention to them.
As the implementer of the tool integration, you should make sure your
specification has options of type &ldquo;includePaths&rdquo; and &ldquo;definedSymbols&rdquo;.
The build model will pay special attention to these options and provide
them to the appropriate clients in the CDT core without any further
intervention on your part.</p>
<p><strong>Pre-defined symbols and include paths:&nbsp; </strong>A toolChain may specify
the id of scanner configuration discovery profile for gathering the built-in
compiler settings.&nbsp; See the org.eclipse.cdt.make.core.ScannerConfigurationDiscoveryProfile
extension point description in the reference documentation for more information.&nbsp;
If a collector is specified, MBS invokes it to return the pre-defined symbols
and include paths.&nbsp; If a collector is not specified, MBS searches for
options of type &ldquo;includePaths&rdquo; and &ldquo;definedSymbols&rdquo; with the <strong>builtIn</strong>
attribute set to true.</p>
<p><strong>Environment include paths:&nbsp; </strong>Your build definition may specify a
envVarBuildPath element with the <strong>pathType</strong> attribute set to &quot;buildpathInclude&quot;.&nbsp;
If specified, MBS will read the environment variable(s) for additional include
paths.&nbsp; See § 3.17 for additional information regarding the envVarBuildPath
element.</p>
<p class="subsection">6.13.3 User-Specified
Libraries and Object
Modules</p>
<p>Similarly, a user may want to specify external libraries to link against in
the final build step. The build model needs to be told to pay special attention
to an option containing libraries so that when the build file generator requests
them, it can provide a valid list. Flag the
option value type as &ldquo;libs&rdquo; for external libraries or &ldquo;userObjs&rdquo; for
object modules.</p>
<p class="subsection">6.13.4 ProjectType and Other
Element
Hierarchies</p>
<p>One area of the build model that the tutorial does not touch on
is
the concept of abstract project-types discussed in &sect; 3.2. It would be
quite time consuming, not to mention error prone, if you had to
redefine
common tool-chains, tools, etc. each time you wanted to create a new
project-type.
Instead, the build model allows you to organize project-types into
hierarchies
that promote the sharing of common property settings and element definitions between
related project-types. When you create a parent project-type though, you may not
want that project-type to be selected by the user in the new project wizard. In
that case, make the projectType abstract and it will no longer appear as an
option for users. Flagging an element as abstract is a UI design
decision; you can declare a non-abstract element as the super-class of
another
element.</p>
<p>Since 2.1
it is possible to declare a configuration, tool-chain, tool, builder and targetPlatform independently of a project-type. So it
is possible to declare a complete set of elements once, and use superClass references to those
elements inside many projectTypes.<br>
</p>
<p class="subsection">6.13.5 Publishing
your Plug-in</p>
<p>The subject of packaging Eclipse plug-ins is well covered in the <span
style="font-style: italic;">Platform Plug-in Developer Guide</span>.
It is strongly recommended that you review this information carefully
if you plan on deploying products based on Eclipse. However, making
your tool integration available to other users of Eclipse is
not difficult. You must supply the plugin manifest we created inside
the Eclipse platform's plug-in directory. The plug-in directory is
named plugins and is typically
located underneath the main directory where you installed the Eclipse
platform.<strong>
</strong></p>
<ol>
<li style="font-weight: normal;">From the <span
style="font-weight: bold;">Plug-in
Development
Perspective</span>, select the plugin.xml
file for your plug-in in the package explorer. Open the <span
style="font-weight: bold;">File &gt;
Export...</span> wizard. On the <span style="font-weight: bold;">Select</span>
page, chose <span style="font-weight: bold;">Deployable Plugins and Fragments</span> from
the export
destination list. Click the <span style="font-weight: bold;">Next &gt;</span>
button. </li>
<li style="font-weight: normal;">In the <strong>Deployable Plugins and Fragments</strong>
dialog, Export <code>
Destination section, select Directory and </code>click the Browse... button.
Browse to your Eclipse installation. Deselect all Export Options.&nbsp; Click the Finish
button.</li>
<li>Restart Eclipse, switch to the <span style="font-weight: bold;">C/C++
Development Perspective</span> and run the new project wizard to create
a new project based on your tool integration.</li>
</ol>
<p class="section"><a name="_TocSectionDynamic">7 Adding Dynamic Behavior</a></p>
<p class="subsection"><a name="_TocSectionDynamic_1">7.1 Overview</a></p>
<p>MBS defines a number of element attributes that allow the tool integrator to
customize the behavior of the MBS by implementing an MBS-defined interface in a
Java class.&nbsp; This section describes these attributes and the interfaces.</p>
<p class="subsection"><a name="_TocSectionDynamic_2">7.2 Replacing the Build File Generator</a></p>
<p>You can specify a replacement
build file generator for a project configuration. You must specify and supply a class
that
implements the <code>IManagedBuilderMakefileGenerator</code>
interface shown below.&nbsp; The class name is assigned to the builder element,
buildfileGenerator attribute. </p>
<p>
<img style="border: 0px solid ;"
src="./image060.gif"
title="" alt="Makefile generator interface"> </p>
<h5>Figure 10 Makefile generator interface</h5>
<p>At build time, the MBS builder will ask for the build file generator
associated with the project configuration being built. If you have specified a class
in your plugin, that class will be instantiated at this point. The MBS
builder will then give the new
build file generator a chance to initialize itself.&nbsp; At the very least,
your generator should cache the build information and progress monitor
so you can access build settings and respond to the user canceling the
build in a timely fashion.</p>
<p>
<img style="border: 0px solid ;"
src="./image062.gif"
title="" alt="MBS makefile generator initialization routine"></p>
<p>Since the MBS builder is an incremental builder, it will be asked to
build or
rebuild the project depending on the type of delta that the Eclipse
workspace detects. For an incremental build using the default generator, it will ask the generator
to generate makefiles. For a full rebuild, it will ask for a
regeneration of all makefiles. Depending on the makefile pattern that
you generate, these may end up doing the same thing. It is important to
note that the builder pays special attention to the return value of the
generate and regenerate methods, so it is important to return a
instance of <code>MultiStatus</code> containing some sort or result.
For example, the following code snippet will tell the builder that it
can go on and invoke the make utility and start the build.<br>
</p>
<p>
<img style="border: 0px solid ;"
src="./image064.gif"
title="" alt="Return value"></p>
<p>Typically, you have to specify source-level dependencies in your
makefiles as described in &sect;
5.1.3. The builder will ask the generator to generate or regenerate
these dependencies depending on whether it is an incremental or rebuild
situation. If your source-level dependencies are generated as a
by-product of the build step, this call may result in a NOP. In the case of the
default generator, it results in some post-processing of the dependency
descriptions. What happens depends entirely on the build
utility you are using and the build file pattern you implement.</p>
<p class="subsection"><a name="_TocSectionDynamic_3">7.3 Replacing the
Dependency Calculator</a></p>
<p>As we know, the generated build file must contain all
of the dependencies for a build target, but not every system has the
same set of utilities for discovering them. Some tool integrations might rely
on an external utility like <var>makedepend</var> to calculate
source-level
dependencies. Other tool integrations might provide dependency calculation
along with the other build tools, like the GCC preprocessor. The replaceable dependency
calculator in the MBS tries to accommodate many types of dependency
discovery mechanisms. </p>
<p>The
mechanism for replacing the dependency calculator is similar to the build file generator, except that the dependency calculator is associated
with a tool inputType, not a builder. You must create a class that implements the <code>IManagedDependencyGenerator2</code>
interface
shown below and specify that class in the inputType element,
dependencyCalculator attribute.&nbsp; Typically, dependency calculators are only
relevant for a &quot;compiler&quot; tool, but what tool you use to specify the generator (or generators)
is arbitrary.</p>
<p>By design, a dependency calculator must answer what type of
dependency generation it will do.&nbsp; There are two major,
and multiple minor, modes of dependency calculation supported by the MBS.&nbsp;
The major modes are:</p>
<ol>
<li>The build file generator invokes tool integrator
provided methods that calculate all dependencies using whatever method the
tool integrator wants.&nbsp; The build file generator then adds the
dependencies to the build file using the appropriate build file syntax.&nbsp;
This is a TYPE_CUSTOM dependency calculator as defined below.&nbsp; See the
<span style="font-family:Courier New">IManagedDependencyCalculator </span>
interface discussion below for more information.&nbsp; </li>
<li>The build file generator and the tool-chain cooperate
in creating and using separate &quot;dependency&quot; files.&nbsp; In this case,
dependency calculation is done at &quot;build time&quot;, rather than at &quot;build file
generation time&quot; as in mode #1.&nbsp; This currently supports the GNU
concept of using .d files in GNU make.&nbsp; This is either a
TYPE_BUILD_COMMANDS dependency calculator or a TYPE_PREBUILD_COMMANDS
dependency calculator as defined below.&nbsp; See the
<span style="font-family:Courier New">IManagedDependencyCommands </span>
and <span style="font-family:Courier New">IManagedDependencyPreBuild </span>
interfaces discussion below for more information.</li>
</ol>
<p><span style="font-family:Courier New">public interface IManagedDependencyGeneratorType {<br>
<span style="color:#336699">&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp; Constants returned by getCalculatorType<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp;
</span> public int TYPE_NODEPS = 0; //&nbsp; Deprecated - use
TYPE_NODEPENDENCIES<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_COMMAND = 1; //&nbsp; Deprecated - use
TYPE_BUILD_COMMANDS<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_INDEXER = 2; //&nbsp; Deprecated - use TYPE_CUSTOM<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_EXTERNAL = 3; //&nbsp; Deprecated - use TYPE_CUSTOM<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_OLD_TYPE_LIMIT = 3;<br>
<br>
&nbsp;&nbsp;&nbsp; <span style="color:#336699">//&nbsp; Use these types<br>
</span>&nbsp;&nbsp;&nbsp;
public int TYPE_NODEPENDENCIES = 4;<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_BUILD_COMMANDS = 5;<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_PREBUILD_COMMANDS = 6;<br>
&nbsp;&nbsp;&nbsp;
public int TYPE_CUSTOM = 7;<br>
<br>
<span style="color:#336699">&nbsp;&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp;&nbsp; * Returns the type of dependency generator that is
implemented.&nbsp; <br>
&nbsp;&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; TYPE_NODEPENDENCIES indicates that no
dependency generator is <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; supplied or needed.<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; TYPE_CUSTOM indicates that a custom,
&quot;build file generation time&quot;<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; dependency calculator is
implemented.&nbsp; Note that the dependency<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; calculator will be called
when the makefile is generated, and <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; for every source file that is
built by this tool in the build <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; file, not just for those that
have changed since the last build<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; file generation.<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; TYPE_BUILD_COMMANDS indicates that
command lines or options will <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; be returned to be used to
calculate dependencies.&nbsp; These <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; commands/options are added to
the build file to perform dependency<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; calculation at &quot;build time&quot;.&nbsp;
This currently supports <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; compilers/tools that generate
.d files either as a<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; side-effect of tool
invocation, or as a separate step that is<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; invoked immediately before or
after the tool invocation. <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp; TYPE_PREBUILD_COMMANDS indicates that a
separate build step is <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; invoked, prior to the the
normal build steps, to update the <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; dependency information.&nbsp;
These commands are added to the build<br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; file to perform dependency
calculation at &quot;build time&quot;.&nbsp; Note <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; that this step will be
invoked every time a build is done in <br>
&nbsp;&nbsp;&nbsp;&nbsp; *&nbsp;&nbsp;&nbsp;&nbsp; order to determine if
dependency files need to be re-generated.<br>
&nbsp;&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp;&nbsp; * @return int<br>
&nbsp;&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span> public int getCalculatorType();<br>
}</span></p>
<p>After deciding upon the type of dependency calculator, you
must implement the methods in<code> </code><code>IManagedDependencyGenerator2</code>.&nbsp;
The method <span style="font-family:Courier New">getDependencySourceInfo </span>
returns an instance of the <span style="font-family:Courier New">
IManagedDependencyInfo</span> interface.&nbsp; This can be
any one of the 3 interfaces that derive from <span style="font-family:Courier New">
IManagedDependencyInfo</span>&nbsp; -
<span style="font-family:Courier New">I</span><span style="font-family:Courier New">ManagedDependencyCalculator,
IManagedDependencyCommands </span>or
<span style="font-family:Courier New">IManagedDependencyPreBuild </span>
which are discussed below.&nbsp; The returned interface is called to get the
dependency information for a particular source file in the configuration.&nbsp;
See the descriptions of the other methods in<code> </code><code>IManagedDependencyGenerator2</code>
in the code comments below.</p>
<pre>public interface IManagedDependencyGenerator2 extends IManagedDependencyGeneratorType {
<span style="color:#336699"> /**
* Returns an instance of IManagedDependencyInfo for this source file.
* IManagedDependencyCalculator, IManagedDependencyCommands
* and IManagedDependencyPreBuild are all derived from
* IManagedDependencyInfo, and any one of the three can be returned.
* This is called when getCalculatorType returns TYPE_BUILD_COMMANDS,
* TYPE_CUSTOM or TYPE_PREBUILD_COMMANDS.
*
* @param source The source file for which dependencies should be calculated
* The IPath can be either relative to the project directory, or absolute in the file system.
* @param buildContext The IConfiguration or IResourceConfiguration that
* contains the context in which the source file will be built
* @param tool The tool associated with the source file
* @param topBuildDirectory The top build directory of the configuration. This is
* the working directory for the tool. This IPath is relative to the project directory.
* @return IManagedDependencyInfo
*/
</span> public IManagedDependencyInfo getDependencySourceInfo(
IPath source,
IBuildObject buildContext,
ITool tool,
IPath topBuildDirectory);
<span style="color:#336699"> /**
* Returns the file extension used by dependency files created
* by this dependency generator.
* This is called when getCalculatorType returns TYPE_BUILD_COMMANDS or
* TYPE_PREBUILD_COMMANDS.
*
* @param buildContext The IConfiguration that contains the context of the build
* @param tool The tool associated with the dependency generator.
*
* @return String
*/
</span> public String getDependencyFileExtension(
IConfiguration buildContext,
ITool tool);
<span style="color:#336699"> /**
* Called to allow the dependency calculator to post-process dependency files.
* This method is called after the build has completed for at least every
* dependency file that has changed, and possibly for those that have not
* changed as well. It may also be called with dependency files created by
* another tool. This method should be able to recognize dependency files
* that don't belong to it, or that it has already post-processed.
* This is called when getCalculatorType returns TYPE_BUILD_COMMANDS or
* TYPE_PREBUILD_COMMANDS.
*
* @param dependencyFile The dependency file
* The IPath can be either relative to the top build directory, or absolute in the file system.
* @param buildContext The IConfiguration that contains the context of the build
* @param tool The tool associated with the dependency generator. Note that this is
* not necessarily the tool that created the dependency file
* @param topBuildDirectory The top build directory of the project. This is
* the working directory for the tool.
*
* @return boolean True if the method modified the dependency (e.g., .d) file
*/
</span> public boolean postProcessDependencyFile(
IPath dependencyFile,
IConfiguration buildContext,
ITool tool,
IPath topBuildDirectory);
}</pre>
<p class="subsection">7.3.1 TYPE_CUSTOM dependency calculator
</p>
<p>A TYPE_CUSTOM dependency calculator must implement the
<span style="font-family:Courier New">IManagedDependencyCalculator </span>
interface.</p>
<pre>public interface IManagedDependencyCalculator extends IManagedDependencyInfo {
<span style="color:#336699"> /**
* Returns the list of source file specific dependencies.
*
* The paths can be either relative to the project directory, or absolute
* in the file system.
*
* @return IPath[]
*/
</span> public IPath[] getDependencies();
<span style="color:#336699"> /**
* Returns the list of source file specific additional targets that the
* source file creates. Most source files will return null. An example
* of where additional targets should be returned is for a Fortran 90
* source file that creates one or more Fortran Modules.
*
* Note that these output files that are dependencies to other invocations
* of the same tool can be specified here, or as another output type
* of the tool. If the output file can be used as the input of a different
* tool, then use the output type mechanism.
*
* The paths can be either relative to the top build directory, or absolute
* in the file system.
*
* @return IPath[]
*/
</span> public IPath[] getAdditionalTargets();
}</pre>
<p>An example TYPE_CUSTOM dependency calculator can be found in the MBS test
suite - org.eclipse.cdt.managedbuilder.core.tests\DefaultFortranDependencyCalculator.</p>
<p>If you do not have an external process or tool to calculate dependencies, you
could take advantage of the indexer in the CDT. In this case, you are
restricted to generating the dependencies independently of the build
steps. The dependency calculator asks the indexer for a list of
dependencies and returns them as an array of <code>IResource</code>
instances. Obviously, if you rely on the indexer, you must wait for it
to complete its work before it will answer, so your build may take
longer to complete.&nbsp; See the
org.eclipse.cdt.managedbuilder.makegen.internal\DefaultIndexerDependencyCalculator
class for an example of how this was implemented using the old, deprecated
<span style="font-family:Courier New">IManagedDependencyGenerator </span>
interface.&nbsp; However, it doesn't seem as if it worked with CDT 3.0.&nbsp;
Readers are encouraged to update this method to the new interfaces and
contribute the implementation to CDT.</p>
<p class="subsection">7.3.2 TYPE_BUILD_COMMANDS dependency
calculator </p>
When using a TYPE_BUILD_COMMANDS dependency calculator, the build file generator and the tool-chain cooperate in creating and using separate &quot;dependency&quot; files. The build file generator calls the dependency calculator to get the dependency file names and to get commands that need to be added to the build file. In this case, dependency calculation is done at &quot;build time&quot;, rather than at &quot;build file generation time&quot; as
with TYPE_CUSTOM. This currently supports the GNU concept of using .d files in GNU make.<p>
There are multiple ways that these separate dependency files can
be created by the tool-chain and used by the builder.&nbsp; In some cases (e.g., Fortran 90 using modules) the dependency files
must be created/updated prior to invoking the build of the project
artifact (e.g., an application). In this case, the dependency
generation step must occur separately before the main build.
See
TYPE_PREBUILD_COMMANDS for more information.&nbsp; In other cases (e.g., C/C++) the dependency files can be created as
a side effect of the main build. This implies that the up to date
dependency files are not required for the current build, but for
the next build. C/C++ builds can be treated in this manner as is
described in the following link:
<a href="http://sourceware.org/automake/automake.html#Dependency-Tracking-Evolution">http://sourceware.org/automake/automake.html#Dependency-Tracking-Evolution</a>.&nbsp; Use the IManagedDependencyCommands interface for this mode.</p>
<p>Two sub-scenarios of this mode are to:
</p>
<ol>
<li>Create dependency files in the same invocation of the tool that
creates the tool's build artifact - by adding additional options
to the tool invocation command line.</li>
<li>Create dependency files in a separate invocation of the tool, or
by the invocation of another tool</li>
</ol>
<p>MBS can also help in the generation of the dependency files. Prior to
CDT 3.1, MBS and gcc cooperated in generating dependency files using the
following steps:</p>
<ol>
<li>Gcc is invoked to perform the compilation that generates the object
file.</li>
<li>An &quot;echo&quot; command creates the .d file, adding the name of the .d
file to the beginning of the newly created .d file. Note that this
causes problems with some implementations of &quot;echo&quot; that don't
work exactly the way that we want (e.g., it doesn't support the -n
switch).</li>
<li>Gcc is invoked again with the appropriate additional command line
options to append its dependency file information to the .d file
that was created by &quot;echo&quot;.</li>
<li>Steps 1 - 3 are invoked in the make file. Step 4 occurs after the
make invocation has finished. In step 4, MBS code post-processes
the .d files to add a dummy dependency for each header file, for
the reason explained in the link above.</li>
</ol>
<p>This mode is no longer used by the default gcc implementation, but can
still be used by selecting the DefaultGCCDependencyCalculator3Commands class.</p>
<p>Note for GNU make: these separate dependency files are &quot;include&quot;d by
a main makefile. Therefore, if the dependency files are required to
be up to date before the main build begins, they must be updated by
a separate invocation of make. Also, the configuration &quot;clean&quot; step
must be invoked by a separate invocation of make. This is so that
we can exclude the dependency files for a &quot;make clean&quot; invocation
using syntax like:</p>
<p style="margin-bottom: 0">ifneq ($(MAKECMDGOALS), clean)</p>
<p style="margin-top: 0; margin-bottom: 0">-include $(DEPS)</p>
<p style="margin-top: 0; margin-bottom: 0">endif
</p>
<p>Otherwise, because GNU make attempts to re-make make files, we
can end up with out of date or missing dependency files being
re-generated and then immediately &quot;clean&quot;ed.</p>
<p>Examples of the use of TYPE_BUILD_COMMANDS
can be found in org.eclipse.cdt.managedbuilder.makegen.gnu\DefaultGCCDependencyCalculator2Commands
and DefaultGCCDependencyCalculator3Commands.</p>
<pre>public interface IManagedDependencyCommands extends IManagedDependencyInfo {
<span style="color:#336699"> /**
* Returns the list of generated dependency files.
*
* The paths can be either relative to the top build directory, or absolute
* in the file system.
*
* @return IPath[]
*/
</span> public IPath[] getDependencyFiles();
<span style="color:#336699"> /**
* Returns the command lines to be invoked before the normal tool invocation
* to calculate dependencies.
*
* @return String[] This can be null or an empty array if no dependency
* generation command needs to be invoked before the normal
* tool invocation.
*/
</span> public String[] getPreToolDependencyCommands();
<span style="color:#336699"> /**
* Returns the command line options to be used to calculate dependencies.
* The options are added to the normal tool invocation.
*
* @return String[] This can be null or an empty array if no additional
* arguments need to be added to the tool invocation.
* SHOULD THIS RETURN AN IOption[]?
*/
</span> public String[] getDependencyCommandOptions();
<span style="color:#336699"> /**
* Returns the command lines to be invoked after the normal tool invocation
* to calculate dependencies.
*
* @return String[] This can be null or an empty array if no dependency
* generation commands needs to be invoked after the normal
* tool invocation
*/
</span> public String[] getPostToolDependencyCommands();
<span style="color:#336699"> /**
* Returns true if the command lines and/or options returned by this interface
* are not specific to the particular source file, but are only specific to,
* at most, the configuration and tool. If the build context is a resource
* configuration, this method should return false if any of the command lines
* and/or options are different than if the build context were the parent
* configuration. This can be used by the build file generator in helping
* to determine if a &quot;pattern&quot; (generic) rule can be used.
*
* @return boolean
*/
</span> public boolean areCommandsGeneric();
}</pre>
<p class="subsection">7.3.3 TYPE_PREBUILD_COMMANDS dependency
calculator </p>
When using a TYPE_BUILD_PRECOMMANDS dependency calculator, the build file generator and the tool-chain cooperate in creating and using separate &quot;dependency&quot; files.
For GNU make, these separate dependency files are &quot;include&quot;d by a main makefile.
Make performs special processing on make files:<br>
<p>&quot;To this end, after reading in all makefiles, make will consider each as a goal
target and attempt to update it. If a makefile has a rule which says how to
update it (found either in that very makefile or in another one)..., it will be
updated if necessary.&nbsp; After all makefiles have been checked, if any have
actually been changed, make starts with a clean slate and reads all the
makefiles over again.&quot; <br>
<p>We can use this to ensure that the dependency files are up to date by adding
rules to the make file for generating the dependency files.&nbsp; These rules
are returned by the call to the getDependencyCommands method.&nbsp; However,
this has a significant problem when we don&#39;t want to build the build target, but
only want to &quot;clean&quot; the configuration, for example. If we invoke make just to
clean the configuration, make will still update the dependency files if
necessary, thereby re-generating the dependency files only to immediately delete
them.&nbsp; The workaround suggested by the make documentation is to check for
an invocation using the &quot;clean&quot; target, and to not include the dependency files
it that case. For example, <br>
<p>ifneq ($(MAKECMDGOALS),clean)<br>
include $(DEPS)<br>
endif<br>
<p>The restriction with this is that it only works if &quot;clean&quot; is the only target
specified on the make command line. Therefore, the build &quot;clean&quot; step must be
invoked separately.<p>Examples of the use of TYPE_PREBUILD_COMMANDS
can be found in org.eclipse.cdt.managedbuilder.makegen.gnu\DefaultGCCDependencyCalculatorPreBuildCommands.<pre>public interface IManagedDependencyPreBuild extends IManagedDependencyInfo {
<span style="color:#336699"> /**
* Returns the list of generated dependency files.
*
* The paths can be either relative to the top build directory, or absolute
* in the file system.
*
* @return IPath[]
*/
</span> public IPath[] getDependencyFiles();
<span style="color:#336699"> /**
* Returns the name to be used in the build file to identify the separate
* build step. Note that this name should be unique to the tool since
* multiple tools in a tool-chain may be using this method of
* dependency calculation.
*
* @return String
*/
</span> public String getBuildStepName();
<span style="color:#336699"> /**
* Returns the command line(s) to be invoked in the separate
* dependencies pre-build step.
*
* @return String[]
*/
</span> public String[] getDependencyCommands();
<span style="color:#336699"> /**
* Returns true if the command lines returned by this interface
* are not specific to the particular source file, but are only specific to,
* at most, the configuration and tool. If the build context is a resource
* configuration, this method should return false if any of the command lines
* are different than if the build context were the parent configuration.
* This can be used by the build file generator in helping to determine if
* a &quot;pattern&quot; (generic) rule can be used.
*
* @return boolean
*/
</span> public boolean areCommandsGeneric();
}</pre>
<p class="subsection"><a name="_TocSectionDynamic_4">7.4 Replacing the Command Line Generator</a></p>
<p>You can specify a replacement command line generator for a tool. You must specify and supply a class
that
implements the <code>IManagedCommandLineGenerator</code>
interface.&nbsp; The class name is assigned to the tool element, commandLineGenerator attribute. </p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">public interface
IManagedCommandLineGenerator {</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public
IManagedCommandLineInfo generateCommandLineInfo(</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ITool tool,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
commandName,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String[]
flags,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
outputFlag,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
outputPrefix,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
outputName,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String[]
inputResources,</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String
commandPattern); </span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">}</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">public interface
IManagedCommandLineInfo {</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getCommandLine();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getCommandName();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String getFlags();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getOutputFlag();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getOutputPrefix();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getOutputName();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">&nbsp;&nbsp; public String
getInputResources();</span></p>
<p class="MsoNormal" style="text-autospace: none; margin-left: .25in; margin-top: 0; margin-bottom: 0">
<span style="font-size: 10.0pt; font-family: Courier New">}</span></p>
<p class="MsoNormal" style="text-autospace: none">MBS calls IManagedCommandLineGenerator.generateCommandLineInfo to generate the command
line information.&nbsp; The supplied IManagedCommandLineGenerator could modify the
command line parts if necessary and then provide the modified values, as well as
the complete command line, in the <span style="font-family:Courier New">IManagedCommandLineInfo</span> interface.&nbsp; The
default MBS implementation does not modify any of the command line parts.&nbsp; It
uses the parts and the pattern to generate the complete command line that can be
retrieved using IManagedCommandLineInfo.getCommandLine.</p>
<p class="subsection"><a name="_TocSectionDynamic_5">7.5 Determining if a Tool Chain is Installed</a></p>
<p class="MsoNormal">A tool-chain definition can provide a method to be called
to determine if support for the tool-chain is currently installed on the
system.&nbsp; MBS uses this information in order to filter the choices presented to
the CDT user and to inform the user when support needed by their project is not
installed. If the method is not provided by the tool-chain definition, the
tool-chain is treated as supported.&nbsp; If all configurations defined for the
given project type are not supported the project type is treated as unsupported.</p>
<p>In order to provide this functionality, the &ldquo;isToolChainSupported&rdquo;
attribute in the toolChain
definition must be specified. The value of this attribute should be set to the
name of the class which implements the <span style="font-family:Courier New">IManagedIsToolChainSupported</span>
interface.</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IManagedIsToolChainSupported{</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; boolean
isSupported(IToolChain toolChain, PluginVersionIdentifier version, String
instance);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">The version
argument specifies the version of the ToolChain, or null if the ToolChain does
not have a version number.&nbsp; The instance argument is currently null.&nbsp; It will be
used when &ldquo;Multi-Instance&rdquo; support is implemented.</p>
<p class="subsection"><a name="_TocSectionDynamic_6">7.6 Defining Environment Variables</a></p>
<p>A tool-integrator can provide a method to be called that identifies the default
environment variables for the tool-chain.&nbsp; These would typically include the
build path variables (&ldquo;bin&rdquo;, &ldquo;include&rdquo;, &ldquo;lib&rdquo;). These environment variables are
defined by MBS for the process in which the builder (e.g., make) runs. In
addition to providing environment variables the tool-chain integrator can
specify the names of the environment variables used by the tool for specifying
the include and library paths. MBS will examine these variables and pass the
appropriate information about includes and libraries to the rest of the CDT.</p>
<p class="MsoNormal">The tool-integrator can provide Project-level and
Configuration-level environment variable suppliers separately:&nbsp;</p>
<p class="MsoNormal" style="margin-left: 0in">To provide a Configuration-level
supplier the &ldquo;configurationEnvironmentSupplier&rdquo; attribute in the toolChain
definition must be specified. The value of this attribute should be set to the
name of the class which implements the <span style="font-family:Courier New">IConfigurationEnvironmentVariableSupplier </span>
interface </p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IConfigurationEnvironmentVariableSupplier{</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @variableName the variable mane</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param configuration configuration</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param provider the instance of the
environment variable provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* environment variables from within
the supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* the already defined environment instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;*
ManagedBuildManager.getEnvironmentVariableProvider().</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; * </span>
<span style="font-family:Courier New"><span style="color: #003366">The provider passed to a supplier will ignore
searching the variables for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;</span> <span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;</span> <span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;</span> <span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;</span> <span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* about the environment variables defined for the
higher levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;* @return the reference to the IBuildEnvironmentVariable interface representing </span>
</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* the variable of a given name</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp; IBuildEnvironmentVariable getVariable(String variableName,
</span> </p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 2.95in; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IConfiguration configuration,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 2.95in; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IEnvironmentVariableProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param configuration configuration</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param provider the instance of the
environment variable provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* environment variables from within
the supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; *</span><span style="font-family:Courier New"><span style="color: #003366"> the already defined environment instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">*
ManagedBuildManager.getEnvironmentVariableProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching the variables for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels.&nbsp; </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* about the environment variables defined for the
higher levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @return the array of IBuildEnvironmentVariable that represents the environment variables</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp; IBuildEnvironmentVariable[] getVariables (IConfiguration configuration,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 2.95in; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IEnvironmentVariableProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal" style="margin-left: 0in">To provide a Project-level
supplier the &ldquo;projectEnvironmentSupplier&rdquo; attribute in the projectType
definition must be specified. The value of this attribute should be set to the
name of the class which implements the <span style="font-family:Courier New">IProjectEnvironmentVariableSupplier
interface.</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IProjectEnvironmentVariableSupplier{</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; /**</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @variableName the variable mane</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param project the managed project</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* @param provider the instance of the
environment variable provider to be used for querying the</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp; &nbsp;* environment variables from within
the supplier. The supplier should use this provider to obtain</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;
<span style="font-family:Courier New"><span style="color: #003366">* the already defined environment instead of using
the &ldquo;default&rdquo; provider returned by the</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;
<span style="font-family:Courier New"><span style="color: #003366">*
ManagedBuildManager.getEnvironmentVariableProvider().</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching the variables for the levels </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* about the environment variables defined for the
higher levels.</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;* @return the reference to the IBuildEnvironmentVariable interface representing </span>
</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* the variable of a given name</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp; IBuildEnvironmentVariable getVariable(String variableName,
</p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 177.0pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IManagedProject project,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 177.0pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IEnvironmentVariableProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; /**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; &nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; &nbsp;* @param project the managed project</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; &nbsp;* @param provider the instance of the
environment variable provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp; &nbsp;* environment variables from within
the supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* the already defined environment instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">*
ManagedBuildManager.getEnvironmentVariableProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching the variables for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp; </span><span style="font-family:Courier New">
<span style="color: #003366">&nbsp;* about the environment variables defined for the
higher levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;* @return the array of IBuildEnvironmentVariable that represents the environment variables </span>
</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp; IBuildEnvironmentVariable[] getVariables (IManagedProject project,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 177.0pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IEnvironmentVariableProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal">The <span style="font-family:Courier New">IBuildEnvironmentVariable</span> interface returns information regarding an
individual environment variable.&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IBuildEnvironmentVariable{</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
public static final int ENVVAR_REPLACE = 1;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
public static final int ENVVAR_REMOVE = 2;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
public static final int ENVVAR_PREPEND = 3;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
public static final int ENVVAR_APPEND = 4;</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-top: 0; margin-bottom: 0">
&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;String getName();</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;String getValue();</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return one of the IBuildEnvironmentVariable.ENVVAR_* operation types</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp; int
getOperation();</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return if the variable can hold the
list of values this method returns the String representing</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* the delimiter that is used to separate values.
This information is used for the following:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* 1. in append and prepend operations:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* If the variable already exists and contains some
value the new </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* value will be calculated in the following way:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* For the &ldquo;prepend&rdquo; operation:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;New value&gt; = &lt;the value from the
getValue() method&gt;&lt;delimiter&gt;&lt;Old value&gt;</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* For the &ldquo;append&rdquo; operation:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;New value&gt; = &lt;Old value&gt;&lt;delimiter&gt;&lt;the
value from the getValue() method&gt;</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* The Environment Variable Provider will also
remove the duplicates of &ldquo;sub-values&rdquo; </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* in the resulting value. </span>
</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* For example:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* If the current value is
&ldquo;string1:string2:string3&rdquo;, the getDelimiter() method returns &ldquo;:&rdquo; </span>
</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* and getValue() method returns &ldquo;string4:string2&rdquo;
the new value will contain:</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* For the &ldquo;prepend&rdquo; operation:
&ldquo;string4:string2:string1:string3&rdquo;</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* For the &ldquo;append&rdquo; operation:
&ldquo;string1:string3:string4:string2&rdquo;</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* <br>
&nbsp;&nbsp; &nbsp;* 2. Since the environment variables are also
treated as build macros the delimiter is also used </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* by the BuildMacroProvider to determine the type
of the macro used to represent the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* given environment variable. If the variable has
the delimiter it is treated as the Text-List macro</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* otherwise it is treated as the Text macro. (See
Build Macro design for more details)</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* To specify that no delimiter should be used, the
getDelimiter() method should<br>
&nbsp;&nbsp; &nbsp;* return null or an empty string</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp; String getDelimiter();</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="subsection"><a name="_TocSectionDynamic_7">7.7 Defining a Build Path Resolver</a>&nbsp;</p>
<p class="MsoNormal" style="margin-left: 0in">To provide a build path resolver,
the buildPathResolver attribute in the envVarBuildPath
definition must be specified. The value of this attribute should be set to the
name of the class which implements the <span style="font-family:Courier New">IBuildPathResolver</span> interface.&nbsp; This
allows the tool-integrator to provide his/her own
logic for resolving the environment variable values to build paths.</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IBuildPathResolver {</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp; /**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param pathType one of the
IEnvVarBuildPath.BUILDPATH _xxx</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* @param variableName represents the name of the
variable that holds the build paths</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* @param variableValue represents the value of the
value specified with the </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;*&nbsp;&nbsp; &nbsp;&nbsp;variableName argument</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* @param configuration represents configuration
for which the build paths are requested</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
String[] resolveBuildPaths(</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int pathType,</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
String variableName, </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
String variableValue,</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
IConfiguration configuration);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">See
org.eclipse.cdt.managedbuilder.gnu.cygwin.CygwinPathResolver for an example of a
build path resolver.&nbsp; It converts Cygwin-style paths to Windows paths.</p>
<p class="subsection"><a name="_TocSectionDynamic_8">7.8 Defining Build Macros</a></p>
<p class="MsoNormal">The <span style="font-family:Courier New">IConfigurationBuildMacroSupplier</span> interface and the
<span style="font-family:Courier New">IProjectBuildMacroSupplier</span> interface allow a tool-integrator to define build
macros and their values.</p>
<p class="MsoNormal">All methods of the <span style="font-family:Courier New">IConfigurationBuildMacroSupplier </span>
interface MUST return macros ONLY for the configuration context, and MUST NOT
search for macro values for contexts with lower precedence. This is up to
BuildMacroProvider to query macro suppliers passing lower-precedence context if
necessary in case the macro value was not found for some specified context</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IConfigurationBuildMacroSupplier {</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @ macroName the macro name</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param configuration configuration</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param provider the instance of the
build macro provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* build macros from within the
supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* the already defined build macros instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* ManagedBuildManager.getBuildMacroProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching macros for the levels <br>
&nbsp;&nbsp; &nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything<br>
&nbsp;&nbsp; &nbsp;* about the build macros defined for the higher
levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return the reference to the IBuildMacro interface representing </span>
</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* the build macro of a given name or null if the
macro of&nbsp; that name is not defined</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New">IBuildMacro getMacro(String macroName, </span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 70.8pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IConfiguration configuration, </span> </p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 70.8pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IBuildMacroProvider provider);</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param configuration configuration</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param provider the instance of the
build macro provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* build macros from within the
supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* the already defined build macros instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* ManagedBuildManager.getBuildMacroProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* The provider passed to a supplier will ignore
searching macros for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* higher than the current supplier level, will
query only the lower-precedence suppliers </span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* about the build macros defined for the higher
levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return the IBuildMacro[] array
representing defined macros </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New">IBuildMacro[] getMacros(IConfiguration configuration,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 70.8pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IBuildMacroProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal">All methods of the <span style="font-family:Courier New">IProjectBuildMacroSupplier</span> interface
MUST return macros ONLY for the Project context, and MUST NOT search for macro
values for contexts with lower precedence. This is up to the BuildMacroProvider
to query macro suppliers passing lower-precedence context if necessary in case
the macro value was not found for some specified context.</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IProjectBuildMacroSupplier {</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @ macroName the macro mane</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param project the instance of the
managed project</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param provider the instance of the
build macro provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* build macros from within the
supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* the already defined build macros instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* ManagedBuildManager.getBuildMacroProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching macros for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* about the build macros defined for the higher
levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return the reference to the IBuildMacro interface representing </span>
</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* the build macro of a given name or null if the
macro of&nbsp; that name is not defined</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New">IBuildMacro getMacro(String macroName, </span></span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 106.2pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IManagedProject project,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 106.2pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IBuildMacroProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param project the instance of the
managed project</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @param provider the instance of the
build macro provider to be used for querying the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* build macros from within the
supplier. The supplier should use this provider to obtain</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* the already defined build macros instead of using
the &ldquo;default&rdquo; provider returned by the</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">* ManagedBuildManager.getBuildMacroProvider().</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* The provider passed to a supplier will ignore
searching macros for the levels </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* higher than the current supplier level, will
query only the lower-precedence suppliers </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* for the current level and will query all
suppliers for the lower levels. </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* This is done to avoid infinite loops that could
be caused if the supplier calls the provider </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* and the provider in turn calls that supplier
again. Also the supplier should not know anything</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp; </span>
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;* about the build macros defined for the higher
levels.</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;* @return the IBuildMacro[] array
representing defined macros </span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New; color:#003366">&nbsp;&nbsp;&nbsp; </span>
<span style="font-family:Courier New">IBuildMacro[] getMacros(IManagedProject project,</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 106.2pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">IBuildMacroProvider provider);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="MsoNormal">The <span style="font-family:Courier New">IBuildMacro</span> interface returns information regarding an
individual build macro.&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">public interface
IBuildMacro{</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_TEXT = 1; //can hold any text string</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_TEXT_LIST = 2; //can hold the array of text string values</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_FILE = 3; //can hold file path</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_FILE_LIST = 4; //can hold the array of file path
values</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_DIR = 5; //can hold dir path</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_DIR_LIST = 6; //can hold the array of dir path
values</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_ANY = 7; //can hold both file and dir path</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;public
static final int VALUE_PATH_ANY_LIST = 8; //can hold the array of&nbsp; PATH_ANY</span></p>
<p class="MsoNormal" style="text-indent: 35.4pt; margin-left: 283.2pt; margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">// values&nbsp;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;String getName();</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</span> </p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @returns IBuildMacro.VALUE_xxx</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;int
getMacroValueType();</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;/**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;* @throws BuildMacroException if macro
holds StringList-type value</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">
<span style="color: #003366">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;&nbsp;String getStringValue() throws BuildMacroException;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
&nbsp;</p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;&nbsp; /**</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;&nbsp; &nbsp;* @throws BuildMacroException if macro
holds single String-type value</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New"><span style="color: #003366">&nbsp;&nbsp;&nbsp; &nbsp;*/</span></span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">&nbsp;&nbsp;&nbsp;
String[] getStringListValue() throws BuildMacroException;</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-family:Courier New">}</span></p>
<p class="subsection"><a name="_TocSectionDynamic_9">7.9 Defining a Configuration Name Provider</a></p>
<p class="MsoNormal">All the configuration names must be unique within a
project.&nbsp; You can provide unique configuration names in your build
definitions, or you can dynamically created unique names.&nbsp; To
provide configuration names dynamically, <a name="_TocSectionDynamic_15">you
must specify and supply a class that implements the <code>IConfigurationNameProvider</code>
interface shown below.&nbsp; The class name is assigned to the projectType element,
configurationNameProvider attribute. </a></p>
<p class="MsoNormal">Consider the following usage for a configuration name
provider.&nbsp; You support multiple versions of your tool-chain within the same
version of CDT (see § 8.2 for a discussion of supporting multiple versions).&nbsp;
For the purpose of this example, assume they are versions 1.0 and 2.0.&nbsp; You
provide default &quot;debug&quot; and &quot;release&quot; configurations for each version of your
tool-chain.&nbsp; You have a choice when assigning names to these default
configurations.&nbsp; You can define unique names statically in your build
definitions (for example, &quot;Debug_1.0&quot;, &quot;Debug_2.0&quot;, etc.)&nbsp; However, these
names are not very &quot;user-friendly&quot;, particularly for a user who intends to use a
single version of your tool-chain.&nbsp; The alternative is to dynamically
assign unique configuration names using a configuration name provider (see the&nbsp; <span style="font-family:Courier New">
getNewConfigurationName </span>method below.)&nbsp; The first configuration
that is created gets to use the most &ldquo;basic&rdquo; name &#8211; for example, &ldquo;Debug&rdquo;.&nbsp; When another configuration is
created that uses a different tool-chain version, it would see that &ldquo;Debug&rdquo; was
already chosen, so it could return a more qualified name - for example, &ldquo;Debug_2.0&rdquo;.&nbsp;
The same technique could be used when your tool-chain supports multiple
host/target platforms.</p>
<p class="MsoNormal"><span style="font-family:Courier New">public interface
IConfigurationNameProvider {<br>
<br>
&nbsp;&nbsp; /*<br>
&nbsp;&nbsp;&nbsp; * Returns the new unique configuration name based on the
'configuration'<br>
&nbsp;&nbsp;&nbsp; * object and the list of configuration names already in use
in the project.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; */<br>
<br>
&nbsp;&nbsp;&nbsp; String getNewConfigurationName(IConfiguration configuration,
String [] usedConfigurationNames );<br>
}</span></p>
<p class="subsection"><a name="_TocSectionDynamic_10">7.10 Defining an Output Name Provider</a></p>
<p>You can specify an output name provider for an outputType. You must specify
and supply a class that implements the <code>IManagedOutputNameProvider</code>
interface shown below.&nbsp; The class name is assigned to the outputType element,
<strong>nameProvider</strong> attribute. </p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Courier New">public
interface IManagedOutputNameProvider{</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp;/**</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp; *</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp; * Returns the output names
corresponding to the primary input name(s)</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp; *</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp; * @returns String[]</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp; */</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">&nbsp;&nbsp;&nbsp;IPath[]
getOutputPaths(ITool tool, IPath[] primaryInputs);</span></p>
<p class="MsoNormal" style="margin-top: 0; margin-bottom: 0">
<span style="font-size:10.0pt;font-family:Courier New">}</span></p>
<p class="MsoNormal" style="margin-top: 6px; margin-bottom: 0">When <strong>multipleOfType</strong>
is true, an output name provider, or the <strong>outputNames</strong> attribute, is required
in order for MBS to know the names of the output files.</p>
<p class="MsoNormal" style="margin-top: 6px; margin-bottom: 0">The returned
paths must be relative to the top-level build directory. However, if only a file
name is returned, MBS will automatically add on the directory path relative to
the top-level build directory. The relative path comes from the source file
location. In order to specify that this output file is always in the top-level
build directory, regardless of the source file directory structure, return
&quot;./path&quot;.</p>
<p class="subsection"><a name="_TocSectionDynamic_11">7.11 Defining an Option Value Handler</a></p>
<p>You can specify a value handler for an option.&nbsp; You must specify and
supply a class that implements the <span style="font-family:Courier New">
IManagedOptionValueHandler</span> interface shown below.&nbsp; This interface is
used to dynamically manage the value of an option.</p>
<p><span style="font-family:Courier New">public interface IManagedOptionValueHandler{ <br>
<br>
&nbsp;&nbsp;&nbsp; public final int EVENT_OPEN = 1;&nbsp; /** The option is
opened, i.e. its UI element <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* is created. The valueHandler can override <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* the value of the option. If it does not, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* the last persisted value is used. */<br>
&nbsp;&nbsp;&nbsp; public final int EVENT_CLOSE = 2; /** The option is closed.
i.e. its value has been<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* destroyed when a configuration/resource gets deleted.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* The valuehandler can do various things assocaited with<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* destroying the option such as freeing the memory<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* associated with this option callback, if needed. */<br>
&nbsp;&nbsp;&nbsp; public final int EVENT_SETDEFAULT = 3; /** The default value
option::defaultValue has <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* been set. The handleValue callback is called <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* afterwards to give the handler a chance to <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* override the value or to update the value in <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* its back-end. Typically this event will be called <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* when the Restore Defaults button is pressed. */<br>
&nbsp;&nbsp;&nbsp; public final int EVENT_APPLY = 4; /** The option has been set
by pressing the Apply <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* button (or the OK button). The valueHandler can <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* transfer the value of the option to its own <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
* back-end. */<br>
<br>
&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp; * Handles transfer between values between UI element and <br>
&nbsp;&nbsp;&nbsp; * back-end in different circumstances.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; * @param configuration build configuration of option <br>
&nbsp;&nbsp;&nbsp; * (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;&nbsp;&nbsp; * @param holder contains the holder of the option<br>
&nbsp;&nbsp;&nbsp; * @param option the option that is handled<br>
&nbsp;&nbsp;&nbsp; * @param extraArgument extra argument for handler<br>
&nbsp;&nbsp;&nbsp; * @param event event to be handled <br>
&nbsp;&nbsp;&nbsp; *<br>
&nbsp;&nbsp;&nbsp; * @return True when the event was handled, false otherwise.<br>
&nbsp;&nbsp;&nbsp; * This enables default event handling can take place.<br>
&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; boolean handleValue(IBuildObject configuration, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IOption option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String extraArgument, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int event);<br>
<br>
&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp; * Checks whether the value of an option is its default value.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; * @param configuration build configuration of option <br>
&nbsp;&nbsp;&nbsp; * (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;&nbsp;&nbsp; * @param holder contains the holder of the option<br>
&nbsp;&nbsp;&nbsp; * @param option the option that is handled<br>
&nbsp;&nbsp;&nbsp; * @param extraArgument extra argument for handler<br>
&nbsp;&nbsp;&nbsp; *<br>
&nbsp;&nbsp;&nbsp; * The additional options besides configuration are supplied
to <br>
&nbsp;&nbsp;&nbsp; * provide enough information for querying the default value
from <br>
&nbsp;&nbsp;&nbsp; * a potential data storage back-end.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; * @return True if the options value is its default value and<br>
&nbsp;&nbsp;&nbsp; * False otherwise. This enables that default event handling
can <br>
&nbsp;&nbsp;&nbsp; * take place.<br>
&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; boolean isDefaultValue(IBuildObject configuration, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IOption option, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String extraArgument);<br>
<br>
&nbsp;&nbsp; /**<br>
&nbsp;&nbsp;&nbsp; * Checks whether an enumeration value of an option is
currently a <br>
&nbsp;&nbsp;&nbsp; * valid choice. The use-case for this method is the case,
where<br>
&nbsp;&nbsp;&nbsp; * the set of valid enumerations in the plugin.xml file
changes.<br>
&nbsp;&nbsp;&nbsp; * The UI will remove entries from selection lists if the
value <br>
&nbsp;&nbsp;&nbsp; * returns false.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; * @param configuration build configuration of option <br>
&nbsp;&nbsp;&nbsp; * (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;&nbsp;&nbsp; * @param holder contains the holder of the option<br>
&nbsp;&nbsp;&nbsp; * @param option the option that is handled<br>
&nbsp;&nbsp;&nbsp; * @param extraArgument extra argument for handler<br>
&nbsp;&nbsp;&nbsp; * @param enumValue enumeration value that is to be checked<br>
&nbsp;&nbsp;&nbsp; *<br>
&nbsp;&nbsp;&nbsp; * The additional options besides configuration are supplied
to <br>
&nbsp;&nbsp;&nbsp; * provide enough information for querying information from a
<br>
&nbsp;&nbsp;&nbsp; * a potential data storage back-end.<br>
&nbsp;&nbsp;&nbsp; * <br>
&nbsp;&nbsp;&nbsp; * @return True if the enumeration value is valid and False
<br>
&nbsp;&nbsp;&nbsp; * otherwise.<br>
&nbsp;&nbsp;&nbsp; */<br>
&nbsp;&nbsp;&nbsp; boolean isEnumValueAppropriate(IBuildObject configuration,
<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IOption option,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String extraArgument, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String enumValue);<br>
}</span></p>
<p>See the Shared Tool Options design document in bugzilla #90481
for additional information.</p>
<p class="subsection"><a name="_TocSectionDynamic_12">7.12 Defining an Option Applicability Calculator</a></p>
<p>You can specify an option applicability calculator for an option.&nbsp; You
must specify and supply a
class that implements the <code><span style="font-family:Courier New">IManagedOutputNameProvider</code>
interface shown below.&nbsp; The class name is assigned to the outputType element,
<strong>nameProvider</strong> attribute.&nbsp; You should implement this interface when an
option is not always applicable - for example, when an option is only used if
another option has a particular value.</p>
<p><span style="font-family:Courier New">public interface IOptionApplicability {<br>
&nbsp;
/**<br>
&nbsp;
* This method is queried whenever a makefile or makefile fragment is<br>
&nbsp;
* generated which uses this option, and in the C/C++ Build property<br>
&nbsp;
* pages when displaying the current command line.<br>
&nbsp;
* <br>
&nbsp;
* @param configuration build configuration of option <br>
&nbsp;
* (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;
* @param holder contains the holder of the option<br>
&nbsp;
* @param option the option itself&nbsp; <br>
&nbsp;
* <br>
&nbsp;
* @return true if this option is to be used in command line<br>
&nbsp;
* generation, false otherwise<br>
&nbsp;
*/<br>
&nbsp;
public boolean isOptionUsedInCommandLine(<br>
&nbsp;&nbsp;&nbsp; IBuildObject configuration, <br>
&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp; IOption option); <br>
<br>
&nbsp;
/**<br>
&nbsp;
* This method is queried whenever a new option category is displayed.<br>
&nbsp;
* <br>
&nbsp;
* @param configuration build configuration of option <br>
&nbsp;
* (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;
* @param holder contains the holder of the option<br>
&nbsp;
* @param option the option itself<br>
&nbsp;
* <br>
&nbsp;
* @return true if this option should be visible in the build options page,<br>
&nbsp;
* false otherwise<br>
&nbsp;
*/<br>
&nbsp;
public boolean isOptionVisible(<br>
&nbsp;&nbsp;&nbsp; IBuildObject configuration, <br>
&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp; IOption option); <br>
<br>
&nbsp;
/**<br>
&nbsp;
* Whenever the value of an option changes in the GUI, this method is<br>
&nbsp;
* queried on all other visible options for the same category. Note that<br>
&nbsp;
* this occurs when the GUI changes - the user may opt to cancel these<br>
&nbsp;
* changes.<br>
&nbsp;
* <br>
&nbsp;
* @param configuration build configuration of option <br>
&nbsp;
* (may be IConfiguration or IResourceConfiguration)<br>
&nbsp;
* @param holder contains the holder of the option<br>
&nbsp;
* @param option the option itself<br>
&nbsp;
*<br>
&nbsp;
* @return true if this option should be enabled in the build options page,<br>
&nbsp;
* or false if it should be disabled (grayed out)<br>
&nbsp;
*/<br>
&nbsp;
public boolean isOptionEnabled(<br>
&nbsp;&nbsp;&nbsp; IBuildObject configuration, <br>
&nbsp;&nbsp;&nbsp; IHoldsOptions holder, <br>
&nbsp;&nbsp;&nbsp; IOption option); <br>
<br>
}</span></p>
<p class="subsection"><a name="_TocSectionDynamic_13">7.13 Defining a Dynamic Element Provider</a></p>
<p>Tool integrators may supply a dynamic element provider to dynamically provide the definitions that are otherwise specified in the buildDefinitions
extension point.&nbsp; To specify a dynamic element provider, your build
definitions must define a dynamicElementProvider element as described in § 3.19. </p>
<p class="subsection"><a name="_TocSectionDynamic_14">7.14 Adding Custom Pages to the New Project Wizard</a></p>
</a>
<P class="MsoNormal">One aspect that toolchain developers have requested
more flexibility in is the ability to customize the new project wizard.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>Developers wish to be able to
add custom pages to the wizard to facilitate such things as
automatically setting launch properties for the project, generating
configuration files for the project, and other various custom settings
and behaviour.<BR>
<BR>
Developers might wish that such customizations be
toolchain specific, or possibly be global to all toolchains.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>At the same time or separately,
they may wish their pages to appear only when a project is of a certain
nature (e.g. C vs. C++) or for certain project types (e.g. executable
vs. library).<BR>
<BR>External interfaces are provided by a single
extension point:<BR>
<BR>7.14.1 org.eclipse.cdt.managedbuilder.ui.newWizardPages</P>
<P class="MsoNormal">This extension point allows for the specification
of pages to the New Managed C/C++ wizards.<SPAN style="mso-spacerun:yes">&nbsp;
</SPAN>Via this extension point, the developer may specify one or more
wizard pages to add to the wizard, and optionally only add these pages
if certain conditions on the project type, project toolchain, and
project nature are met.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>The
developer may also specify a Java class which performs any operations
pursuant to the state of the wizard when the user clicks Finish.</P>
<P>7.14.1.1 Schema</P>
<P>7.14.1.1.1 wizardPage Element</P>
<P class="MsoNormal">One or more instances of this element are required.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>Each instance of this element
defines an additional page which is added to the New Project wizard.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>Pages are added after the
default pages provided by MBS.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>Pages
are added in the order they are discovered.</P>
<P class="MsoNormal">Note that the IWizardPage interface allows a page
to specify programmatically and dynamically at runtime what its previous
and next pages are.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>This
element does not trump that behaviour, but rather just specifies the
order in which the pages are added to the wizard (and hence the order in
which the pages appear if they do not override the previous and next
page methods).</P>
<P class="MsoNormal">For convenience, here is a UML class diagram of the
IWizardPage interface.<BR>
<BR>
<IMG border="0" src="IWizardPage.jpeg" width="176" height="196" alt="UML class diagram of the IWizardPage interface">
<BR>
<BR><A name="OLE_LINK10"></A><A name="OLE_LINK9"><SPAN
style="mso-bookmark:OLE_LINK10">Wizard pages as GUI elements by
themselves are really not all that useful.<SPAN style="mso-spacerun:yes">&nbsp;
</SPAN>More than likely if someone is defining their own wizard pages
it's because they need some additional operations to happen upon project
creation in addition to the stock behaviour of creating a basic project,
and they want to use their new wizard pages to provide a front end to
these operations.</SPAN></A></P>
<p>Note that during the display of the wizard page, and the user possibly
entering information, no permanent changes should be executed, since the user
can abort the creation of the new project at any time. For this reason,
the actual changes indicated on the wizard pages should be executed
once the user has completed the new project wizard: after the "Finish" button
has been selected. User data can be saved in a storage area for any of these
pages, and retrieved later when needed.
<P><SPAN style="mso-bookmark:OLE_LINK9"><SPAN style="mso-bookmark:OLE_LINK10">
As such, along with a specification
of the GUI wizard page, ISVs may specify a runnable operation that will
be executed in the wizard's doRunEpilogue() method,
after the new project creation is committed.
These contributions will all be
executed in the order that the wizard pages were added to the wizard.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>Not all pages need have such a
contribution however, as ISVs may need to perform all the operations
associated with their pages as a group.<SPAN style="mso-spacerun:yes">&nbsp;
</SPAN>In cases such as this the ISV can define an operation for one of
the pages and it can pull data from any of the other pages as required.</SPAN></SPAN>
</P>
<P>wizardPage
Element Schema:</P>
<TABLE class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"
style="border-collapse:collapse;mso-table-layout-alt:fixed;border:none;
mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:480;mso-padding-alt:
0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:
.5pt solid windowtext">
<TR style="mso-yfti-irow:0">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Attribute</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Description</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Required?</P>
</TD>
</TR>
<TR style="mso-yfti-irow:1">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Id</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">A unique identifier for
the page which will be used to reference the page</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Yes</P>
</TD>
</TR>
<TR style="mso-yfti-irow:2">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">pageClass</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Specifies the Java class
which implements the added page.<SPAN style="mso-spacerun:yes">&nbsp;
</SPAN>This class must implement the <A
name="OLE_LINK7"><SPAN style="mso-bookmark:OLE_LINK8"><span style="font-family:Courier New">
org.eclipse.jface.wizard.IWizardPage</span>
</SPAN></A>interface</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Yes</P>
</TD>
</TR>
<TR style="mso-yfti-irow:3;mso-yfti-lastrow:yes">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">operationClass</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Specifies the Java class
which implements the operations associated with this page.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>The class must implement the
<span style="font-family:Courier New">java.lang.Runnable</span> interface</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">No</P>
</TD>
</TR>
</TABLE>
<P><A name="_Ref99249701">7.14.1.1.2 projectType element</A></P>
<P class="MsoNormal">This is an optional child element of wizardPage
which specifies a projectType for which the additional pages should
apply.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>One instance of this
element is provided per toolchain supported by the page.</P>
<P class="MsoNormal">If no projectType elements are specified, then it
is assumed that the page potentially applies to all projectTypes,
although it may still be excluded based on <A
name="OLE_LINK5"><SPAN style="mso-bookmark:OLE_LINK6">toolchain (§<SPAN
style='mso-field-code:" REF _Ref98746447 \\r \\h "'>7.14.1.1.3</SPAN>) </SPAN></A>or project nature (§<SPAN
style='mso-field-code:" REF _Ref98746447 \\r \\h "'>7.14.1.1.4</SPAN>).</P>
<P>projectType Element Schema:</P>
<TABLE class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"
style="border-collapse:collapse;mso-table-layout-alt:fixed;border:none;
mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:480;mso-padding-alt:
0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:
.5pt solid windowtext">
<TR style="mso-yfti-irow:0">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Attribute</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Description</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Required?</P>
</TD>
</TR>
<TR style="mso-yfti-irow:1;mso-yfti-lastrow:yes">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">projectTypeID</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">The unique ID of a
projectType for which this page should appear.</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Yes</P>
</TD>
</TR>
</TABLE>
<P>7.14.1.1.3 toolchain Element</P>
<P class="MsoNormal">This is an optional child element of wizardPage
which specifies a toolchain for which the additional pages should apply.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>One instance of this element is
provided per toolchain supported by the page.</P>
<P class="MsoNormal"><A name="OLE_LINK1"><SPAN
style="mso-bookmark:OLE_LINK2">If no toolchain elements are specified,
then it is assumed that the page potentially applies to all toolchains,
although it may still be excluded based on project type (§<SPAN
style='mso-field-code:" REF _Ref99249701 \\r \\h "'>7.14.1.1.2</SPAN>) or project nature (§<SPAN
style='mso-field-code:
" REF _Ref98746447 \\r \\h "'>7.14.1.1.4</SPAN>)</SPAN></A></P>
<P class="MsoNormal">
<SPAN style="mso-bookmark:OLE_LINK2"></SPAN>toolchain
Element Schema</P>
<TABLE class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"
style="border-collapse:collapse;mso-table-layout-alt:fixed;border:none;
mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:480;mso-padding-alt:
0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:
.5pt solid windowtext">
<TR style="mso-yfti-irow:0">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Attribute</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Description</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Required?</P>
</TD>
</TR>
<TR style="mso-yfti-irow:1">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">toolchainID</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">The unique ID of a
toolchain for which this page should appear.</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Yes</P>
</TD>
</TR>
<TR style="mso-yfti-irow:2;mso-yfti-lastrow:yes">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">versionsSupported</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">A comma separated list of
specific versions of the toolchain that are supported by the page.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>If not specified, it is
assumed that this page supports the toolchain regardless of version.</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">No</P>
</TD>
</TR>
</TABLE>
<P><A name="_Ref98746447">7.14.1.1.4 nature Element</A></P>
<P class="MsoNormal">This optional child element of wizardPage specifies
the project nature(s) for which the additional pages should apply. <SPAN
style="mso-spacerun:yes">&nbsp;</SPAN><SPAN style="mso-spacerun:yes">&nbsp;</SPAN>One
instance of this element is provided per nature supported.</P>
<P class="MsoNormal"><SPAN style="mso-spacerun:yes"></SPAN>This
would for example allow one to add pages to the New Managed C Project
wizard but not the New Managed C++ project wizard, or other hypothetical
natures that might be supported by MBS in the future (e.g. someday there
might be a Fortran nature).</P>
<P class="MsoNormal">If no natureID elements are specified, then it is
assumed that the page potentially applies to all project natures,
although it may still be excluded based on project type (§<SPAN
style='mso-field-code:" REF _Ref99249701 \\r \\h "'>7.14.1.1.2</SPAN>) or toolchain (§<SPAN
style='mso-field-code:" REF _Ref98746447 \\r \\h "'>7.14.1.1.3</SPAN>)</P>
<P>natureID element Schema:</P>
<TABLE class="MsoTableGrid" border="1" cellspacing="0" cellpadding="0"
style="border-collapse:collapse;mso-table-layout-alt:fixed;border:none;
mso-border-alt:solid windowtext .5pt;mso-yfti-tbllook:480;mso-padding-alt:
0cm 5.4pt 0cm 5.4pt;mso-border-insideh:.5pt solid windowtext;mso-border-insidev:
.5pt solid windowtext">
<TR style="mso-yfti-irow:0">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Attribute</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Description</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border:solid windowtext 1.0pt;
border-left:none;mso-border-left-alt:solid windowtext .5pt;mso-border-alt:
solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Required?</P>
</TD>
</TR>
<TR style="mso-yfti-irow:1;mso-yfti-lastrow:yes">
<TD width="151" valign="top"
style="width:4.0cm;border:solid windowtext 1.0pt;
border-top:none;mso-border-top-alt:solid windowtext .5pt;mso-border-alt:solid windowtext .5pt;
padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">natureID</P>
</TD>
<TD width="363" valign="top"
style="width:272.4pt;border-top:none;border-left:
none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">The unique ID of a nature
(org.eclipse.core.resources.natures) for which this page should
appear.</P>
</TD>
<TD width="81" valign="top"
style="width:60.6pt;border-top:none;border-left:none;
border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;
mso-border-top-alt:solid windowtext .5pt;mso-border-left-alt:solid windowtext .5pt;
mso-border-alt:solid windowtext .5pt;padding:0cm 5.4pt 0cm 5.4pt">
<P class="MsoNormal" style="margin-left:0cm">Yes</P>
</TD>
</TR>
</TABLE>
<P class="MsoNormal"><BR>
<BR>7.14.2 High-Level Architecture<BR>
<BR>7.14.2.1 System Overview<BR>
<BR>The custom wizard pages subsystem in MBS is responsible for managing:</P>
<UL>
<LI>Which pages exist in the system, and their associated attributes</LI>
<LI>
Whether pages should be shown in a given
wizard based upon what options the user has selected in previous pages
(i.e. project nature, toolchain, project type).</LI>
<LI>What order pages are shown in as the user navigates the wizard</LI>
<LI>
What operations should be executed in
association to the page during the wizard's doRunEpilogue() method.</LI>
</UL>
<P><BR>The main entry point to the system is a central manager class called MBSCustomPageManager.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>This
class is responsible for managing classes which handle the
aggregation of page data (MBSCustomPageData).</P>
<P class="MsoNormal">For convenience sake, an abstract base class for wizard pages exists (MBSCustomPage) which ISVs can subclass to implement the default behaviour of
allowing the page manager to completely control the ordering of pages.</P>
<P class="MsoNormal">The following class diagram shows how these
new classes fit into the existing wizard system in MBS in terms of class
hierarchies and associations.<BR><BR>
<IMG border="0" src="classdiagram.jpeg" width="1454" height="1711" alt="High level view of MBS wizard system">
</P>
<H5>Figure 12: High level view of MBS wizard system</H5>
<P><BR>
As you can see in Figure 12, there are two MBS wizards, one for C projects and one for C++. These
wizards ultimately inherit some of their behaviour from the generic
wizards provided by the CDT's core UI. There are several wizard pages that always appear in the MBS wizard, which allow the user to select the project name, project location, and MBS project type for their project. The wizards defer to the MBSCustomPageManager to handle any custom pages that might be present in the system.</P>
<P><BR>7.14.3 Low-Level Architecture
</P>
<P><BR>Drilling down into the custom wizard page system itself, we see the following:<BR>
<BR>
<IMG border="0" src="classdiagram2.jpeg" width="776" height="1052" alt="High level view of custom wizard system">
</P>
<H5>Figure 12: High level view of custom wizard system</H5>
<P><BR>The MBSCustomPageManager class is the main entry point to the system. It is responsible for loading all of the extensions which provide custom wizard pages, and storing that data for later use by the wizard. It keeps a list of records of these pages (MBSCustomPageData) which act as a repository for everything that needs to be known about the page, including what circumstances it should be shown under, and what actual IWizardPage should be shown when the page is displayed.<BR>
<BR>For convenience, there is an abstract base class (MBSCustomPage) which ISVs can subclass to get the most commonly desired behaviour from their pages. Most notably, the provided implementation contained in this class consults the MBSCustomPageManager to determine what wizard pages appear before and after the page, which is necessary to ensure that all custom pages in the system are displayed when they should be.<BR>
<BR>7.14.3.1 <SPAN style="mso-list:Ignore">M</SPAN>BSCustomPageManager</P>
<P class="MsoNormal">This class is responsible
for:</P>
<UL>
<LI>Maintaining the set of custom pages as
discovered by the wizard and allowing them to be referenced by string ID</LI>
<LI>Managing the published data which pages wish to
make available to other pages</LI>
<LI>
Managing
the visibility and ordering of custom pages within the wizard as the
user navigates between pages.</LI>
</UL>
<P><BR>This class is a singleton.
All non-constructor methods are static.</P>
<P class="MsoNormal">When the wizard is initialized, it
makes a call to MBSCustomPageManager.loadExtensions(). This method looks for contributions to the org.eclipse.cdt.managedbuilder.ui.newWizardPages
extension point.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>The loaded data is used to
instantiate and populate an MBSCustomPageData object for each page
discovered.</P>
<P class="MsoNormal">As the user manipulates the wizard, each page can
publish data they wish to export for use by other pages, or for use by the optional Runnable operation that
may execute when the wizard pages are completed.
<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>This is done via the
addPageProperty() method, which allows for the storage of string data by
string key, using the string ID of the page as a sort of namespace.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>The data can be
retrieved by other pages via the getPageProperty() method, and this is the standard way for pages to interface to each other.</P>
<P class="MsoNormal">Individual pages are expected to somehow consult
the getNextPage() and getPreviousPage() methods of the manager when
their own getNextPage() and getPreviousPage() methods are called by the
wizard.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>This allows the
pages to properly navigate amongst each other while taking into account
user choices such as project nature, toolchain, and project type.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>It should be noted that the
manager can only do so much as it fills the role of an advisor.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>Custom pages are still
theoretically free to ignore its existence, although this is strongly
discouraged.<BR>
<BR>
<IMG border="0" src="MBSCustomPageManager.jpeg" width="243" height="585" alt="UML diagram of MBSCustomPageManager">
<BR>
<BR>
</P>
<P><SPAN style="mso-bookmark:
OLE_LINK12">7.14.3.2 MBSCustomPageData</SPAN>
<SPAN style="mso-bookmark:OLE_LINK12"></SPAN><SPAN
style="mso-bookmark:OLE_LINK11"></SPAN></P>
<P class="MsoNormal">This class provides data aggregation capabilities
for the page manager to store information on a custom wizard page.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>On startup, the page manager
loads all contributions to the newWizardPages extension point, and
stores the loaded data in these records for later use. There is a nested class, ToolchainData, which is used to maintain information on each individual toolchain that a given custom page supports. The MBSCustomPage manager calls various methods on this class (e.g. MBSCustomPageData.shouldBeVisibleForNature()) to determine when a given page should be visible in the wizard.<BR>
<BR>
<IMG border="0" src="MBSCustomPageData.jpeg" width="238" height="604" alt="UML diagram of MBSCustomPageData">
</P>
<P><BR>
<SPAN style="mso-bookmark:
OLE_LINK12">7.14.3.3
</SPAN>MBSCustomPage
</P>
<P class="MsoNormal">This abstract class provides a convenient, partial
implementation of the IWizardPage interface.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>This class provides
implementations of the getNextPage() and getPreviousPage() methods which
consult with the page manager to determine which pages are to be
displayed.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>If an ISV's
custom pages do not subclass MBSCustomPage then their page
implementation must be carefully coded to function properly while still
respecting the rules laid out by the page manager.<BR>
<BR>
<IMG border="0" src="MBSCustomPage.jpeg" width="199" height="234" alt="UML diagram of MBSCustomPage">
<BR>
<BR>7.14.4 Limitations<BR>
<BR>
<A name="_Toc526070826">Currently there is no way for ISVs to
intermingle their wizard pages amidst the ones defined in MBS, or amidst
the ones created by other plugins in general.<SPAN
style="mso-spacerun:yes">&nbsp; </SPAN>In the future it might be
possible to provide an extension point which would allow an ISV to
customize this ordering for their product.</A></P>
<P class="MsoNormal"><SPAN style="mso-bookmark:_Toc526070826">This would
be problematic though as it would be possible for multiple ISVs to
attempt to specify such an ordering within the same installation of
Eclipse/CDT.</SPAN></P>
<P class="MsoNormal"><SPAN style="mso-bookmark:_Toc526070826">It would
also be problematic as certain custom pages would rely on the selected
project type or toolchain, and with a reordering mechanism, ISVs would
have to be careful to not try to put such pages ahead of the page on
which that data is selected.<SPAN style="mso-spacerun:yes">&nbsp; </SPAN>If
a developer were reordering pages that they themselves did not create,
they would have to tread extremely carefully to properly manage these
and other ordering constraints.</SPAN></P>
<p class="subsection"><a name="_TocSectionStartup_15"></a><a name="_TocSectionTutorial_18"> 7.15 Defining Startup Behavior for Configuration Loading</a></p>
<p>Tool integrators may require that a plugin contain all the build configurations before projects are loaded. Use of this interface insures that a plugin will have access to build configurations before project inforamation is loaded in the workbench. Two methods can be used to access configuration information just after build definitions have been loaded and then again after the build definitions have been resolved. Added as enhancement to <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=123275">bug 123275</a>. </p>
<blockquote>
<p class="style1"> public interface IManagedBuildDefinitionsStartup {</p>
<blockquote>
<p class="style1">String BUILD_DEFINITION_STARTUP = &quot;buildDefinitionStartup&quot;; //$NON-NLS-1$<br>
String CLASS_ATTRIBUTE = &quot;class&quot;; //$NON-NLS-1$<br>
<br>
/**<br>
* Any work you want to do on build definitions after they have been loaded but before they have been resolved.<br>
*/<br>
void buildDefsLoaded();<br>
<br>
/**<br>
* Any work you want to do on build definitions after they have been resolved.<br>
*/<br>
void buildDefsResolved();</p>
</blockquote>
<p class="style1">} </p>
</blockquote>
<a name="_TocSectionTutorial_18"></a>
<p>&nbsp;</p>
<p class="section"><a name="_TocSectionAdvanced"> Advanced Features</a></p>
<p class="subsection"><a name="_TocSectionAdvanced_1">8.1 Converting CDT 2.0 Manifest Files</a></p>
<p class="MsoNormal">The CDT 2.1 Managed Build System (MBS) defined a new object
model for tool integrators to use when integrating their tool definitions.&nbsp;
The CDT 3.0 model is upward compatible with the CDT 2.1 model with the exception
of the ToolChain.scannerInfoCollector attribute.&nbsp; CDT 2.0 manifest files continue to be supported, but it is recommended that
integrators use the new model when possible.&nbsp; New functionality that is added to MBS will be added to the new object model, and not necessarily to the old object
model.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The figure below shows the CDT 2.0
object model.&nbsp; The CDT 3.0 object model is shown earlier in the document.</p>
<p class="MsoNormal">&nbsp;<img style="border: 0px solid ;"
src="./image004.gif"
title="Figure 12 CDT 2.0 Managed build model elements"
alt="UML model of schema elements"></p>
<h5>Figure 12 CDT 2.0 Managed build model elements</h5>
<p class="MsoNormal">Below are the detailed instructions for converting a
manifest from the old model to the new model.</p>
<h3 class="subsection">8.1.1 MBS Manifest Extension Point</h3>
<p class="MsoNormal">The old object model defines the
org.eclipse.cdt.managedbuilder.core.ManagedBuildInfo extension point.&nbsp; The new
model defines the org.eclipse.cdt.managedbuilder.core.buildDefinitions extension
point.&nbsp; Both old model and new model definitions can be defined in the same
manifest file, but all of the identifiers (ids) assigned to both old and new
model elements must be unique within MBS.&nbsp; No two elements can have the same id no
matter whether they originate in the same or different manifest files.</p>
<p class="MsoNormal" style="margin-top:6.0pt">See the CDT 2.0 Gnu tool-chain
definitions for an example of the old model (org.eclipse.cdt.managedbuilder.ui\plugin.xml).&nbsp;
See the CDT 2.1 Gnu tool-chain definitions for an example of the new model.</p>
<h3 class="subsection">8.1.2 MBS 2.0 Target Element</h3>
<p class="MsoNormal">The new model does not define a target element.&nbsp; The
information defined in a target element in a 2.0 manifest file has been split up
into the ProjectType, ToolChain, Builder, and TargetPlatform elements in the new
model.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The Target attributes <em>name, id,
isTest </em>and<em> isAbstract</em> should be transferred to a new ProjectType
element in the new model.&nbsp; The <em>id</em> assigned to the Target must be
transferred to the new ProjectType element without change.&nbsp; Otherwise, projects
created using your integration with CDT 1.2 or 2.0.x will not be able to be
converted.&nbsp; There is no tool integrator intervention into the conversion process
yet, but this is a high priority for CDT 3.0.</p>
<h3 class="subsection">8.1.3 MBS 2.0 Configuration Element</h3>
<p class="MsoNormal" style="margin-top:6.0pt">The Configuration children of the
Target element are made Configuration children of the new ProjectType element.&nbsp;
The Configuration <em>name </em>and <em>&nbsp;id</em> attributes should be transferred
with the Configuration.&nbsp; The <em>id</em> assigned to the Configuration must remain
unchanged in order to support the conversion of old model project files.&nbsp; The
Target attributes <em>artifactName, cleanCommand </em>and <em>errorParsers </em>
attributes should be transferred to the Configuration element.&nbsp; The Target <em>
defaultExtension </em>attribute should be transferred to the Configuration
element
as the <em>artifactExtension </em>attribute (Note the name change).</p>
<p class="MsoNormal" style="margin-top:6.0pt">A new ToolChain element should be
created as the child of each Configuration element.&nbsp; The <em>name</em> and <em>id</em>
of the ToolChain are not dependent upon the name of any of the old model
objects.&nbsp; However, if you allow users to create CDT 2.1 projects using your CDT
2.0 manifest file, then the <em>id</em> of your new ToolChain must be the parent
Configuration <em>id, </em>appended with &ldquo;.toolchain&rdquo;.&nbsp; The Target <em>isAbstract,
osList, </em>a<em>rchList</em> and <em>scannerInfoCollector </em>attributes are
transferred to the ToolChain element.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A new Builder element can be
created as the child of each ToolChain element.&nbsp; The <em>name</em> and <em>id</em> of
the Builder are not dependent upon the name of any of the old model elements.&nbsp;
However, if you allow users to create CDT 2.1 projects using your CDT 2.0
manifest file, then the <em>id</em> of your new Builder must be the parent
Configuration <em>id, </em>appended with &ldquo;.builder&rdquo;.&nbsp; The target <em>isAbstract</em>
attribute is transferred to the Builder element.&nbsp; <em>&nbsp;</em>The target <em>
makeCommand</em> attribute should be transferred to the Builder element as the <em>
command </em>attribute (Note the name change).<em>&nbsp; </em>The target <em>
makeArguments </em>attribute should be transferred to the Builder element as the
<em>arguments </em>attribute (Note the name change).<em>&nbsp; </em>The target <em>
makefileGenerator </em>attribute should be transferred to the Builder element as
the <em>buildfileGenerator </em>attribute (Note the name change).</p>
<p class="MsoNormal" style="margin-top:6.0pt">A new TargetPlatform element can be
created as the child of each ToolChain element.&nbsp; The <em>name</em> and <em>id</em> of
the TargetPlatform are not dependent upon the name of any of the old model
elements.&nbsp; However, if you allow users to create CDT 2.1 projects using your CDT
2.0 manifest file, then the <em>id</em> of your new TargetPlatform must be the
parent Configuration <em>id, </em>appended with &ldquo;.targetplatform&rdquo;.&nbsp; The target <em>
isAbstract</em> and <em>binaryParser </em>attributes are transferred to the
TargetPlatform element.&nbsp; The TargetPlatform element contains <em>osList </em>and <em>
archList</em> attributes that specify the architecture(s) and operating system(s)
on which the Configuration&rsquo;s build artifact(s) execute.&nbsp; You can transfer the
Target <em>osList </em>and <em>archList</em> attributes if appropriate.</p>
<h3 class="subsection">8.1.4 MBS 2.0 Tool Element</h3>
<p class="MsoNormal">The old model allows Tools to be defined at the top level
scope in the manifest file.&nbsp; This is still true in the new model.&nbsp; In addition,
the new model allows Configuration, ToolChain, Builder and TargetPlatform
elements to be defined at the top level scope in the manifest file.</p>
<p class="MsoNormal" style="margin-top:6.0pt">In the old model, Tool elements can
also be specified as the children of Target elements.&nbsp; In the new model, Tool
elements are children of ToolChain elements.&nbsp; Old model Tool elements need to be
added as the child of each ToolChain that uses the Tool.&nbsp; All of the old model
Tool attributes are supported by the new model.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The <em>id</em> assigned to the Tool
must remain unchanged in order to support the conversion of old model project
files.&nbsp; The <em>outputs </em>attribute no longer defaults to an empty string.&nbsp; If
your Tool produces files by default with no extension, you must specify
&lsquo;outputs=&rdquo;&rdquo;&rsquo; in the definition of the Tool or one of its ancestors (<em>superClass</em>).</p>
<h3 class="subsection">8.1.5 MBS 2.0 ToolReference Element</h3>
<p class="MsoNormal">The new model does not define a ToolReference element.&nbsp;
Instead, a Tool element can specify the <em>superClass</em> attribute in order to
provide the same functionality.&nbsp; That is, specifying a Tool that inherits
attributes from another Tool and can override one or more attributes.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The old model uses ToolReferences
in two ways.&nbsp; They can be specified as the child of a Configuration element.&nbsp; In
this case, the ToolReference should be converted a Tool element child of the
Configuration&rsquo;s ToolChain, transferring the value of the <em>id </em>attribute to
the Tool <em>superClass </em>attribute.</p>
<p class="MsoNormal" style="margin-top:6.0pt">A ToolReference can also be
specified as the child of a Target element.&nbsp; In this case, the ToolReference
applies to all of the Configuration children of the Target.&nbsp; These ToolReference
elements need to be converted to Tool elements and added as the child of each ToolChain that uses the Tool.</p>
<h3 class="subsection">8.1.6 MBS 2.0 Option Element</h3>
<p class="MsoNormal" style="margin-top:6.0pt">All of the old model Option
attributes are supported by the new model.</p>
<p class="MsoNormal" style="margin-top:6.0pt">The <em>id</em> assigned to the
Option must remain unchanged in order to support the conversion of old model
project files.</p>
<h3 class="subsection">8.1.7 MBS 2.0 OptionReference Element</h3>
<p class="MsoNormal">The new model does not define an OptionReference element.&nbsp;
Instead, an Option element can specify the <em>superClass</em> attribute in order
to provide the same functionality.&nbsp; That is, specifying an Option that inherits
attributes from another Option and can override one or more attributes.</p>
<p class="MsoNormal" style="margin-top:6.0pt">All OptionReference elements should
be converted to Option elements, transferring the value of the <em>id </em>
attribute to the Option <em>superClass </em>attribute.</p>
<h3 class="subsection">8.1.8 MBS 2.0 OptionCategory, EnumeratedOptionValue, ListOptionValue
Elements</h3>
<p class="MsoNormal">There are no changes to these elements.</p>
<h3 class="subsection">8.1.9 MBS 2.0 DynamicElementProvider Element</h3>
<p class="MsoNormal">This element is supported in the same manner as in CDT 2.0,
with the exception that the dynamic elements returned by the provider must use
the new object model.</p>
<p class="subsection"><a name="_TocSectionAdvanced_2">8.2 Supporting Multiple Versions of a Tool-chain</a></p>
<p>This section will be provided in a future version of the document.&nbsp; For
now, refer to the Tool-chain Multi-version Support design document in bugzilla
#89872.</p>
</body>
</html>