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
private class VariablesAdapter implements IDialogFieldListener, IListAdapter {
		
		
			
		public void customButtonPressed(ListDialogField field, int index) {
			switch (index) {
			case IDX_EXTEND: 
				extendButtonPressed();
				break;
			case IDX_CONFIG: 
				configButtonPressed();
				break;	
			}		
		}
		
		public void selectionChanged(ListDialogField field) {
			doSelectionChanged();
		}