[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: cannot be cast to org.eclipse.ui.ide.FileStoreEditorInput

I tried opening an editor on a non-existing file. It works fine

IFileStore store = EFS.getLocalFileSystem().getStore(new Path("C:\\NoSuchFile.txt"));
IDE.openEditor(activePage, new FileStoreEditorInput(store), "org.eclipse.ui.DefaultTextEditor");


So probably the issue would be in your editor. Probably in the place where you create your model from the file (setInput?), check whether the file exists and if not, create an empty model.

- Prakash
--

http://blog.eclipse-tips.com