Dostawcy dokumentów

org.eclipse.ui.editors.documentProviders

3.0 (oryginalna nazwa: org.eclipse.ui.documentProviders)

Ten punkt rozszerzenia umożliwia definiowanie odwzorowań między typami plików a dostawcami dokumentów lub między typami danych wejściowych edytora a dostawcami dokumentów, z których mogą korzystać edytory. Dostawcy dokumentów muszą implementować interfejs org.eclipse.ui.texteditor.IDocumentProvider. Dane wejściowe edytora muszą być instancją interfejsu 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>

W tym przykładzie dostawca org.eclipse.ui.examples.javaeditor.JavaDocumentProvider jest rejestrowany jako domyślny dostawca plików z rozszerzeniem ".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>

W tym przykładzie dostawca org.eclipse.ui.editors.text.FileDocumentProvider jest rejestrowany jako domyślny dostawca wszystkich danych wejściowych edytora, które są instancją interfejsu org.eclipse.ui.IStorageEditorInput.

Dostawcy dokumentów zarejestrowani dla rozszerzenia nazwy pliku mają pierwszeństwo w stosunku do dostawców zarejestrowanych dla typów danych wejściowych. Dostawcy dokumentów muszą implementować interfejs org.eclipse.ui.texteditor.IDocumentProvider. Dane wejściowe edytora muszą być instancją interfejsu org.eclipse.ui.IEditorInput.