Rename resource file does not change editor part title

痞子三分冷 提交于 2019-12-13 07:43:50

问题


In my plugin project, I have a project explorer view where I can rename a config file which in shown in another editor part. The file can be renamed in the explorer with the rename resource dialog but the corresponding the editor tab title does not change. The same problem is described here and also here. Is there a standard way to get the rename functionality working without the creating a custom listener?


回答1:


Editors based on AbstractTextEditor (or one of its subclasses such as TextEditor) should handle renames through the FileDocumentProvider which listens for resource changes.

Other editors need to use an IResourceChangeListener to deal with this.



来源:https://stackoverflow.com/questions/30167290/rename-resource-file-does-not-change-editor-part-title

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!