Bug 15755 "Browse workspace..." in "Attach source..." should default near the jar
Build: 20020508 In the "Attachments for <jar>" dialog (from Project->Properties->Java Build Path->Libraries tab->Attach Source) there is a "Browse Workspace..." button. When I click that I get an "Archive Selection" dialog. This dialog should default to the container that the jar is located in so that I don't have to hunt throughout the entire workspace for the source (which is most often very near the jar).
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/SourceAttachmentBlock.java
return new IRunnableWithProgress() {
			public void run(IProgressMonitor monitor) throws InvocationTargetException {				
				try {
					boolean isExported= fOldEntry != null ? fOldEntry.isExported() : false;
					IClasspathEntry newEntry;
					if (fIsVariableEntry) {
						newEntry= JavaCore.newVariableEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), isExported);
					} else {
						newEntry= JavaCore.newLibraryEntry(fJARPath, getSourceAttachmentPath(), getSourceAttachmentRootPath(), isExported);
					}
					IClasspathEntry[] entries= modifyClasspath(jproject, newEntry, shell);		
					if (entries != null) {
						jproject.setRawClasspath(entries, monitor);
					}
				} catch (JavaModelException e) {
					throw new InvocationTargetException(e);
				}
			}
		};
	}
	private IClasspathEntry[] modifyClasspath(IJavaProject jproject, IClasspathEntry newEntry, Shell shell) throws JavaModelException{
		IClasspathEntry[] oldClasspath= jproject.getRawClasspath();
		int nEntries= oldClasspath.length;
		ArrayList newEntries= new ArrayList(nEntries + 1);
		int entryKind= newEntry.getEntryKind();
		IPath jarPath= newEntry.getPath();
		boolean found= false;
		for (int i= 0; i < nEntries; i++) {
			IClasspathEntry curr= oldClasspath[i];
			if (curr.getEntryKind() == entryKind && curr.getPath().equals(jarPath)) {