private IEditorPart openFileInEditorWithProblemsViewOpened(String filePath) throws Exception { InputStream inputStream = MarkersRemoverValidatorIT.class.getClassLoader().getResourceAsStream(filePath); final IFile fileWithoutContext = fuseProject .getProject() .getFile(filePath.startsWith("/") ? filePath.substring(1) : filePath); fileWithoutContext.create(inputStream, true, new NullProgressMonitor()); IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); page.closeAllPerspectives(false, false); PlatformUI.getWorkbench().showPerspective(FusePerspective.ID, page.getWorkbenchWindow()); readAndDispatch(20); this.problemView = PlatformUI.getWorkbench() .getActiveWorkbenchWindow() .getActivePage() .showView("org.eclipse.ui.views.ProblemView"); readAndDispatch(20); IEditorPart editor = IDE.openEditor(page, fileWithoutContext, true); page.activate(editor); readAndDispatch(20); return editor; }