[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: How do I disable the File menu item - Save?

It looks like the "Save" and "Save As" operations cannot be disabled ( always enabled).
Is this correct?
If so, then I must detect in the "Save" operation that the filename is incorrect and divert it to the "Save As" operation. Correct?


Do I need to use the IReuseableEditor part for this?
Does the IReuseableEditor part fix the filename issue on the "Save As" command?
Ray



Ray Hurst wrote:
I implemented an object editor that performs the open-save-close operation on a specific file extension. However, I allow files with a different extension to be opened (Open With/Other../MyEditor) and the file contents are converted to the file format of the object file.

When I open a file with the non-default extension the file is marked dirty to force a "SaveAs" operation. However, the "Save" operation is also enabled. This should be disabled as the file is not the default file type extension. So how do I disable the "Save" operation in the File menu?

Also, when I do perform a "SaveAs" operation the filename does not change to the new filename. Do I have to do this programmatically? If so, what is the preferred method?
Ray