对于每个项目都配置了构建器,当构建器的项目中的资源发生更改时就会自动运行构建器。因此,构建器应该是快速的,并且根据更改数量而不是项目中的资源数来进行调整。这通常隐含着这样的含义:构建器能够增量更新它们的“构建状态”。
构建器扩展点允许构建器编写者使用一个符号名称来注册他们的构建器实现,然后,在工作空间中使用此符号名称来查找和运行构建器。该符号名称是构建器扩展的标识。当定义构建器扩展时,鼓励用户在“name”属性中包含人类可读的值,“name”属性标识它们的构建器,并且可能显示给用户。
<!ELEMENT extension (builder)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #REQUIRED
name CDATA #IMPLIED>
<!ATTLIST builder
hasNature (true | false)
isConfigurable (true | false) >
<!ATTLIST run
class CDATA #REQUIRED>
<!ELEMENT parameter EMPTY>
<!ATTLIST parameter
name CDATA #REQUIRED
value CDATA #REQUIRED>
如果在具有标识“com.xyz.coolplugin”的插件中定义了此扩展,则此构建器的标准名称将为“com.xyz.coolplugin.coolbuilder”。<extension id=
"coolbuilder"
name=
"Cool Builder"
point=
"org.eclipse.core.resources.builders"
>
<builder hasNature=
"false"
>
<run class=
"com.xyz.builders.Cool"
>
<parameter name=
"optimize"
value=
"true"
/>
<parameter name=
"comment"
value=
"Produced by the Cool Builder"
/>
</run>
</builder>
</extension>
Copyright (c) 2002, 2005 IBM Corporation and others.
All rights reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0 which
accompanies
this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html