Search in sources :

Example 6 with IRequestsProgressHandler

use of org.netbeans.lib.cvsclient.progress.sending.IRequestsProgressHandler in project intellij-community by JetBrains.

the class AdminCommand method execute.

public boolean execute(IRequestProcessor requestProcessor, IEventSender eventManager, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException, AuthenticationException {
    BugLog.getInstance().assertTrue(isSetLock() || isResetLock(), "Nothing specified");
    final ICvsFiles cvsFiles;
    try {
        cvsFiles = scanFileSystem(clientEnvironment);
    } catch (IOException ex) {
        throw new IOCommandException(ex);
    }
    final Requests requests = new Requests(CommandRequest.ADMIN, clientEnvironment);
    requests.addArgumentRequest(isSetLock(), "-l");
    requests.addArgumentRequest(isResetLock(), "-u");
    addFileRequests(cvsFiles, requests, clientEnvironment);
    requests.addLocalPathDirectoryRequest();
    addArgumentRequests(requests);
    final IRequestsProgressHandler requestsProgressHandler = FileStateRequestsProgressHandler.create(progressViewer, cvsFiles);
    return requestProcessor.processRequests(requests, requestsProgressHandler);
}
Also used : ICvsFiles(org.netbeans.lib.cvsclient.command.ICvsFiles) IOException(java.io.IOException) IRequestsProgressHandler(org.netbeans.lib.cvsclient.progress.sending.IRequestsProgressHandler) Requests(org.netbeans.lib.cvsclient.request.Requests) IOCommandException(org.netbeans.lib.cvsclient.command.IOCommandException)

Aggregations

IOException (java.io.IOException)6 IRequestsProgressHandler (org.netbeans.lib.cvsclient.progress.sending.IRequestsProgressHandler)6 Requests (org.netbeans.lib.cvsclient.request.Requests)6 DualListener (org.netbeans.lib.cvsclient.event.DualListener)5 ICvsListener (org.netbeans.lib.cvsclient.event.ICvsListener)5 RangeProgressViewer (org.netbeans.lib.cvsclient.progress.RangeProgressViewer)5 FileStateRequestsProgressHandler (org.netbeans.lib.cvsclient.progress.sending.FileStateRequestsProgressHandler)5 ICvsFiles (org.netbeans.lib.cvsclient.command.ICvsFiles)4 IOCommandException (org.netbeans.lib.cvsclient.command.IOCommandException)4 FileInfoAndMessageResponseProgressHandler (org.netbeans.lib.cvsclient.progress.receiving.FileInfoAndMessageResponseProgressHandler)4 FileInfoAndDirectoryResponseProgressHandler (org.netbeans.lib.cvsclient.progress.receiving.FileInfoAndDirectoryResponseProgressHandler)1