ドキュメント・プロバイダー

org.eclipse.ui.editors.documentProviders

3.0 (以前は org.eclipse.ui.documentProviders)

この拡張ポイントを使用して、ファイル・タイプとドキュメント・プロバイダー、 またはエディター入力のタイプとエディターで使用できるドキュメント・プロバイダーの間のマッピングを定義します。 ドキュメント・プロバイダーには、インターフェース org.eclipse.ui.texteditor.IDocumentProvider を実装する必要があります。 エディター入力は、org.eclipse.ui.IEditorInput のインスタンスでなければなりません。

<!ELEMENT extension (provider*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT provider EMPTY>

<!ATTLIST provider

extensions CDATA #IMPLIED

inputTypes CDATA #IMPLIED

class      CDATA #REQUIRED

id         CDATA #REQUIRED>


<extension point=

"org.eclipse.ui.editors.documentProviders"

>

<provider extensions=

".jav"

class=

"org.eclipse.ui.examples.javaeditor.JavaDocumentProvider"

id=

"org.eclipse.ui.examples.javaeditor.JavaDocumentProvider"

>

</provider>

</extension>

この例は、org.eclipse.ui.examples.javaeditor.JavaDocumentProvider を、拡張子 ".jav" を持つファイルのデフォルト・プロバイダーとして登録します。

<extension point=

"org.eclipse.ui.editors.documentProviders"

>

<provider inputTypes=

"org.eclipse.ui.IStorageEditorInput"

class=

"org.eclipse.ui.editors.text.FileDocumentProvider"

id=

"org.eclipse.ui.editors.text.FileDocumentProvider"

>

</provider>

</extension>

この例は、org.eclipse.ui.editors.text.FileDocumentProvider を、org.eclipse.ui.IStorageEditorInput のインスタンスであるすべてのエディター入力のデフォルト・プロバイダーとして登録します。

ファイル拡張子に対して登録したドキュメント・プロバイダーは、 入力タイプに対して登録したドキュメント・プロバイダーよりも優先されます。 ドキュメント・プロバイダーには、インターフェース org.eclipse.ui.texteditor.IDocumentProvider を実装する必要があります。 エディター入力は、org.eclipse.ui.IEditorInput のインスタンスでなければなりません。