addJUnitToBuildPath(JUnitPlugin.getActiveWorkbenchShell(), project, new BusyIndicatorRunnableContext());
IClasspathEntry entry= null; if (fIsJunit4) { entry= BuildPathSupport.getJUnit4ClasspathEntry(); } else { entry= BuildPathSupport.getJUnit3ClasspathEntry(); } if (entry != null) { addToClasspath(shell, project, entry, new BusyIndicatorRunnableContext()); }
	public void apply(IDocument document) {   		IJavaProject project= fContext.getCompilationUnit().getJavaProject();		try {			addJUnitToBuildPath(JUnitPlugin.getActiveWorkbenchShell(), project, new BusyIndicatorRunnableContext());			// force a reconcile			int offset= fContext.getSelectionOffset();			int length= fContext.getSelectionLength();			String s= document.get(offset, length);			document.replace(offset, length, s);		} catch (CoreException e) {			ErrorDialog.openError(JUnitPlugin.getActiveWorkbenchShell(), JUnitMessages.JUnitAddLibraryProposal_title, JUnitMessages.JUnitAddLibraryProposal_cannotAdd, e.getStatus());  		} catch (BadLocationException e) {			//ignore		}	}