編譯參與者

ID:
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.本程式與隨附的資料依照 Elipse Public License 1.0 版此次發行所隨附的條款而提供,可以在以下網址取得:http://www.eclipse.org/legal/epl-v10.html