Community
Participate
Working Groups
I have written a test for my custom editor. It looks like this: IEditorPart editor = openEditorFor(file); assertTrue(editor instanceof MyEditor); For the first time, this test has failed. I can't quite tell why, but I see that editor is an ErrorEditorPart. I see that an error is stored in the ErrorEditorPart. I would like a very easy way to access to error and include it in my test case. e.g. public void testInit() throws Exception { IEditorPart editor = openEditorFor(file); if (editor instanceof ErrorEditorPart) { fail("Error not created: " + ((ErrorEditorPart) editor).getError()); } assertTrue(editor instanceof MyEditor); Make sense?
> Make sense? Almost :) ErrorEditorPart is not API, and I doubt that we would want to make it API. I believe you want openEditor to follow the spec and throw a PartInitException. *** This bug has been marked as a duplicate of bug 90582 ***
Boris, this is from a while ago, sorry I didn't reply sooner. I'll wait for now on the other bug, that seems to be the right thing, am I correct?