Move Participants

org.eclipse.ltk.core.refactoring.moveParticipants

3.0

This extension point is used to define refactoring move participants. The reader of the expression provides the following predefined variables which can be referenced via the <with variable="..."> expression element: The default variable used during expression evaluation is bound to the element variable.

<!ELEMENT extension (moveParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT moveParticipant (enablement)>

<!ATTLIST moveParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED>


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>

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