platform-core-home/documents/3.1/large_scale_builders.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1, Mon Dec 13 21:10:40 2004 UTC revision 1.2, Wed Dec 22 22:13:50 2004 UTC
# Line 9  Line 9 
9  <table width="100%">  <table width="100%">
10  <tr><td style="background:#0080C0"><b><span style="color:white">Large-scale builder issues</span></b></td></tr>  <tr><td style="background:#0080C0"><b><span style="color:white">Large-scale builder issues</span></b></td></tr>
11  </table>  </table>
12  <font size="-1">Last modified: December 13, 2004</font>  <font size="-1">Last modified: December 22, 2004</font>
13  <p>  <p>
14  The workspace builder infrastructure is designed primarily with efficient  The workspace builder infrastructure is designed primarily with efficient
15  incremental compilers in mind.  Eclipse exposes just two fundamental build  incremental compilers in mind.  Eclipse exposes just two fundamental build
# Line 77  Line 77 
77          available when one or more projects in the current selection has that characteristic.          available when one or more projects in the current selection has that characteristic.
78  </li>  </li>
79  </ul>  </ul>
80    <h3>Proposed Solution</h3>
81    <p>
82    The builders extension point will introduce an "isConfigurable" attribute that
83    specifies whether a builder allows configuration of what build triggers it responds
84    to. Here is an example of a builder definition using this new attribute:
85  (bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=60803">60803</a>).  <pre>
86      &lt;extension point="org.eclipse.core.resources.builders" id="flexbuilder" name="Flexible Builder"&gt;
87        &lt;builder <b>isConfigurable="true"</b>&gt;
88          &lt;run class="org.eclipse.core.tests.internal.builders.FlexibleBuilder"/&gt;
89        &lt;/builder&gt;
90      &lt;/extension&gt;
91    </pre>
92    Builders that don't specify this attribute will never be configurable.
93    <p>
94    For configurable builders, new API on <tt>ICommand</tt> will allow a client
95    to programmatically specify what triggers that command responds to.  The new
96    methods on <tt>ICommand</tt> are:
97    <ul>
98    <li><tt><b>isConfigurable</b>()</tt> - returns the value of the <tt>isConfigurable</tt> attribute
99    in the builder extension definition.</li>
100    <li><tt><b>isBuilding</b>(int trigger)</tt> - Indicates if a build command is currently
101    responding to a given build trigger.  Triggers are represented by the
102    <tt>IncrementalProjectBuilder.*_BUILD</tt> constants.</li>
103    <li><tt><b>setBuilding</b>(int trigger, boolean value)</tt> - Changes whether a build
104    command responds to a given build trigger.  This method has no effect for builders
105    that are not configurable.</li>
106    </ul>
107    <p>
108    When a builder's triggers are configured, the result will be persisted in the
109    <tt>.project</tt> file. This allows sharing of the custom build triggers with
110    other team members. Here is an example of the build spec from a project description
111    file with a builder that does not respond to the autobuild trigger.  The new
112    <tt>triggers</tt> element specifies the active triggers for the command:
113    <pre>
114      &lt;buildSpec&gt;
115        &lt;buildCommand&gt;
116          &lt;name&gt;org.eclipse.core.tests.resources.flexbuilder&lt;/name&gt;
117          <b>&lt;triggers&gt;incremental,clean,full&lt;/triggers&gt;</b>
118          &lt;arguments&gt;
119          &lt;/arguments&gt;
120        &lt;/buildCommand&gt;
121      &lt;/buildSpec&gt;
122    </pre>
123    <p>
124    The build infrastructure will consult the build command each time build API is called
125    (<tt>IWorkspace.build</tt> and <tt>IProject.build</tt>).  Builders will not be
126    called on build triggers that they are configured to not respond to.
127    <p>
128    The UI build actions will use the <tt>isBuilding</tt> method to determine
129    whether various build commands are enabled for a particular selection.  For example,
130    if the selected project responds to the incremental build trigger, but not the
131    autobuild trigger, then the <b>Build Project</b> command will remain enabled
132    even when autobuild is turned on.  This will allow the user to manually trigger "non-incremental"
133    builders that are too slow to efficiently respond to the autobuild trigger, but allow
134    autobuild to continue triggering other builders in the workspace.
135    <p>
136    <h3>References</h3>
137    Bug <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=60803">60803</a>.
138  </p>  </p>
   
   
   
139  </body>  </body>
140  </html>  </html>

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2