drools-eclipse/org.guvnor.tools/src/org/guvnor/tools/views/model/TreeParent.java
public void fetchDeferredChildren(Object object,
                                         IElementCollector collector,
                                         IProgressMonitor monitor) {
            if (!(object instanceof TreeParent)) {
                return;
            }
            TreeParent node = (TreeParent)object;
            if (node.getNodeType() == Type.NONE) {
                List<GuvnorRepository> reps = Activator.getLocationManager().getRepositories();
                monitor.beginTask(Messages.getString("pending"), reps.size()); //$NON-NLS-1$
                for (int i = 0; i < reps.size(); i++) {
                    TreeParent p = new TreeParent(reps.get(i).getLocation(), Type.REPOSITORY);
                    p.setParent(node);
                    p.setGuvnorRepository(reps.get(i));
                    ResourceProperties props = new ResourceProperties();
                    props.setBase(""); //$NON-NLS-1$
                    p.setResourceProps(props);
                    collector.add(p, monitor);
                    monitor.worked(1);
                }
                monitor.done();
            }
            if (EnumSet.of(Type.REPOSITORY, Type.GLOBALS, Type.PACKAGES, Type.SNAPSHOTS, Type.PACKAGE,
                    Type.SNAPSHOT_PACKAGE).contains(node.getNodeType())) {
                listDirectory(node, collector, monitor);
            }
        }
public void fetchDeferredChildren(Object object,
                                         IElementCollector collector,
                                         IProgressMonitor monitor) {
            if (!(object instanceof TreeParent)) {
                return;
            }
            TreeParent node = (TreeParent)object;
            if (node.getNodeType() == Type.NONE) {
                List<GuvnorRepository> reps = Activator.getLocationManager().getRepositories();
                monitor.beginTask(Messages.getString("pending"), reps.size()); //$NON-NLS-1$
                for (int i = 0; i < reps.size(); i++) {
                    TreeParent p = new TreeParent(reps.get(i).getLocation(), Type.REPOSITORY);
                    p.setParent(node);
                    p.setGuvnorRepository(reps.get(i));
                    ResourceProperties props = new ResourceProperties();
                    props.setBase(""); //$NON-NLS-1$
                    p.setResourceProps(props);
                    collector.add(p, monitor);
                    monitor.worked(1);
                }
                monitor.done();
            }
            if (EnumSet.of(Type.REPOSITORY, Type.GLOBALS, Type.PACKAGES, Type.SNAPSHOTS, Type.PACKAGE,
                    Type.SNAPSHOT_PACKAGE).contains(node.getNodeType())) {
                listDirectory(node, collector, monitor);
            }
        }
public void fetchDeferredChildren ( Object object , IElementCollector collector , IProgressMonitor monitor ) { if ( ! ( object instanceof TreeParent ) ) { return ; } TreeParent node = ( TreeParent ) object ; if ( node . getNodeType ( ) == Type . NONE ) { List < GuvnorRepository > reps = Activator . getLocationManager ( ) . getRepositories ( ) ; monitor . beginTask ( Messages . getString ( "pending" ) , reps . size ( ) ) ; //$NON-NLS-1$ for ( int i = 0 ; i < reps . size ( ) ; i ++ ) { TreeParent p = new TreeParent ( reps . get ( i ) . getLocation ( ) , Type . REPOSITORY ) ; p . setParent ( node ) ; p . setGuvnorRepository ( reps . get ( i ) ) ; ResourceProperties props = new ResourceProperties ( ) ; props . setBase ( "" ) ; //$NON-NLS-1$ p . setResourceProps ( props ) ; collector . add ( p , monitor ) ; monitor . worked ( 1 ) ; } monitor . done ( ) ; } if ( EnumSet . of ( Type . REPOSITORY , Type . GLOBALS , Type . PACKAGES , Type . SNAPSHOTS , Type . PACKAGE , Type . SNAPSHOT_PACKAGE ) . contains ( node . getNodeType ( ) ) ) { listDirectory ( node , collector , monitor ) ; } }
/*
(non-Javadoc)
@see org.eclipse.ui.progress.IDeferredWorkbenchAdapter#fetchDeferredChildren(java.lang.Object, org.eclipse.ui.progress.IElementCollector, org.eclipse.core.runtime.IProgressMonitor)
/ * ( non - Javadoc )