Bug 19365 ArrayIndexOutOfBounds: editing Build Path .jar
F2 - File -> New -> Project... - Plug-in Development - Plug-in Project -> Next - set name="asd", Next - Next - select Hello World wizard, Next - Finish -> creates new Project "asd" - select it in the Packages view, right-click -> Properties... - go to Java Build Path page - go to contained Libraries tab - select any of the ECLIPSE_HOME... libraries shown in the list - press Edit... - press OK in the subsequent Variable Extension dialog, get the attached exception
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/LibrariesWorkbookPage.java
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();	
			elems[i]= new CPListElement(fCurrJProject, IClasspathEntry.CPE_LIBRARY, path, null);
		}
		fDialogSettings.put(IUIConstants.DIALOGSTORE_LASTEXTJAR, filterPath.toOSString());
		
		return elems;
	}
	
	private CPListElement[] openVariableSelectionDialog(CPListElement existing) {
		String title= (existing == null) ? NewWizardMessages.getString("LibrariesWorkbookPage.VariableSelectionDialog.new.title") : NewWizardMessages.getString("LibrariesWorkbookPage.VariableSelectionDialog.edit.title"); 
		IPath existingPath= (existing == null) ? null : existing.getPath();
		
		NewVariableEntryDialog dialog= new NewVariableEntryDialog(getShell(), title, existingPath);
		if (dialog.open() == dialog.OK) {
			List existingElements= fLibrariesList.getElements();
			
			IPath[] paths= dialog.getResult();
			ArrayList result= new ArrayList();
			for (int i = 0; i < paths.length; i++) {
				CPListElement elem= new CPListElement(fCurrJProject, IClasspathEntry.CPE_VARIABLE, paths[i], null);
				IPath resolvedPath= JavaCore.getResolvedVariablePath(paths[i]);
				elem.setIsMissing((resolvedPath == null) || !resolvedPath.toFile().exists());