設定転送

org.eclipse.ui.preferenceTransfer

3.1

ワークベンチでは、設定の保守をサポートしています。 この拡張ポイントの目的は、プラグインにより、設定の特定グループの保管およびロード用に特定サポートを追加することです。 これは、通常、インポートおよびエクスポートなどの操作に使用されます。

<!ELEMENT extension (transfer*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT transfer (mapping+ , description?)>

<!ATTLIST transfer

id   CDATA #REQUIRED

name CDATA #REQUIRED

icon CDATA #IMPLIED>


<!ELEMENT description (#PCDATA)>

本文に転送エンジンの機能についての簡略説明が含まれているサブエレメント (オプション)。



<!ELEMENT mapping (entry*)>

<!ATTLIST mapping

scope CDATA #REQUIRED>

org.eclipse.core.runtime.preferences.IPreferenceFilter を示すサブエレメント。スコープ org.eclipse.core.runtime.preferences.IScope から、 ノードごとにゼロまたはそれ以上のキーが指定された、ゼロまたはそれ以上のノードへの 1 つまたはそれ以上のマッピングを指定します。 フィルターに対するエクスポートおよびインポート動作の規則については、org.eclipse.core.runtime.preferences.IPreferenceFilter の仕様に記載されています。



<!ELEMENT entry (key*)>

<!ATTLIST entry

node CDATA #IMPLIED>

指定のスコープへ転送するノードおよびキーを指定するサブエレメント。



<!ELEMENT key EMPTY>

<!ATTLIST key

name CDATA #REQUIRED>


「すべてエクスポート」転送により、指定のスコープに対して、すべてのノードがエクスポートされる例を以下に示します。

   

<extension point=

"org.eclipse.ui.preferenceTransfer"

>

<transfer icon=

"XYZ.gif"

name=

"Export All Transfer Test"

id=

"org.eclipse.ui.tests.all"

>

<mapping scope=

"instance"

>

</mapping>

<mapping scope=

"configuration"

>

</mapping>

<mapping scope=

"project"

>

</mapping>

<description>

Export all tranfer, exports all nodes for specified scopes

</description>

</transfer>

</extension>

非常にシンプルな転送では、必須情報のみ提供されます。

   

<extension point=

"org.eclipse.ui.preferenceTransfer"

>

<transfer name=

"Bare Bones Transfer Test"

id=

"org.eclipse.ui.tests.all"

>

<mapping scope=

"instance"

>

</mapping>

</transfer>

</extension>

キーおよびノードの多数の組み合わせをエクスポートする例を以下に示します。

   

<extension point=

"org.eclipse.ui.preferenceTransfer"

>

<transfer icon=

"XYZ.gif"

name=

"Export many preferences"

id=

"org.eclipse.ui.tests.all"

>

<mapping scope=

"instance"

>

<entry node=

"org.eclipse.ui"

>

<key name=

"showIntro,DOCK_PERSPECTIVE_BAR"

/>

</entry>

<entry node=

"org.eclipse.ui.workbench"

>

<key name=

"bogus,RUN_IN_BACKGROUND"

/>

</entry>

<entry node=

"org.eclipse.ui.ide"

/>

<entry node=

"org.eclipse.core.resources"

/>

</mapping>

<mapping scope=

"configuration"

>

</mapping>

<description>

Export many combinations of keys and nodes

</description>

</transfer>

</extension>