コード例 #1
0
 /**
  * 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();
   }
 }
コード例 #2
0
  @Override
  public void dispose() {
    if (provider != null) provider.dispose();

    super.dispose();
  }
コード例 #3
0
 public void dispose() {
   myProvider.dispose();
 }