问题描述
我是eclipse插件开发的新手。我需要覆盖特定自定义项目中的文件的重命名对话框。说我在自定义项目中有一个文件sample.abcd,它具有自己的观点,性质和构建者。所以每当我尝试重命名这个文件时,我得到一个带有文件扩展名的重命名对话框。我想覆盖这个只显示文件名的对话框,就像java项目重命名操作一样。你可以指点任何资源,怎么办?谢谢你必须实现一个。它的启用条件指定在哪种情况下涉及(您必须检查您的特定文件扩展名)。
更长的解释也可以在 Eclipse重命名/重构覆盖。
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
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.
这篇关于覆盖eclipse中的重命名操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!