IClasspathEntry entry= JavaCore.getClasspathVariable(name); if (entry != null) { CPVariableElement elem= new CPVariableElement(name, entry.getPath());
IPath entryPath= JavaCore.getClasspathVariable(name); if (entryPath != null) { CPVariableElement elem= new CPVariableElement(name, entryPath);
	public VariableBlock() {			String[] buttonLabels= new String[] { 			JavaPlugin.getResourceString(ADD), JavaPlugin.getResourceString(EDIT)		};							VariablesAdapter adapter= new VariablesAdapter();				fVariablesList= new ListDialogField(adapter, buttonLabels, new CPVariableElementLabelProvider(), 0);		fVariablesList.setDialogFieldListener(adapter);		fVariablesList.setLabelText(JavaPlugin.getResourceString(VARS + ".label"));		fVariablesList.setRemoveButtonLabel(JavaPlugin.getResourceString(VARS + ".remove.button"));				String[] entries= JavaCore.getClasspathVariableNames();		ArrayList elements= new ArrayList(entries.length);		for (int i= 0; i < entries.length; i++) {			String name= entries[i];			IClasspathEntry entry= JavaCore.getClasspathVariable(name);			if (entry != null) {				CPVariableElement elem= new CPVariableElement(name, entry.getPath());				if (!ClasspathVariablesPreferencePage.JDKLIB_VARIABLE.equals(name)) {					elements.add(elem);				}			} else {				JavaPlugin.log(new Exception("classpath variable not found: " + name));			}		}		fVariablesList.addElements(elements);	}