/*
  * (non-Javadoc) Method declared on IContentProvider.
  */
 public void inputChanged(final Viewer viewer, final Object oldInput, final Object newInput) {
   super.inputChanged(viewer, oldInput, newInput);
   fViewer = (TreeViewer) viewer;
   if (oldInput == null && newInput != null) {
     DLTKCore.addElementChangedListener(this);
   } else if (oldInput != null && newInput == null) {
     DLTKCore.removeElementChangedListener(this);
   }
   fInput = newInput;
 }
 /*
  * (non-Javadoc) Method declared on IContentProvider.
  */
 public void dispose() {
   super.dispose();
   DLTKCore.removeElementChangedListener(this);
   DLTKUIPlugin.getDefault().getPreferenceStore().removePropertyChangeListener(this);
 }