Bug 37353 add variable button can't add variable only edit. [build path}
Project->properties->java build path->Library tab->add variable button will only allow you to extend or edit a variable not add a variable. The only way to add a classpath variable is to go Window->preferences->java->classpath variables->new button.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/NewVariableEntryDialog.java
public void doubleClicked(ListDialogField field) {
			doDoubleClick();
		}			
			
		
	
		public void dialogFieldChanged(DialogField field) {
		}
	
	}
	
	private final int IDX_EXTEND= 0;
	private final int IDX_CONFIG= 2;
	
	private ListDialogField fVariablesList;
	private boolean fCanExtend;
	private boolean fIsValidSelection;
	
	private IPath[] fResultPaths;
	
	public NewVariableEntryDialog(Shell parent) {
		super(parent);
		int shellStyle= getShellStyle();
		setShellStyle(shellStyle | SWT.MAX | SWT.RESIZE);
		updateStatus(new StatusInfo(IStatus.ERROR, "")); 
		String[] buttonLabels= new String[] { 
			 NewWizardMessages.getString("NewVariableEntryDialog.vars.extend"), 
			null,
			 NewWizardMessages.getString("NewVariableEntryDialog.vars.config"),