String title= (existing == null) ? PreferencesMessages.getString("UserLibraryPreferencePage.browsejar.new.title") : PreferencesMessages.getString("UserLibraryPreferencePage.browseJAR.edit.title");
String title= (existing == null) ? PreferencesMessages.getString("UserLibraryPreferencePage.browsejar.new.title") : PreferencesMessages.getString("UserLibraryPreferencePage.browsejar.edit.title");
	private CPListElement[] openExtJarFileDialog(CPListElement existing, Object parent) {		String lastUsedPath;		if (existing != null) {			lastUsedPath= existing.getPath().removeLastSegments(1).toOSString();		} else {			lastUsedPath= fDialogSettings.get(IUIConstants.DIALOGSTORE_LASTEXTJAR);			if (lastUsedPath == null) {				lastUsedPath= ""; //$NON-NLS-1$			}		}		String title= (existing == null) ? PreferencesMessages.getString("UserLibraryPreferencePage.browsejar.new.title") : PreferencesMessages.getString("UserLibraryPreferencePage.browseJAR.edit.title"); //$NON-NLS-1$ //$NON-NLS-2$				FileDialog dialog= new FileDialog(getShell(), existing == null ? SWT.MULTI : SWT.SINGLE);		dialog.setText(title);		dialog.setFilterExtensions(new String[] {"*.jar;*.zip"}); //$NON-NLS-1$		dialog.setFilterPath(lastUsedPath);		if (existing != null) {			dialog.setFileName(existing.getPath().lastSegment());		}				String res= dialog.open();		if (res == null) {			return null;		}		String[] fileNames= dialog.getFileNames();		int nChosen= fileNames.length;					IPath filterPath= new Path(dialog.getFilterPath());		CPListElement[] elems= new CPListElement[nChosen];		for (int i= 0; i < nChosen; i++) {			IPath path= filterPath.append(fileNames[i]).makeAbsolute();				CPListElement curr= new CPListElement(parent, null, IClasspathEntry.CPE_LIBRARY, path, null);			curr.setAttribute(CPListElement.SOURCEATTACHMENT, BuildPathSupport.guessSourceAttachment(curr));			curr.setAttribute(CPListElement.JAVADOC, JavaUI.getLibraryJavadocLocation(curr.getPath()));			elems[i]= curr;		}		fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, filterPath.toOSString());				return elems;	}