Search in sources :

Example 1 with FetchMembersOperation

use of org.tigris.subversion.subclipse.ui.operations.FetchMembersOperation in project subclipse by subclipse.

the class SVNRepositoryRootElement method fetchDeferredChildren.

public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
    // If it's not a folder, return an empty array
    if (!(o instanceof ISVNRepositoryLocation)) {
        collector.add(new Object[0], monitor);
    }
    try {
        monitor = Policy.monitorFor(monitor);
        monitor.beginTask(Policy.bind("RemoteFolderElement_fetchingRemoteMembers.message", getLabel(o)), // $NON-NLS-1$
        100);
        FetchMembersOperation operation = new FetchMembersOperation(null, ((ISVNRepositoryLocation) o).getRootFolder(), collector);
        operation.run(Policy.subMonitorFor(monitor, 100));
    } catch (InvocationTargetException e) {
        SVNUIPlugin.openError(null, null, null, e);
    } catch (InterruptedException e) {
    // Cancelled by the user;
    } finally {
        monitor.done();
    }
}
Also used : ISVNRepositoryLocation(org.tigris.subversion.subclipse.core.ISVNRepositoryLocation) FetchMembersOperation(org.tigris.subversion.subclipse.ui.operations.FetchMembersOperation) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Example 2 with FetchMembersOperation

use of org.tigris.subversion.subclipse.ui.operations.FetchMembersOperation in project subclipse by subclipse.

the class RemoteFolderElement method fetchDeferredChildren.

public void fetchDeferredChildren(Object o, IElementCollector collector, IProgressMonitor monitor) {
    // If it's not a folder, return an empty array
    if (!(o instanceof ISVNRemoteFolder)) {
        collector.add(new Object[0], monitor);
    }
    try {
        monitor = Policy.monitorFor(monitor);
        monitor.beginTask(Policy.bind("RemoteFolderElement_fetchingRemoteMembers.message", getLabel(o)), // $NON-NLS-1$
        100);
        FetchMembersOperation operation = new FetchMembersOperation(null, (ISVNRemoteFolder) o, collector);
        operation.run(Policy.subMonitorFor(monitor, 100));
    } catch (InvocationTargetException e) {
        SVNUIPlugin.openError(null, null, null, e);
    } catch (InterruptedException e) {
    // Cancelled by the user;
    } finally {
        monitor.done();
    }
}
Also used : FetchMembersOperation(org.tigris.subversion.subclipse.ui.operations.FetchMembersOperation) ISVNRemoteFolder(org.tigris.subversion.subclipse.core.ISVNRemoteFolder) InvocationTargetException(java.lang.reflect.InvocationTargetException)

Aggregations

InvocationTargetException (java.lang.reflect.InvocationTargetException)2 FetchMembersOperation (org.tigris.subversion.subclipse.ui.operations.FetchMembersOperation)2 ISVNRemoteFolder (org.tigris.subversion.subclipse.core.ISVNRemoteFolder)1 ISVNRepositoryLocation (org.tigris.subversion.subclipse.core.ISVNRepositoryLocation)1