use of org.netbeans.lib.cvsclient.command.ICvsFiles in project intellij-community by JetBrains.
the class RemoveCommand method execute.
// Implemented ============================================================
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventSender, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException, AuthenticationException {
final ICvsFiles cvsFiles;
try {
cvsFiles = scanFileSystem(clientEnvironment);
} catch (IOException ex) {
throw new IOCommandException(ex);
}
final Requests requests = new Requests(CommandRequest.REMOVE, clientEnvironment);
addFileRequests(cvsFiles, requests, clientEnvironment);
requests.addLocalPathDirectoryRequest();
addArgumentRequests(requests);
final ICvsListener parser = new RemoveParser(eventSender, clientEnvironment.getCvsFileSystem());
parser.registerListeners(listenerRegistry);
try {
return requestProcessor.processRequests(requests, FileStateRequestsProgressHandler.create(progressViewer, cvsFiles));
} finally {
parser.unregisterListeners(listenerRegistry);
}
}
use of org.netbeans.lib.cvsclient.command.ICvsFiles in project intellij-community by JetBrains.
the class StatusCommand method execute.
/**
* Execute a command
* @param requestProcessor the client services object that provides any necessary
* services to this command, including the ability to actually process
* all the requests.
*/
public boolean execute(IRequestProcessor requestProcessor, IEventSender eventSender, ICvsListenerRegistry listenerRegistry, IClientEnvironment clientEnvironment, IProgressViewer progressViewer) throws CommandException, AuthenticationException {
final ICvsFiles cvsFiles;
try {
cvsFiles = scanFileSystem(clientEnvironment);
} catch (IOException ex) {
throw new IOCommandException(ex);
}
final Requests requests = new Requests(CommandRequest.STATUS, clientEnvironment);
requests.addArgumentRequest(includeTags, "-v");
addFileRequests(cvsFiles, requests, clientEnvironment);
requests.addLocalPathDirectoryRequest();
addArgumentRequests(requests);
final IRequestsProgressHandler requestsProgressHandler = new FileStateRequestsProgressHandler(new RangeProgressViewer(progressViewer, 0.0, 0.5), cvsFiles);
final ICvsListener responseProgressHandler = new FileInfoAndMessageResponseProgressHandler(new RangeProgressViewer(progressViewer, 0.5, 1.0), cvsFiles, EXAM_DIR);
final ICvsListener statusMessageParser = new StatusMessageParser(eventSender, getFileObjects(), clientEnvironment.getCvsFileSystem());
final ICvsListener listener = new DualListener(statusMessageParser, responseProgressHandler);
listener.registerListeners(listenerRegistry);
try {
return requestProcessor.processRequests(requests, requestsProgressHandler);
} finally {
listener.unregisterListeners(listenerRegistry);
}
}
use of org.netbeans.lib.cvsclient.command.ICvsFiles 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);
}
Aggregations