tags:

views:

42

answers:

1

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, the 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;-)

+1  A: 

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.

Gilbert Le Blanc
Thank you for your answer.Yes, I do have the source code, altough I do not want to mess with the code in some low level (core) plugin. refreshLocal was a good idea, but unfortunatly did not help in my case.
panschk

related questions