Rename Participants

Identifier:
org.eclipse.ltk.core.refactoring.renameParticipants

Since:
3.0

Description:
This extension point is used to define refactoring rename participants.

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

Configuration Markup:

<!ELEMENT extension (renameParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT renameParticipant (param* , enablement?)>

<!ATTLIST renameParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED

>


<!ELEMENT param EMPTY>

<!ATTLIST param

name  CDATA #REQUIRED

value CDATA #REQUIRED

>


Examples:
The example below defines a rename participant that participates in a type rename. The participant is enabled if one of the project affected by the refactoring has a Java nature and when the type to be renamed is a JUnit test.

<renameParticipant
    id="org.eclipse.jdt.junit.renameTypeParticipant"
    name="%RenameTypeParticipant.name" 
    class="org.eclipse.jdt.internal.junit.ui.TypeRenameParticipant">
    <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>
</renameParticipant>

API Information:
The contributed class must extend org.eclipse.ltk.core.refactoring.participants.RenameParticipant


Copyright (c) 2001, 2013 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