<!ELEMENT extension (factory+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED>
<!ATTLIST factory
adaptableType CDATA #REQUIRED
class CDATA #REQUIRED>
<!ELEMENT adapter EMPTY>
<!ATTLIST adapter
type CDATA #REQUIRED>
<extension point=
"org.eclipse.core.runtime.adapters"
>
<factory class=
"com.xyz.MyFileAdapterFactory"
adaptableType=
"org.eclipse.core.resources.IFile"
>
<adapter type=
"com.xyz.MyFile"
/>
</factory>
</extension>
IAdapterManager.hasAdapter
メソッドを使用して照会したり、
IAdapterFactory の getAdapter メソッドの 1 つを使用して検索したりできます。
この拡張ポイントを使用して登録されたアダプター・ファクトリーは、
実行時に IAdapterFactory.registerAdapters を使用して登録する必要がありません。
Copyright (c) 2004, 2005 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