[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

The problem is:

I created both MyEditor and MyEditorInput classes. When I create new 
MyEditor I pass instance of my MyEditorInput.But when I open file, workbench 
creates MyEditor but call init() with FileStoreEditorInput as parameter.So, 
when I call getEditorInput() I may have my MyEditoInput or 
FileStoreEditorInput. It causes the problem, because I try to cast them.I 
can check if I get MyEditoInput or FileStoreEditorInput, but it doesn't look 
nice. So, what is right way to handle this situation?

Thank you,

Andrey