assertTrue("File - "+file.getFullPath()+" not found", file);
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IEditorPart editor = IDE.openEditor(page, file);
would be better too