0
votes

I am trying to override the default rename functionality of eclipse in my application. I created a class which extends RenameParticipant. Added the extension point in plugin.xml

But it doesn't work. In my application there are more than 30 projects(or plugins??)(eg: core, debug, editor, parser, ui etc). What I want to know is, where should put my rename extension. ie, in which projects' plugin.xml I need to add the extension for rename?

Please help me to figure out this. I am very new to plugin development. Thanks in advance, Ann

1

1 Answers

0
votes

You should use the extension point org.eclipse.ltk.core.refactoring.renameParticipants in the plugin.xml file of the plug-in that contains your participant class because the extension point has to refer to the participant class.

For example, see the following use of the org.eclipse.ltk.core.refactoring.renameParticipants extension point in org.eclipse.jdt.ui/plugin.xml.

<extension point="org.eclipse.ltk.core.refactoring.renameParticipants">
  <renameParticipant class="org.eclipse.jdt.internal.corext.refactoring.nls.NLSAccessorFieldRenameParticipant" id="org.eclipse.jdt.ui.NLSFieldRenameParticipant" name="%Refactoring.NLSFieldRenameParticipant">
    <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.IField"/>
      </with>
    </enablement>
  </renameParticipant>
</extension>