#
Preference Transfer

###### Identifier:

org.eclipse.ui.preferenceTransfer

###### Description:

The workbench provides support for maintaining preferences. The purpose of this extension point is to allow plug-ins to add specific support for saving and loading specific groups of preferences. Typically this is used for operations such as Import and Export.

###### Configuration Markup:

<!ELEMENT extension (transfer*)>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED>

- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance

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

<!ATTLIST transfer

id CDATA #REQUIRED

name CDATA #REQUIRED

icon CDATA #IMPLIED>

- id - a unique name that will be used to identify this transfer
- name - a translatable name that will be used in UI when listing this item
- icon - a relative name of the icon that will be used when displaying the transfer

<!ELEMENT description (#PCDATA)>

an optional subelement whose body should represent a short description of the transfer engine functionality.

<!ELEMENT mapping (entry*)>

<!ATTLIST mapping

scope CDATA #REQUIRED>

a subelement which represents a `org.eclipse.core.runtime.preferences.IPreferenceFilter`. It specifies 1 or more mappings from a scope `org.eclipse.core.runtime.preferences.IScope` to 0 or more nodes where 0 or more keys are specified per node. The rules for export and import behaviour for a filter can be found in the specifications in `org.eclipse.core.runtime.preferences.IPreferenceFilter`.

- scope - an attribute specifying the name of the scope to map the provided nodes and keys to (for example "instance")

<!ELEMENT entry (key*)>

<!ATTLIST entry

node CDATA #IMPLIED>

a subelement specifing the nodes and keys that are to be transferred for a given scope

- node - an attribute specifing the preference node within the given scope to be transferred

<!ELEMENT key EMPTY>

<!ATTLIST key

name CDATA #REQUIRED>

- name - an attribute specifing a comma separated list of preference keys within the given node to be transferred, specifying the key attribute without specifying a matching node will result in a runtime error.

###### Examples:

Example that export all tranfers, exports all nodes for specified scopes.

       <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>

Very Simple Transfer only provides required info and no more.

       <extension
             point="org.eclipse.ui.preferenceTransfer">
           <transfer
                name="Bare Bones Transfer Test"
                id="org.eclipse.ui.tests.all">
                <mapping scope="instance">
                </mapping>
        </transfer>
       </extension>

Example that exports many combinations of keys and nodes

       <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