IClasspathEntry[] entries= modifyClasspath(fJarRoot, attachPath, attachRoot); if (entries == null) {
IClasspathEntry[] entries= jproject.getRawClasspath(); if (!modifyClasspathEntry(entries, attachPath, attachRoot)) {
	public boolean performFinish() {		if (fSourceAttachmentBlock != null) {			try {				IJavaProject jproject= fJarRoot.getJavaProject();								IPath attachPath= fSourceAttachmentBlock.getSourceAttachmentPath();				IPath attachRoot= fSourceAttachmentBlock.getSourceAttachmentRootPath();												IClasspathEntry[] entries= modifyClasspath(fJarRoot, attachPath, attachRoot);				if (entries == null) {					// root not found in classpath					if (fSourceAttachmentBlock.getSourceAttachmentPath() == null) {						return true;					} else if (!putJarOnClasspath()) {						// ignore changes and return						return true;					}					// put new on class path					entries= jproject.getRawClasspath();					int nEntries= entries.length;					IClasspathEntry[] incrEntries= new IClasspathEntry[nEntries + 1];					System.arraycopy(entries, 0, incrEntries, 0, nEntries);					incrEntries[nEntries]= JavaCore.newLibraryEntry(fJarRoot.getPath(), attachPath, attachRoot);					entries= incrEntries;				}				final IClasspathEntry[] newEntries= entries;								IRunnableWithProgress runnable= new IRunnableWithProgress() {					public void run(IProgressMonitor monitor) throws InvocationTargetException {						try {							IJavaProject jproject= fJarRoot.getJavaProject();							jproject.setRawClasspath(newEntries, monitor);						} catch (JavaModelException e) {							throw new InvocationTargetException(e);						}					}				};								new ProgressMonitorDialog(getShell()).run(true, true, runnable);			} catch (JavaModelException e) {				MessageDialog.openError(getShell(), "Error", e.getMessage());				return false;										} catch (InvocationTargetException e) {				MessageDialog.openError(getShell(), "Error", e.getMessage());				JavaPlugin.log(e);				return false;			} catch (InterruptedException e) {				return false;			}						}		return true;	}