if (oldInput == null && newInput != null) { JavaCore.addElementChangedListener(this); } else if (oldInput != null && newInput == null) { JavaCore.removeElementChangedListener(this);
if (newInput instanceof Collection) {  Collection col= (Collection)newInput; if (!col.isEmpty()) newInput= col.iterator().next(); else newInput= null;
	public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {		super.inputChanged(viewer, oldInput, newInput);		if (oldInput == null && newInput != null) {			JavaCore.addElementChangedListener(this); 		} else if (oldInput != null && newInput == null) {			JavaCore.removeElementChangedListener(this); 		}		fInput= newInput;	}