コード例 #1
0
 public boolean select(final Object element, final boolean requestFocus) {
   myAbstractTreeBuilder
       .getReady(this)
       .doWhenDone(
           new Runnable() {
             public void run() {
               expandPathToElement(element)
                   .doWhenDone(
                       new AsyncResult.Handler<AbstractTreeNode>() {
                         public void run(AbstractTreeNode abstractTreeNode) {
                           myAbstractTreeBuilder.select(
                               abstractTreeNode,
                               new Runnable() {
                                 public void run() {
                                   if (requestFocus) {
                                     IdeFocusManager.getInstance(myProject)
                                         .requestFocus(myAbstractTreeBuilder.getTree(), false);
                                   }
                                 }
                               });
                         }
                       });
             }
           });
   return true;
 }
コード例 #2
0
  public void setReferenceSizeWhileInitializing(Dimension size) {
    _setRefSize(size);

    if (size != null) {
      myAbstractTreeBuilder
          .getReady(this)
          .doWhenDone(
              new Runnable() {
                public void run() {
                  _setRefSize(null);
                }
              });
    }
  }