I have MyFileEditorProvider and MyFileEditor, and every time I open a file with the .xxx extension my editor is used.
But I want in some cases the .xxx not to be opened (e.g when I double click on it in the tree).
How can I do this?
I'd like to rephrase: when a file is opened (e.g. by double clicking it in the tree), I'd like to be able to have some custom code executed, that might decide not to open an editor. Right now:
- MyFileEditorProvider.createEditor() is invoked. This is OK, because I can have some custom code here
- but my custom code might say "I don't want to open an editor", and maybe open a message box displaying a message. This doesn't seem OK, because this method is expected to return a not null result
In an Eclipse environment, this might be achieved using a "launcher" concept.
Thank you in advance.