What I want: I want to write JUnit tests for my Eclipse editor plug-in. For this I want to set up an instance of my TextEditor extension. Then I want to set the input of this TextEditor from a String, so that the content of the String is the input of the editor instance. Then I want to run some tests and assert that the editor marks errors and so on.
Where I fail: I don't know how to set up the input of the editor from a String. The only function the editor has to do so is setInput(IEditorInput input), but I don't know how to create an ÌEditorInput with a String as it's content.
Is there any possibility to do so and, if not, any other way to set the input of the editor to a given String?
IFileEditorInputrather than just anIEditorInput. So to really test the editor properly you need to give it a workspace file.createmethod ofIFile.