Copy Participants

org.eclipse.ltk.core.refactoring.copyParticipants

3.1

This extension point is used to define refactoring copy 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 (copyParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED>


<!ELEMENT copyParticipant (enablement)>

<!ATTLIST copyParticipant

id              CDATA #REQUIRED

name            CDATA #REQUIRED

class           CDATA #REQUIRED

processOnCancel CDATA #IMPLIED>


The example below defines a participant for copying files. The participant is enabled if one of the project affected by the refactoring has a Java nature.

<copyParticipant id=

"org.eclipse.samples.copyParticipant"

name=

"%CopyFileParticipant.name"

class=

"org.eclipse.samples.CopyFileParticipant"

>

<enablement>

<with variable=

"affectedNatures"

>

<iterate operator=

"or"

>

<equals value=

"org.eclipse.jdt.core.javanature"

/>

</iterate>

</with>

<with variable=

"element"

>

<instanceof value=

"org.eclipse.core.resources.IFile"

/>

</with>

</enablement>

</copyParticipant>

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