[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Forcing a file to be un-savable

How are you creating a derived IFile? If you have your own domain object, I assume you have implemented an IDocumentProvider to map your input to an editor document. I suspect if you implement IDocumentProvider#mustSaveDocument and canSaveDocument to always return false, you'll get the behaviour you're looking for (although I haven't tried this).
--


Ben wrote:
I'm creating a derived IFile and having it opened in an editor. It gets programatically modified (and marked dirty) but the contents are not needed when the editor window is closed. I would like to prevent this file from being saved, and indeed don't want to be prompted with the "should I save" question.