Change Method Signature Participants

Identifier:
org.eclipse.jdt.core.manipulation.changeMethodSignatureParticipants

Since:
3.4

Description:
This extension point is used to define change method signature refactoring 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.

Configuration Markup:

<!ELEMENT extension (changeMethodSignatureParticipant*)>

<!ATTLIST extension

point CDATA #REQUIRED

id    CDATA #IMPLIED

name  CDATA #IMPLIED

>


<!ELEMENT changeMethodSignatureParticipant (enablement?)>

<!ATTLIST changeMethodSignatureParticipant

id    CDATA #REQUIRED

name  CDATA #REQUIRED

class CDATA #REQUIRED

>


Examples:
The example below defines a change method signature participant. The participant is enabled if one of the project affected by the refactoring has a Java nature and when the method to be changed is in a JUnit test.

<changeMethodSignatureParticipant
    id="org.eclipse.example.myChangeMethodSignatureParticipant"
    name="My Change Method Signature Participant" 
    class="org.eclipse.example.MyChangeMethodSignatureParticipant">
    <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>
</changeMethodSignatureParticipant>

API Information:
The contributed class must extend org.eclipse.jdt.core.refactoring.participants.ChangeMethodSignatureParticipant


Copyright (c) 2007 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