ErrorDialog.openError(shell, WizardMessages.NewTestClassWizPage_cannot_add_title, WizardMessages.NewTestClassWizPage_cannot_add_message, ((CoreException)t).getStatus());
ErrorDialog.openError(shell, JUnitMessages.JUnitAddLibraryProposal_title, JUnitMessages.JUnitAddLibraryProposal_cannotAdd, ((CoreException)t).getStatus());
	private static boolean addToClasspath(Shell shell, final IJavaProject project, IClasspathEntry entry, IRunnableContext context) throws JavaModelException {		IClasspathEntry[] oldEntries= project.getRawClasspath();		for (int i= 0; i < oldEntries.length; i++) {			if (oldEntries[i].equals(entry)) {				return true;			}		}		int nEntries= oldEntries.length;		final IClasspathEntry[] newEntries= new IClasspathEntry[nEntries + 1];		System.arraycopy(oldEntries, 0, newEntries, 0, nEntries);		newEntries[nEntries]= entry;		// fix for 64974 OCE in New JUnit Test Case wizard while workspace is locked [JUnit] 		try {			context.run(true, false, new IRunnableWithProgress() {				public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {					try {						project.setRawClasspath(newEntries, monitor);					} catch (JavaModelException e) {						throw new InvocationTargetException(e);					}				}			});			return true;		} catch (InvocationTargetException e) {			Throwable t = e.getTargetException();			if (t instanceof CoreException) {					ErrorDialog.openError(shell, WizardMessages.NewTestClassWizPage_cannot_add_title, WizardMessages.NewTestClassWizPage_cannot_add_message, ((CoreException)t).getStatus());  			}			return false;		} catch (InterruptedException e) {			return false;		}	}