编译参与者

标识:
org.eclipse.jdt.core.validationParticipant

起始版本:
3.2

描述:
此扩展点允许客户机通过 org.eclipse.jdt.core.compiler.validationParticipant 在各个构建和调节阶段接收通知,从而参与验证过程。

配置标记:

<!ELEMENT extension (validationParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT validationParticipant (requires* , managedMarker*)>

<!ATTLIST validationParticipant

class               CDATA #REQUIRED

id                  CDATA #REQUIRED

modifiesEnvironment (true | false)

createsProblems     (true | false)

requiredSourceLevel CDATA #IMPLIED

>

编译参与者的定义。此定义允许对参与者进行排序。参与者是分组运行的。用于修改环境的参与者组将首先运行,然后运行用于创建问题的参与者组,最后运行其他参与者的组。在每个组中,参与者是使用它们的“requires”属性排序的。如果“requires”属性指向不属于该组的参与者,那么将忽略该属性。



<!ELEMENT requires EMPTY>

<!ATTLIST requires

id CDATA #REQUIRED

>

运行此编译参与者时所需的参与者。



<!ELEMENT managedMarker EMPTY>

<!ATTLIST managedMarker

markerType CDATA #REQUIRED

>

受管标记是根据记录的问题创建的(请参阅 BuildContext#recordNewProblems(CategorizedProblem[]))。当重新构建相应的源文件或者清理项目时,将除去此标记。



示例:
validationParticipant 的声明的示例:

<extension
      id="apt"
      name="%annotationProcessingName"
      point="org.eclipse.jdt.core.validationParticipant">
   <validationParticipant
         class="org.eclipse.jdt.apt.core.internal.AptvalidationParticipant"
         id="APT"
         requiredSourceLevel="1.5">
      <managedMarker markerType="org.eclipse.jdt.apt.core.compile.problem"/>
   </validationParticipant>
    </extension> 


Copyright © 2006 BEA Systems, Inc and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html