4

I am new to eclipse plugin development. I am in the need of overriding the rename dialog for the files in a specific custom project. Say I am having a file "sample.abcd" in the custom project that has its own perspectives, natures and builders. So whenever i try to rename this file, I am getting a rename dialog with the file extension. I want to override this dialog displaying only the file name just like a java project rename action does. Can you point me to any resource, how to do it ? Thanks Current rename action

Logan
  • 1,331
  • 3
  • 18
  • 41
  • Do you really need to change/extend the Eclipse workbench, or do you probably want to use the jdt(?)-rename feature from within a custom dialog? I guess, you may trigger the command "by hand" from your own dialog. –  Nov 01 '12 at 13:12
  • I want the users not to view the respective extension while renaming. Just to edit its name. Just like we do for java file in java project. – Logan Nov 01 '12 at 14:52

1 Answers1

6

You have to implement a rename refactoring participant. Its "enablement" condition specifies under which circumstances it shall be involved (you would have to check for your specific file extension).

A longer explanation can also be found in Eclipse rename/refactoring override.

Community
  • 1
  • 1
Bananeweizen
  • 21,797
  • 8
  • 68
  • 88