Override rename action in eclipse

2019-06-25 13:56发布

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

1条回答
迷人小祖宗
2楼-- · 2019-06-25 14:14

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.

查看更多
登录 后发表回答