<!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)>
可选子元素,其主体应表示传送引擎功能的简短描述。
<!ATTLIST mapping
scope CDATA #REQUIRED>
用来表示 org.eclipse.core.runtime.preferences.IPreferenceFilter 的子元素。它从作用域 org.eclipse.core.runtime.preferences.IScope 中指定 1 或多个映射到 0 或多个节点,其中,每个节点指定 0 或多个关键字。可在 org.eclipse.core.runtime.preferences.IPreferenceFilter 的规范中找到过滤器导出和导入行为的规则。
<!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>
Copyright (c) 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