Search in sources :

Example 11 with DirectoryObject

use of org.netbeans.lib.cvsclient.file.DirectoryObject in project intellij-community by JetBrains.

the class AddCommand method addRequestsForDirectory.

private void addRequestsForDirectory(DirectoryObject directoryObject, Requests requests, IRequestProcessor requestProcessor, IClientEnvironment clientEnvironment) {
    final DirectoryObject parentDirectoryUnderCvsControl = addDirectoryRequestsUpToLocalDirectory(directoryObject, requests, requestProcessor, clientEnvironment);
    if (parentDirectoryUnderCvsControl == null) {
        return;
    }
    final String tag = clientEnvironment.getAdminReader().getStickyTagForDirectory(parentDirectoryUnderCvsControl, clientEnvironment.getCvsFileSystem());
    requests.addStickyRequest(tag);
}
Also used : DirectoryObject(org.netbeans.lib.cvsclient.file.DirectoryObject)

Example 12 with DirectoryObject

use of org.netbeans.lib.cvsclient.file.DirectoryObject in project intellij-community by JetBrains.

the class ExportCommand method processExistingModules.

private void processExistingModules(ExpandedModules expandedModules, IClientEnvironment clientEnvironment) {
    final ICvsFileSystem cvsFileSystem = clientEnvironment.getCvsFileSystem();
    for (Iterator it = expandedModules.getModules().iterator(); it.hasNext(); ) {
        final String moduleName = (String) it.next();
        if (moduleName.equals(".")) {
            addFileObject(DirectoryObject.getRoot());
            break;
        }
        final File moduleFile = cvsFileSystem.getLocalFileSystem().getFile(moduleName);
        final AbstractFileObject abstractFileObject;
        final DirectoryObject directoryObject;
        if (moduleFile.isFile()) {
            abstractFileObject = cvsFileSystem.getLocalFileSystem().getFileObject(moduleFile);
            directoryObject = abstractFileObject.getParent();
        } else {
            directoryObject = cvsFileSystem.getLocalFileSystem().getDirectoryObject(moduleFile);
            abstractFileObject = directoryObject;
        }
        if (clientEnvironment.getAdminReader().hasCvsDirectory(directoryObject, cvsFileSystem)) {
            addFileObject(abstractFileObject);
        }
    }
}
Also used : ICvsFileSystem(org.netbeans.lib.cvsclient.file.ICvsFileSystem) Iterator(java.util.Iterator) AbstractFileObject(org.netbeans.lib.cvsclient.file.AbstractFileObject) File(java.io.File) DirectoryObject(org.netbeans.lib.cvsclient.file.DirectoryObject)

Aggregations

DirectoryObject (org.netbeans.lib.cvsclient.file.DirectoryObject)12 AbstractFileObject (org.netbeans.lib.cvsclient.file.AbstractFileObject)5 File (java.io.File)4 FileObject (org.netbeans.lib.cvsclient.file.FileObject)3 Entry (org.netbeans.lib.cvsclient.admin.Entry)2 ICvsFileSystem (org.netbeans.lib.cvsclient.file.ICvsFileSystem)2 HashMap (com.intellij.util.containers.HashMap)1 Iterator (java.util.Iterator)1 DirectoryRequest (org.netbeans.lib.cvsclient.request.DirectoryRequest)1