开发者

Suppress checking for changes on file system in Eclipse RCP

开发者 https://www.devze.com 2022-12-30 16:38 出处:网络
Okay, I guess this question is too difficult, but it\'s worth a try. I have an eclipse RCP application that edits HTML-files. I deal with the content of the files only in a W3C-Dom representation. Th

Okay, I guess this question is too difficult, but it's worth a try.

I have an eclipse RCP application that edits HTML-files. I deal with the content of the files only in a W3C-Dom representation. There is some stuff that I can not do with that, so I the program edits each file each time after it is saved (save, save as). Of course, t开发者_如何学运维he file is then out of synch with the file system, and the next time I touch it, eclipse complains: "The file has been changed on the file system. Do you want to replace the editor contents with these changes? (Yes/No)" I do not want to load the changes into the editor ("No")

Maybe there is a way to tell Eclipse programmatically to not check that file for changes, or to configure it to not check for changes on any file?

edit: Everything has to be done either programatically or by editing some XML files. I can not expect the user to do anything;-)


I find your question confusing.

I'm assuming you have access to the source code of the RCP application.

If you modify a file outside of Eclipse, Eclipse will respond with the message you mentioned when you want to edit the file inside of Eclipse. This is to protect you.

If you want Eclipse to stop responding with the message, you have to refresh any module you edit and save outside of Eclipse. Right click on the module name, and left click on Refresh or press F5.

Inside the RCP application, you can call the refreshLocal method of IResource in org.eclipse.core.resources to do the refresh.

0

精彩评论

暂无评论...
验证码 换一张
取 消