final IWorkbenchPage activePage= JUnitPlugin.getDefault().getActivePage();
final IWorkbenchPage activePage= JUnitPlugin.getActivePage();
	protected void openResource(final IResource resource) {		if (resource.getType() == IResource.FILE) {			final IWorkbenchPage activePage= JUnitPlugin.getDefault().getActivePage();			if (activePage != null) {				final Display display= getShell().getDisplay();				if (display != null) {					display.asyncExec(new Runnable() {						public void run() {							try {								activePage.openEditor((IFile)resource);							} catch (PartInitException e) {								JUnitPlugin.log(e);							}						}					});				}			}		}	}