I implemented the Sample XML editor in a simple RCP application and then implemented the openLocalFile (org.eclipse.ui.edit.text.openLocalFile) as a command in a menu (org.eclipse.ui.menus).
The openLocalFile command works and I get a fileDialog in which I'm able to open a file, but when choosing an .xml file it doesnt open in the Sample XML editor, it looks like it just uses the org.eclipse.ui.DefaultTextEditor.
When i tried to implement my own open file class with a fileDialog and force it to open with the Standard XML editors id I just get an error.
Hope that someone can help - in advance, thank you!
I was able to find the mistake myself, it seems that the Sample XML editor doesnt set itself as the default editor for the .xml extension, when setting this the problem is fixed! BUT I discovered a new problem and I think it might have something to do with my editorInput, can anyone show me some sample code for how to set this for an xml document?