# Move Participants

###### Identifier:

org.eclipse.ltk.core.refactoring.moveParticipants

###### Since:

3.0

###### Description:

This extension point is used to define refactoring move participants.

This extension point supports the `<enablement>` element. The default variable is the element to be moved.
Defined variables for `<with>` expressions are:

- "element": type `java.lang.Object`; the element to be moved (same as the default variable)
- "affectedNatures": type `java.util.List<String>`; the natures of all projects affected by the refactoring
- "processorIdentifier": type `java.lang.String`; the id of the refactoring processor that will own the participant

###### Configuration Markup:

<!ELEMENT extension (moveParticipant*)>

<!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 moveParticipant (enablement)>

<!ATTLIST moveParticipant

id CDATA #REQUIRED

name CDATA #REQUIRED

class CDATA #REQUIRED>

- id - unique identifier for the move participant.
- name - a human reabable name of the move participant
- class - the name of the class that provides the participant implementation.

###### Examples:

The example below defines a type move participant. The participant is enabled if one of the project affected by the refactoring has a Java nature and when the type to be moved is a JUnit test.

    <moveParticipant
        id="org.eclipse.jdt.junit.moveTypeParticipant"
        name="%MoveTypeParticipant.name"
        class="org.eclipse.jdt.internal.junit.ui.TypeMoveParticipant">
        <enablement>
          <with variable="affectedNatures">
            <iterate operator="or">
              <equals value="org.eclipse.jdt.core.javanature"/>
            </iterate>
          </with>
          <with variable="element">
            <instanceof value="org.eclipse.jdt.core.IType"/>
            <test property="org.eclipse.jdt.junit.isTest"/>
          </with>
        </enablement>
    </moveParticipant>

###### API Information:

The contributed class must extend `org.eclipse.ltk.core.refactoring.participants.MoveParticipant`

Copyright (c) 2001, 2013 IBM Corporation and others.
This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which accompanies this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html/ SPDX-License-Identifier: EPL-2.0