注意:参与者必须了解其他参与者的存在情况,即,它们始终应该以互不干扰的方式设置文档。例如,当一个参与者想要对文档安装分区时,它必须使用
org.eclipse.jface.text.IDocumentExtension3
API
并选择唯一的分区标识。对于 3.2,如果违反了此要求,将在日志文件中写警告消息。
<!ELEMENT extension (participant)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ELEMENT participant EMPTY>
<!ATTLIST participant
class CDATA #REQUIRED
extensions CDATA #IMPLIED
fileNames CDATA #IMPLIED
contentTypeId CDATA #IMPLIED>
文档设置参与者的规范。为了找到给定文件的所有参与者,按以下顺序查阅了每个参与者规范的属性:contentTypeId、fileNames 和 extensions。如果找到了多个参与者,则未指定调用它们的顺序。
<extension id=
"JavaDocumentSetupParticipant"
name=
"%javaDocumentSetupParticipant"
point=
"org.eclipse.core.filebuffers.documentSetup"
>
<participant extensions=
"java"
class=
"org.eclipse.jdt.internal.ui.javaeditor.JavaDocumentSetupParticipant"
>
</participant>
</extension>
Copyright (c) 2001, 2006 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