Bug 54787 Classpath Variable preference page not updated
Our plugins have their own set of preference pages. If someone press the apply button, some settings are performed and some Java classpath variables are set/updated. If someone has opened (instanciated) the Java classpath variable preference page before, then modified our page, then pressed apply, and then reselect it, its internal model is not updated. It still contains the old classpath variables. The Platform's path variable has excactly the same problem. I have to close and reopen the preferences dialog to see the new values.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/VariableBlock.java
editEntries((CPVariableElement) selected.get(0));
				}
			}
		}			
			
		
	
		public void dialogFieldChanged(DialogField field) {
		}
	
	}
	
	private boolean containsReserved(List selected) {
		for (int i= selected.size()-1; i >= 0; i--) {
			if (((CPVariableElement)selected.get(i)).isReserved()) {
				return true;
			}
		}
		return false;
	}
	
	private static void addAll(Object[] objs, Collection dest) {
		for (int i= 0; i < objs.length; i++) {
			dest.add(objs[i]);
		}
	}
	
	private boolean canEdit(List selected, boolean containsReserved) {
		return selected.size() == 1 && !containsReserved;
	}