文档创建

org.eclipse.core.filebuffers.documentCreation

3.0

此扩展点用来定制此插件的缺省文本文件缓冲区管理器的文档创建行为。它允许指定应该使用哪个文档工厂,以便创建为某种文件内容类型、文件扩展名或文件名创建的文本文件缓冲区的文档实例。

<!ELEMENT extension (factory)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT factory EMPTY>

<!ATTLIST factory

class         CDATA #REQUIRED

extensions    CDATA #IMPLIED

fileNames     CDATA #IMPLIED

contentTypeId CDATA #IMPLIED>

文档工厂的规范。为了找到给定文件的工厂,按以下顺序查阅了每个工厂规范的属性:contentTypeId、fileNames 和 extensions。如果找到了给定文件的多个相同的特定工厂规范,则没有指定要使用哪个工厂。



<extension id=

"org.eclipse.jdt.debug.ui.SnippetDocumentFactory"

name=

"%snippetDocumentFactory.name"

point=

"org.eclipse.core.filebuffers.documentCreation"

>

<factory extensions=

"jpage"

class=

"org.eclipse.jdt.internal.debug.ui.snippeteditor.SnippetDocumentFactory"

>

</factory>

</extension>

文档工厂必须实现 org.eclipse.core.filebuffers.IDocumentFactory。