public void dispose() {
   ITreeModelViewer viewer = (ITreeModelViewer) fView.getViewer();
   if (viewer != null) {
     viewer.removeViewerUpdateListener(this);
     viewer.removeModelChangedListener(this);
   }
 }
 /* (non-Javadoc)
  * @see org.eclipse.ui.IViewActionDelegate#init(org.eclipse.ui.IViewPart)
  */
 public void init(IViewPart view) {
   fView = (BreakpointsView) view;
   IInternalTreeModelViewer viewer = (IInternalTreeModelViewer) fView.getViewer();
   if (viewer != null) {
     viewer.addViewerUpdateListener(this);
     viewer.addModelChangedListener(this);
   }
 }
 private void update() {
   IInternalTreeModelViewer viewer = (IInternalTreeModelViewer) fView.getViewer();
   if (viewer != null && fAction != null) {
     fAction.setEnabled(viewer.getInput() != null && viewer.getChildCount(TreePath.EMPTY) > 0);
   }
 }
 /* (non-Javadoc)
  * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction)
  */
 public void run(IAction action) {
   fView.expandAllElementsInViewer();
 }