覆盖eclipse中的重命名操作 [英] Override rename action in eclipse

查看:142
本文介绍了覆盖eclipse中的重命名操作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是eclipse插件开发的新手。我需要覆盖特定自定义项目中的文件的重命名对话框。说我在自定义项目中有一个文件sample.abcd,它具有自己的观点,性质和构建者。所以每当我尝试重命名这个文件时,我得到一个带有文件扩展名的重命名对话框。我想覆盖这个只显示文件名的对话框,就像java项目重命名操作一样。你可以指点任何资源,怎么办?谢谢

解决方案

你必须实现一个重命名重构参与者。它的启用条件指定在哪种情况下涉及(您必须检查您的特定文件扩展名)。



更长的解释也可以在<一个href =https://stackoverflow.com/questions/6618495/eclipse-rename-refactoring-override> 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中的重命名操作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆