As you know, recently, I started hacking on Eclipse. This time I needed to follow modifications made by a refactoring. Therefore, Eclipse introduced Refactoring Participants. After a while, I figured out how to participate in a Rename Refactoring (for fields and variables):

<extension
point="org.eclipse.ltk.core.refactoring.renameParticipants">
<renameParticipant id="a.b.c.MyParticipant" name="GraphSemanticsRenameParticipant">
<enablement>
    <with variable="affectedNatures">
        <iterate operator="or">
            <equals value="org.eclipse.jdt.core.javanature"></equals>
        </iterate>
    </with>
    <with variable="element">
        <or>
            <instanceof value="org.eclipse.jdt.core.IField"></instanceof>
            <instanceof value="org.eclipse.jdt.core.ILocalVariable"></instanceof>
        </or>
    </with>
</enablement>
</renameParticipant>
</extension>

I thought it would be as easy as this to hook into other refactorings but all the other Participators
(Copy, Create, Delete, Move in org.eclipse.ltk.core.refactoring.participants) never fired an event when I triggered other refactorings. After further investigations, I found a bug report telling me that there are still Refactoring Particaptors left to implement. At least I found a Participator for hooking into the Change Method Signature Refactoring:

<extension point="org.eclipse.jdt.core.manipulation.changeMethodSignatureParticipants">
<changeMethodSignatureParticipant
            id="a.b.c.MyChangeMethodSignatureParticipant"
            name="GraphSemanticsChangeMethodSignatureParticipant">
<enablement>
    <with variable="affectedNatures">
        <iterate operator="or">
            <equals value="org.eclipse.jdt.core.javanature"></equals>
        </iterate>
    </with>
    <with variable="element">
        <or>
            <instanceof value="org.eclipse.jdt.core.IMethod"></instanceof>
        </or>
    </with>
</enablement>
</changeMethodSignatureParticipant>
</extension>

Happy hacking!🙂