/**
  * Return whether or not there are less than two pages.
  *
  * @return <code>true</code> if there are less than two pages.
  */
 private boolean hasAtMostOnePage() {
   ITreeContentProvider contentProvider = new PreferenceContentProvider();
   try {
     Object[] children = contentProvider.getElements(getPreferenceManager());
     return children.length == 0
         || children.length == 1 && !contentProvider.hasChildren(children[0]);
   } finally {
     contentProvider.dispose();
   }
 }
  @Override
  public void dispose() {
    if (provider != null) provider.dispose();

    super.dispose();
  }
 public void dispose() {
   myProvider.dispose();
 }