Package org.fusesource.ide.commons.tree

Examples of org.fusesource.ide.commons.tree.RefreshableNode


    if(element instanceof DelayProxy) return false;
    if (element instanceof Fabric) {
      return ((Fabric)element).isConnected();
    }
    if (element instanceof RefreshableNode) {
      RefreshableNode node = (RefreshableNode)element;
      if (node.isLoaded()) return node.getChildren().length>0;
    }
    return true;
  }
View Full Code Here


    return element.toString();
  }

 
    protected synchronized Object[] loadAndGetChildren(final Object parent) {
    final RefreshableNode w = (RefreshableNode)parent;
   
    if(w.isLoaded()) return w.getChildren();
       
    // Must load the model
    Job job = new Job("Loading " + parent + "...") {
      /*
       * (non-Javadoc)
       * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
       */
      @Override
      protected IStatus run(IProgressMonitor monitor) {
        try {
          monitor.beginTask("Loading children of " + w + "...", 1);
          w.getChildren();
          monitor.done();         
        } finally {
          loading.remove(w);
        }

View Full Code Here

TOP

Related Classes of org.fusesource.ide.commons.tree.RefreshableNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.