Copy Participants
Identifier:
org.eclipse.ltk.core.refactoring.copyParticipants
Since:
3.1
Description:
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:
- Object element: the element to be copied
- List<String> affectedNatures: a list containing the natures of the projects affected
by the refactoring
- String processorId: the id of the refactoring processor that will own the participant.
The default variable used during expression evaluation is bound to the element variable.
Configuration Markup:
<!ELEMENT extension (copyParticipant*)>
<!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 copyParticipant (enablement)>
<!ATTLIST copyParticipant
id CDATA #REQUIRED
name CDATA #REQUIRED
class CDATA #REQUIRED
processOnCancel CDATA #IMPLIED>
- id - unique identifier for the copy participant.
- name - a human reabable name of the copy participant
- class - the name of the class that provides the participant implementation.
- processOnCancel - if true the change created by the participant will be executed even if
the overall change got canceled.
Examples:
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>
API Information:
The contributed class must extend org.eclipse.ltk.core.refactoring.participants.CopyParticipant
Copyright (c) 2001, 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