Turbo removed. turbo_sync1
authorpkuzel@netbeans.org
Mon, 06 Sep 2004 16:41:47 +0000
changeset 5154fcd5e013c9ac
parent 5153 7987da5edb91
child 5155 098743430d3e
Turbo removed.
vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/RecursiveFolderCommand.java
vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/SharableFilesCommand.java
vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsVerifyAction.java
vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListCommand.java
vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListFileCommand.java
vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListRecursiveCommand.java
vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsGetWithQuestions.java
vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsVerifyAction.java
vcs.profiles.vss/src/org/netbeans/modules/vcs/profiles/vss/commands/VssVerifyAction.java
vcscore/manifest.mf
vcscore/src/org/netbeans/modules/vcscore/DefaultVcsFactory.java
vcscore/src/org/netbeans/modules/vcscore/VcsAction.java
vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java
vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java
vcscore/src/org/netbeans/modules/vcscore/VcsModule.java
vcscore/src/org/netbeans/modules/vcscore/VcsVersioningSystem.java
vcscore/src/org/netbeans/modules/vcscore/caching/StatusFormat.java
vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandSupport.java
vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandTask.java
vcscore/src/org/netbeans/modules/vcscore/commands/CommandCustomizationSupport.java
vcscore/src/org/netbeans/modules/vcscore/commands/CommandExecutorSupport.java
vcscore/src/org/netbeans/modules/vcscore/objectintegrity/VcsObjectIntegritySupport.java
vcscore/src/org/netbeans/modules/vcscore/turbo/Bundle.properties
vcscore/src/org/netbeans/modules/vcscore/turbo/FileProperties.java
vcscore/src/org/netbeans/modules/vcscore/turbo/IgnoreList.java
vcscore/src/org/netbeans/modules/vcscore/turbo/Profiles.java
vcscore/src/org/netbeans/modules/vcscore/turbo/Repository.java
vcscore/src/org/netbeans/modules/vcscore/turbo/Statuses.java
vcscore/src/org/netbeans/modules/vcscore/turbo/Turbo.java
vcscore/src/org/netbeans/modules/vcscore/turbo/TurboEvent.java
vcscore/src/org/netbeans/modules/vcscore/turbo/TurboListener.java
vcscore/src/org/netbeans/modules/vcscore/turbo/TurboUtil.java
vcscore/src/org/netbeans/modules/vcscore/turbo/package.html
vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java
vcscore/src/org/netbeans/modules/vcscore/versioning/VersioningFileSystem.java
vcscore/src/org/netbeans/modules/vcscore/versioning/impl/FolderNode.java
     1.1 --- a/vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/RecursiveFolderCommand.java	Mon Sep 06 12:19:32 2004 +0000
     1.2 +++ b/vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/RecursiveFolderCommand.java	Mon Sep 06 16:41:47 2004 +0000
     1.3 @@ -21,7 +21,6 @@
     1.4  
     1.5  import org.netbeans.modules.vcscore.VcsFileSystem;
     1.6  import org.netbeans.modules.vcscore.VcsAction;
     1.7 -import org.netbeans.modules.vcscore.turbo.*;
     1.8  import org.netbeans.modules.vcscore.cache.CacheFile;
     1.9  import org.netbeans.modules.vcscore.cache.CacheDir;
    1.10  import org.netbeans.modules.vcscore.cache.CacheHandler;
    1.11 @@ -144,8 +143,6 @@
    1.12      
    1.13      private void waitToLoad(VcsCacheDir dir) throws InterruptedException {
    1.14  
    1.15 -        assert Turbo.implemented() == false;
    1.16 -
    1.17          //System.out.println("waitToLoad("+dir+")");
    1.18          if (!dir.isIgnoreListSet() && fileSystem.getIgnoreListSupport() != null) {
    1.19              dir.setIgnoreList(VcsUtilities.createIgnoreList(dir, dir.getFSPath(), fileSystem.getIgnoreListSupport()));
    1.20 @@ -187,102 +184,9 @@
    1.21          return fileSystem.isProcessUnimportantFiles();
    1.22      }
    1.23  
    1.24 -    private void fillDirFilesWithTurbo(Table files, FileObject dir, CommandInfo info, boolean recursive) {
    1.25 -        String path = dir.getPath();
    1.26 -        if (printDebug) stdoutListener.outputData(new String[] { "Collecting files for command "+info.cmd.getName()+" in folder '"+path+"'" });
    1.27 -        FilenameFilter fsFilter = fileSystem.getFileFilter();
    1.28 -        File dirFile = FileUtil.toFile(dir);
    1.29 -        FileProperties fprops = Turbo.getMeta(dir);
    1.30 -        if (info.canRunOnFolders) {
    1.31 -            if ((info.canRunOnRoot || !(path.length() == 0 || ".".equals(path))) && info.canRunOnStatus(fprops.getStatus())) {
    1.32 -                if (printDebug) stdoutListener.outputData(new String[] { " Processing folder = "+path });
    1.33 -                files.put(path, (findFileResource) ? fileSystem.findResource(path) : null);
    1.34 -            }
    1.35 -        }
    1.36 -        if (path.length() > 0) path += "/";
    1.37 -        if (info.canRunOnFiles) {
    1.38 -            FileObject[] subFiles = dir.getChildren();
    1.39 -            for (int i = 0; i < subFiles.length; i++) {
    1.40 -                FileProperties subfprops = Turbo.getMeta(subFiles[i]);
    1.41 -                IgnoreList ilist = IgnoreList.forFolder(subFiles[i]);
    1.42 -                if (info.canRunOnStatus(subfprops.getStatus()) &&
    1.43 -                    ilist.isIgnored(subFiles[i].getNameExt()) == false &&
    1.44 -                    fsFilter.accept(dirFile, subFiles[i].getNameExt())) {
    1.45 -
    1.46 -                    String filePath = path + subFiles[i].getNameExt();
    1.47 -                    if (printDebug) stdoutListener.outputData(new String[] { " Processing file = "+filePath });
    1.48 -                    files.put(filePath, (findFileResource) ? subFiles[i] : null);
    1.49 -                }
    1.50 -            }
    1.51 -            // TODO Add local files. Local files are not part of the cache.
    1.52 -            if (info.canRunOnStatus(fileSystem.getStatusProvider().getLocalFileStatus())) {
    1.53 -                final Set cachedFilesSet = new HashSet();
    1.54 -                for (int i = 0; i < subFiles.length; i++) {
    1.55 -                    cachedFilesSet.add(subFiles[i].getName());
    1.56 -                }
    1.57 -                String[] localSubFiles = dirFile.list(new FilenameFilter() {
    1.58 -                    public boolean accept(File dir, String name) {
    1.59 -                        return !new File(dir, name).isDirectory() && !cachedFilesSet.contains(name);
    1.60 -                    }
    1.61 -                });
    1.62 -                if (localSubFiles != null) {
    1.63 -                    for (int i = 0; i < localSubFiles.length; i++) {
    1.64 -                        FileProperties localfprops = Turbo.getMeta(subFiles[i]);
    1.65 -                        IgnoreList ilist = IgnoreList.forFolder(subFiles[i]);
    1.66 -                        if (ilist.isIgnored(localSubFiles[i]) == false &&
    1.67 -                            fsFilter.accept(dirFile, localSubFiles[i]) &&
    1.68 -                            !NBATTRS.equals(localSubFiles[i]) && !NBINTDB.equals(localSubFiles[i])) {
    1.69 -
    1.70 -                            String filePath = path + localSubFiles[i];
    1.71 -                            if (!files.containsKey(filePath) && canProcessFile(filePath)) {
    1.72 -                                files.put(filePath, (findFileResource) ? fileSystem.findResource(filePath) : null);
    1.73 -                            }
    1.74 -                        }
    1.75 -                    }
    1.76 -                }
    1.77 -            }
    1.78 -        }
    1.79 -
    1.80 -        if (recursive) {
    1.81 -            FileObject[] subDirs = TurboUtil.listFolders(dir);
    1.82 -            List localDirs = null;
    1.83 -            if (info.canRunOnStatus(Statuses.getLocalStatus())) {
    1.84 -                String[] localSubFiles = dirFile.list(new FilenameFilter() {
    1.85 -                    public boolean accept(File dir, String name) {
    1.86 -                        return new File(dir, name).isDirectory();
    1.87 -                    }
    1.88 -                });
    1.89 -                if (localSubFiles != null) {
    1.90 -                    localDirs = new ArrayList(Arrays.asList(localSubFiles));
    1.91 -                }
    1.92 -            }
    1.93 -            IgnoreList ilist = IgnoreList.forFolder(dir);
    1.94 -            for (int i = 0; i < subDirs.length; i++) {
    1.95 -                if (ilist.isIgnored(subDirs[i].getNameExt()) == false &&
    1.96 -                    fsFilter.accept(dirFile, subDirs[i].getName())) {
    1.97 -
    1.98 -                    fillDirFilesWithTurbo(files, subDirs[i], info, recursive);
    1.99 -                    if (localDirs != null) localDirs.remove(subDirs[i].getName());
   1.100 -                }
   1.101 -            }
   1.102 -            if (localDirs != null) {
   1.103 -                for (Iterator it = localDirs.iterator(); it.hasNext(); ) {
   1.104 -                    String subDirName = (String) it.next();
   1.105 -                    if (ilist.isIgnored(subDirName) == false &&
   1.106 -                        fsFilter.accept(dirFile, subDirName)) {
   1.107 -
   1.108 -                        fillLocalDirFilesWithTurbo(files, dir, new File(dirFile, subDirName), info, recursive);
   1.109 -                    }
   1.110 -                }
   1.111 -            }
   1.112 -        }
   1.113 -    }
   1.114 -
   1.115      /** @deprecated use fillDirFilesWithTurbo */
   1.116      private void fillDirFiles(Table files, CacheDir dir, CommandInfo info, boolean recursive) {
   1.117  
   1.118 -        assert Turbo.implemented() == false;
   1.119 -
   1.120          String path;
   1.121          if (dir instanceof VcsCacheDir) {
   1.122              path = ((VcsCacheDir) dir).getFSPath();
   1.123 @@ -371,57 +275,6 @@
   1.124          }
   1.125      }
   1.126  
   1.127 -    private void fillLocalDirFilesWithTurbo(Table files, FileObject dir, File dirFile, CommandInfo info, boolean recursive) {
   1.128 -        String path = getFSPath(dirFile.getAbsolutePath());
   1.129 -        if (printDebug) stdoutListener.outputData(new String[] { "Collecting files for command "+info.cmd.getName()+" in folder '"+path+"'" });
   1.130 -        FilenameFilter fsFilter = fileSystem.getFileFilter();
   1.131 -        if (info.canRunOnFolders && (info.canRunOnRoot || !(path.length() == 0 || ".".equals(path)))) {
   1.132 -            if (printDebug) stdoutListener.outputData(new String[] { " Processing folder = "+path });
   1.133 -            files.put(path, (findFileResource) ? fileSystem.findResource(path) : null);
   1.134 -        }
   1.135 -        if (path.length() > 0) path += "/";
   1.136 -        IgnoreList ilist = IgnoreList.forFolder(dir);;
   1.137 -
   1.138 -        if (info.canRunOnFiles) {
   1.139 -            String[] localSubFiles = dirFile.list(new FilenameFilter() {
   1.140 -                public boolean accept(File dir, String name) {
   1.141 -                    return !new File(dir, name).isDirectory();
   1.142 -                }
   1.143 -            });
   1.144 -            if (localSubFiles != null) {
   1.145 -                for (int i = 0; i < localSubFiles.length; i++) {
   1.146 -                    if (ilist.isIgnored(localSubFiles[i]) == false &&
   1.147 -                        fsFilter.accept(dirFile, localSubFiles[i]) &&
   1.148 -                        !NBATTRS.equals(localSubFiles[i]) && !NBINTDB.equals(localSubFiles[i])) {
   1.149 -
   1.150 -                        String filePath = path + localSubFiles[i];
   1.151 -                        if (canProcessFile(filePath)) {
   1.152 -                            files.put(filePath, (findFileResource) ? fileSystem.findResource(filePath) : null);
   1.153 -                        }
   1.154 -                    }
   1.155 -                }
   1.156 -            }
   1.157 -        }
   1.158 -        if (recursive) {
   1.159 -            String[] localSubFiles = dirFile.list(new FilenameFilter() {
   1.160 -                public boolean accept(File dir, String name) {
   1.161 -                    return new File(dir, name).isDirectory();
   1.162 -                }
   1.163 -            });
   1.164 -            if (localSubFiles == null) return ;
   1.165 -            List localDirs = Arrays.asList(localSubFiles);
   1.166 -            if (localDirs != null) {
   1.167 -                for (Iterator it = localDirs.iterator(); it.hasNext(); ) {
   1.168 -                    String subDirName = (String) it.next();
   1.169 -                    if (ilist.isIgnored(subDirName) == false &&
   1.170 -                        fsFilter.accept(dirFile, subDirName)) {
   1.171 -
   1.172 -                        fillLocalDirFilesWithTurbo(files, dir, new File(dirFile, subDirName), info, recursive);
   1.173 -                    }
   1.174 -                }
   1.175 -            }
   1.176 -        }
   1.177 -    }
   1.178  
   1.179      private void fillLocalDirFiles(Table files, CacheDir dir, File dirFile, CommandInfo info, boolean recursive) {
   1.180          String path = getFSPath(dirFile.getAbsolutePath());
   1.181 @@ -473,34 +326,9 @@
   1.182          }
   1.183      }
   1.184  
   1.185 -    /** Find out if native command supports recursion otherwise emulate it by iterating. */
   1.186 -    private boolean runCommandsRecursivelyWithTurbo(FileObject dir, Collection cmdInfos) throws InterruptedException {
   1.187 -        ArrayList realRecursiveCommands = new ArrayList();
   1.188 -        ArrayList somewhatRecursiveCommands = new ArrayList();
   1.189 -        for (Iterator it = cmdInfos.iterator(); it.hasNext(); ) {
   1.190 -            CommandInfo info = (CommandInfo) it.next();
   1.191 -            if (!localOnly && info.canRunOnMultipleFiles && !info.canRunOnMultipleFilesInFolder) {
   1.192 -                realRecursiveCommands.add(info);
   1.193 -            } else {
   1.194 -                somewhatRecursiveCommands.add(info);
   1.195 -            }
   1.196 -        }
   1.197 -        //System.out.println("runCommandsRecursively("+dir.getName()+", "+cmdInfos.size()+"): realRecursiveCommands = "+realRecursiveCommands+", somewhatRecursiveCommands = "+somewhatRecursiveCommands);
   1.198 -        boolean status = true;
   1.199 -        if (realRecursiveCommands.size() > 0) {
   1.200 -            status = runCommandsReallyRecursivelyWithTurbo(dir, realRecursiveCommands);
   1.201 -        }
   1.202 -        if (somewhatRecursiveCommands.size() > 0) {
   1.203 -            status &= runCommandsSomewhatRecursivelyWithTurbo(dir, somewhatRecursiveCommands);
   1.204 -        }
   1.205 -        return status;
   1.206 -    }
   1.207 -
   1.208      /** @deprecated use FileObject */
   1.209      private boolean runCommandsRecursively(VcsCacheDir dir, Collection cmdInfos) throws InterruptedException {
   1.210  
   1.211 -        assert Turbo.implemented() == false;
   1.212 -
   1.213          ArrayList realRecursiveCommands = new ArrayList();
   1.214          ArrayList somewhatRecursiveCommands = new ArrayList();
   1.215          if (printFilesToProcess) {
   1.216 @@ -525,38 +353,6 @@
   1.217          return status;
   1.218      }
   1.219  
   1.220 -    private boolean runCommandsReallyRecursivelyWithTurbo(FileObject dir, Collection cmdInfos) throws InterruptedException {
   1.221 -        //String path = dir.getAbsolutePath().substring(fileSystem.getFile("").getAbsolutePath());
   1.222 -        //while (path.startsWith("/")) path = path.substring(1);
   1.223 -        //FileObject fo = fileSystem.findResource(path);
   1.224 -        //files.put(path, fo);
   1.225 -        boolean status = true;
   1.226 -        CommandsPool cPool = fileSystem.getCommandsPool();
   1.227 -        for (Iterator it = cmdInfos.iterator(); it.hasNext(); ) {
   1.228 -            CommandInfo info = (CommandInfo) it.next();
   1.229 -            Table files = new Table();
   1.230 -            fillDirFilesWithTurbo(files, dir, info, true);
   1.231 -            VcsCommandExecutor[] executors;
   1.232 -            if (printOutput) {
   1.233 -                executors = VcsAction.doCommand(files, info.cmd, info.vars, fileSystem,
   1.234 -                    stdoutNRListener, stderrNRListener, null, null);
   1.235 -            } else {
   1.236 -                executors = VcsAction.doCommand(files, info.cmd, info.vars, fileSystem);
   1.237 -            }
   1.238 -            for (int i = 0; i < executors.length; i++) {
   1.239 -                try {
   1.240 -                    cPool.waitToFinish(executors[i]);
   1.241 -                } catch (InterruptedException iexc) {
   1.242 -                    for (int j = i; j < executors.length; j++) {
   1.243 -                        cPool.kill(executors[j]);
   1.244 -                    }
   1.245 -                    throw iexc;
   1.246 -                }
   1.247 -                status &= (executors[i].getExitStatus() == VcsCommandExecutor.SUCCEEDED);
   1.248 -            }
   1.249 -        }
   1.250 -        return status;
   1.251 -    }
   1.252  
   1.253      /** @deprecated use runCommandsReallyRecursivelyWithTurbo */
   1.254      private boolean runCommandsReallyRecursively(VcsCacheDir dir, Collection cmdInfos) throws InterruptedException {
   1.255 @@ -593,77 +389,6 @@
   1.256          return status;
   1.257      }
   1.258  
   1.259 -    private boolean runCommandsSomewhatRecursivelyWithTurbo(FileObject dir, Collection cmdInfos) throws InterruptedException {
   1.260 -        //System.out.println("runCommandsSomewhatRecursively("+dir+"), localOnly = "+localOnly);
   1.261 -        CommandsPool cPool = fileSystem.getCommandsPool();
   1.262 -        FilenameFilter fsFilter = fileSystem.getFileFilter();
   1.263 -        IgnoreList ilist = IgnoreList.forFolder(dir);
   1.264 -
   1.265 -        boolean status = true;
   1.266 -        for (Iterator it = cmdInfos.iterator(); it.hasNext(); ) {
   1.267 -            CommandInfo info = (CommandInfo) it.next();
   1.268 -            Table files = new Table();
   1.269 -            fillDirFilesWithTurbo(files, dir, info, false);
   1.270 -            VcsCommandExecutor[] executors;
   1.271 -            if (files.size() > 0) {
   1.272 -                if (printOutput) {
   1.273 -                    executors = VcsAction.doCommand(files, info.cmd, info.vars, fileSystem,
   1.274 -                        stdoutNRListener, stderrNRListener, null, null);
   1.275 -                } else {
   1.276 -                    executors = VcsAction.doCommand(files, info.cmd, info.vars, fileSystem);
   1.277 -                }
   1.278 -                //System.out.println("doCommand("+files+", "+info.cmd.getName());
   1.279 -            } else {
   1.280 -                executors = new VcsCommandExecutor[0];
   1.281 -                //System.out.println("do no Command("+files+", "+info.cmd.getName());
   1.282 -            }
   1.283 -            if (!localOnly) {
   1.284 -                FileObject[] subDirs = TurboUtil.listFolders(dir);
   1.285 -                File dirFile = FileUtil.toFile(dir);
   1.286 -                List localDirs = null;
   1.287 -                if (info.canRunOnStatus(fileSystem.getStatusProvider().getLocalFileStatus())) {
   1.288 -                    String[] localSubFiles = dirFile.list(new FilenameFilter() {
   1.289 -                        public boolean accept(File dir, String name) {
   1.290 -                            return new File(dir, name).isDirectory();
   1.291 -                        }
   1.292 -                    });
   1.293 -                    if (localSubFiles != null) {
   1.294 -                        localDirs = new ArrayList(Arrays.asList(localSubFiles));
   1.295 -                    }
   1.296 -                }
   1.297 -                if (subDirs != null) {
   1.298 -                    for (int i = 0; i < subDirs.length; i++) {
   1.299 -                        if (ilist.isIgnored(subDirs[i].getName()) == false &&
   1.300 -                            fsFilter.accept(dirFile, subDirs[i].getName())) {
   1.301 -
   1.302 -                            status &= runCommandsSomewhatRecursivelyWithTurbo(subDirs[i], cmdInfos);
   1.303 -                            if (localDirs != null) localDirs.remove(subDirs[i].getName());
   1.304 -                        }
   1.305 -                    }
   1.306 -                }
   1.307 -                if (localDirs != null) {
   1.308 -                    for (Iterator ldit = localDirs.iterator(); ldit.hasNext(); ) {
   1.309 -                        String subDirName = (String) ldit.next();
   1.310 -                        if (ilist.isIgnored(subDirName) == false && fsFilter.accept(dirFile, subDirName)) {
   1.311 -                            status &= runCommandsSomewhatRecursivelyWithTurbo(dir.getFileObject(subDirName), cmdInfos);
   1.312 -                        }
   1.313 -                    }
   1.314 -                }
   1.315 -            }
   1.316 -            for (int i = 0; i < executors.length; i++) {
   1.317 -                try {
   1.318 -                    cPool.waitToFinish(executors[i]);
   1.319 -                } catch (InterruptedException iexc) {
   1.320 -                    for (int j = i; j < executors.length; j++) {
   1.321 -                        fileSystem.getCommandsPool().kill(executors[j]);
   1.322 -                    }
   1.323 -                    throw iexc;
   1.324 -                }
   1.325 -                status &= (executors[i].getExitStatus() == VcsCommandExecutor.SUCCEEDED);
   1.326 -            }
   1.327 -        }
   1.328 -        return status;
   1.329 -    }
   1.330  
   1.331      private boolean runCommandsSomewhatRecursively(VcsCacheDir dir, Collection cmdInfos) throws InterruptedException {
   1.332          return runCommandsSomewhatRecursively(dir, null, cmdInfos);
   1.333 @@ -671,8 +396,6 @@
   1.334      
   1.335      private boolean runCommandsSomewhatRecursively(VcsCacheDir dir, File dirFile, Collection cmdInfos) throws InterruptedException {
   1.336  
   1.337 -        assert Turbo.implemented() == false;
   1.338 -
   1.339          //System.out.println("runCommandsSomewhatRecursively("+dir+"), localOnly = "+localOnly);
   1.340          if (dirFile == null) waitToLoad(dir, false);
   1.341          CommandsPool cPool = fileSystem.getCommandsPool();
   1.342 @@ -806,12 +529,6 @@
   1.343      }
   1.344      
   1.345      private boolean runCommandsRecursively(String path, Collection cmdInfos) throws InterruptedException {
   1.346 -        if (Turbo.implemented()) {
   1.347 -            FileObject fo = fileSystem.findResource(path);
   1.348 -            FileProperties attrs = Turbo.getMeta(fo);
   1.349 -            return runCommandsRecursivelyWithTurbo(fo, cmdInfos);
   1.350 -        }  // else old approach
   1.351 -
   1.352          //System.out.println("runCommandsRecursively("+path+", "+cmdInfos.size());
   1.353          cache = CacheHandler.getInstance().getCache(fileSystem.getCacheIdStr());
   1.354          if (cache != null) {
     2.1 --- a/vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/SharableFilesCommand.java	Mon Sep 06 12:19:32 2004 +0000
     2.2 +++ b/vcs.advanced/src/org/netbeans/modules/vcs/profiles/commands/SharableFilesCommand.java	Mon Sep 06 16:41:47 2004 +0000
     2.3 @@ -27,9 +27,6 @@
     2.4  import org.netbeans.api.vcs.commands.CommandTask;
     2.5  
     2.6  import org.netbeans.modules.vcscore.VcsFileSystem;
     2.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
     2.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
     2.9 -import org.netbeans.modules.vcscore.turbo.IgnoreList;
    2.10  import org.netbeans.modules.vcscore.cache.CacheHandler;
    2.11  import org.netbeans.modules.vcscore.cache.FileSystemCache;
    2.12  import org.netbeans.modules.vcscore.caching.VcsCacheDir;
    2.13 @@ -148,9 +145,7 @@
    2.14              ArrayList fos = new ArrayList();
    2.15              //FileCacheProvider cacheProvider = fileSystem.getCacheProvider();
    2.16              FileSystemCache cache = null;
    2.17 -            if (Turbo.implemented() == false) {
    2.18 -                cache = CacheHandler.getInstance().getCache(fileSystem.getCacheIdStr());
    2.19 -            }
    2.20 +            cache = CacheHandler.getInstance().getCache(fileSystem.getCacheIdStr());
    2.21              Object locker = new Object();
    2.22              /*
    2.23              if (cache != null) {
    2.24 @@ -164,13 +159,6 @@
    2.25                  String name = VcsUtilities.getFileNamePart(path);
    2.26                  if (fileSystem != null) {
    2.27  
    2.28 -                    if (Turbo.implemented()) {
    2.29 -                        String folderPath = VcsUtilities.getDirNamePart(path);
    2.30 -                        FileObject folder = fileSystem.findResource(folderPath);
    2.31 -                        IgnoreList ilist = IgnoreList.forFolder(folder);
    2.32 -                        if (ilist.isIgnored(name)) continue;
    2.33 -                    } else {
    2.34 -
    2.35                      String folder = VcsUtilities.getDirNamePart(path);
    2.36                      cache.getCacheFile(new File(fileSystem.getFile(folder), "testing"), CacheHandler.STRAT_DISK_OR_REFRESH, locker);
    2.37                      VcsCacheDir dir = (VcsCacheDir) cache.getCacheFile(fileSystem.getFile(folder), CacheHandler.STRAT_DISK, locker);
    2.38 @@ -179,7 +167,6 @@
    2.39                      }
    2.40                      //Filter out files, that are ignored!!
    2.41                      if (dir.isIgnored(name)) continue;
    2.42 -                    } // Turbo.enabled()
    2.43                  }
    2.44                  if ((fileSystem != null && fileSystem.getFile(path).isFile()) ||
    2.45                      (fileSystem == null && new File(path).isFile())) {
    2.46 @@ -208,18 +195,6 @@
    2.47          File[] children = directory.listFiles();
    2.48          if (children == null) return true;
    2.49  
    2.50 -        if (Turbo.implemented()) {
    2.51 -            FileObject folder = FileUtil.toFileObject(directory);
    2.52 -            IgnoreList ilist = IgnoreList.forFolder(folder);
    2.53 -            for (int i = 0; i < children.length; i++) {
    2.54 -                if (ilist.isIgnored(children[i].getName()) == false) {
    2.55 -                    return false;
    2.56 -                }
    2.57 -            }
    2.58 -            return true;
    2.59 -        }
    2.60 -
    2.61 -        // original implementation
    2.62          FileSystemCache cache = CacheHandler.getInstance().getCache(fileSystem.getCacheIdStr());
    2.63          Object locker = new Object();
    2.64          cache.getCacheFile(new File(directory, "testing"), CacheHandler.STRAT_DISK_OR_REFRESH, locker);
     3.1 --- a/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsVerifyAction.java	Mon Sep 06 12:19:32 2004 +0000
     3.2 +++ b/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/commands/CvsVerifyAction.java	Mon Sep 06 16:41:47 2004 +0000
     3.3 @@ -37,9 +37,6 @@
     3.4  
     3.5  import org.netbeans.modules.vcscore.VcsFileSystem;
     3.6  import org.netbeans.modules.vcscore.VcsAction;
     3.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
     3.8 -import org.netbeans.modules.vcscore.turbo.Statuses;
     3.9 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    3.10  import org.netbeans.modules.vcscore.actions.AddCommandAction;
    3.11  import org.netbeans.modules.vcscore.actions.CommandActionSupporter;
    3.12  import org.netbeans.modules.vcscore.actions.GeneralCommandAction;
    3.13 @@ -94,31 +91,6 @@
    3.14      }
    3.15  
    3.16      private void fillFilesByState(List fos) {
    3.17 -        if (Turbo.implemented()) {
    3.18 -            HashSet toUpdate = new HashSet(Arrays.asList(TO_UPDATE));
    3.19 -            for (Iterator it = fos.iterator(); it.hasNext(); ) {
    3.20 -                FileObject fo = (FileObject) it.next();
    3.21 -                String localStatus = Statuses.getLocalStatus();
    3.22 -                FileProperties fprops = Turbo.getMeta(fo);
    3.23 -                String status = FileProperties.getStatus(fprops);
    3.24 -                //System.out.println("fillFilesByState: file = '"+file+"', status = "+status);
    3.25 -                if (localStatus.equals(status)) {
    3.26 -                    localFiles.add(fo);
    3.27 -                    //System.out.println("  is Local");
    3.28 -                } else if (toUpdate.contains(status)) {
    3.29 -                    outOfDateFiles.add(fo);
    3.30 -                    //System.out.println("  is Out Of Date");
    3.31 -                } else if (UP_TO_DATE.equals(status)) {
    3.32 -                    uptoDateFiles.add(fo);
    3.33 -                    //System.out.println("  is Up to date");
    3.34 -                } else {
    3.35 -                    //System.out.println("  is Unrecognized => should me modified or so.");
    3.36 -                }
    3.37 -            }
    3.38 -            return;
    3.39 -        }
    3.40 -
    3.41 -        // original code
    3.42          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
    3.43          if (statusProvider == null) {
    3.44              localFiles.addAll(fos);
     4.1 --- a/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListCommand.java	Mon Sep 06 12:19:32 2004 +0000
     4.2 +++ b/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListCommand.java	Mon Sep 06 16:41:47 2004 +0000
     4.3 @@ -20,8 +20,8 @@
     4.4  
     4.5  import org.netbeans.modules.vcscore.Variables;
     4.6  import org.netbeans.modules.vcscore.VcsFileSystem;
     4.7 -import org.netbeans.modules.vcscore.turbo.Statuses;
     4.8  import org.netbeans.modules.vcscore.caching.VcsCacheFile;
     4.9 +import org.netbeans.modules.vcscore.caching.CacheStatuses;
    4.10  import org.netbeans.modules.vcscore.util.*;
    4.11  import org.netbeans.modules.vcscore.commands.CommandOutputListener;
    4.12  import org.netbeans.modules.vcscore.commands.CommandDataOutputListener;
    4.13 @@ -213,7 +213,7 @@
    4.14              if (statuses == null) {
    4.15                  statuses = new String[7];
    4.16                  statuses[0] = fileName;
    4.17 -                statuses[1] = Statuses.STATUS_DEAD;
    4.18 +                statuses[1] = CacheStatuses.STATUS_DEAD;
    4.19                  filesByName.put(fileName, statuses);
    4.20              }
    4.21              pos = eolIndex;
     5.1 --- a/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListFileCommand.java	Mon Sep 06 12:19:32 2004 +0000
     5.2 +++ b/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListFileCommand.java	Mon Sep 06 16:41:47 2004 +0000
     5.3 @@ -20,8 +20,8 @@
     5.4  
     5.5  import org.netbeans.modules.vcscore.Variables;
     5.6  import org.netbeans.modules.vcscore.VcsFileSystem;
     5.7 -import org.netbeans.modules.vcscore.turbo.Statuses;
     5.8  import org.netbeans.modules.vcscore.caching.VcsCacheFile;
     5.9 +import org.netbeans.modules.vcscore.caching.CacheStatuses;
    5.10  import org.netbeans.modules.vcscore.cmdline.VcsAdditionalCommand;
    5.11  import org.netbeans.modules.vcscore.util.*;
    5.12  import org.netbeans.modules.vcscore.commands.CommandOutputListener;
    5.13 @@ -247,7 +247,7 @@
    5.14              if (statuses == null) {
    5.15                  statuses = new String[7];
    5.16                  statuses[0] = fileName;
    5.17 -                statuses[1] = Statuses.STATUS_DEAD;
    5.18 +                statuses[1] = CacheStatuses.STATUS_DEAD;
    5.19                  filesByName.put(fileName, statuses);
    5.20              }
    5.21              pos = eolIndex;
     6.1 --- a/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListRecursiveCommand.java	Mon Sep 06 12:19:32 2004 +0000
     6.2 +++ b/vcs.profiles.cvsprofiles/src/org/netbeans/modules/vcs/profiles/cvsprofiles/list/CvsListRecursiveCommand.java	Mon Sep 06 16:41:47 2004 +0000
     6.3 @@ -23,8 +23,8 @@
     6.4  import org.netbeans.modules.vcscore.VcsFileSystem;
     6.5  import org.netbeans.modules.vcscore.Variables;
     6.6  import org.netbeans.modules.vcscore.VcsDirContainer;
     6.7 -import org.netbeans.modules.vcscore.turbo.Statuses;
     6.8  import org.netbeans.modules.vcscore.caching.VcsCacheFile;
     6.9 +import org.netbeans.modules.vcscore.caching.CacheStatuses;
    6.10  import org.netbeans.modules.vcscore.commands.*;
    6.11  import org.netbeans.modules.vcscore.cmdline.VcsListRecursiveCommand;
    6.12  import org.netbeans.modules.vcscore.cmdline.UserCommand;
    6.13 @@ -512,7 +512,7 @@
    6.14              if (fileStatuses == null) {
    6.15                  fileStatuses = new String[7];
    6.16                  fileStatuses[0] = fileName;
    6.17 -                fileStatuses[1] = Statuses.STATUS_DEAD;
    6.18 +                fileStatuses[1] = CacheStatuses.STATUS_DEAD;
    6.19                  filesByName.put(fileName, fileStatuses);
    6.20              }
    6.21              pos = eolIndex;
     7.1 --- a/vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsGetWithQuestions.java	Mon Sep 06 12:19:32 2004 +0000
     7.2 +++ b/vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsGetWithQuestions.java	Mon Sep 06 16:41:47 2004 +0000
     7.3 @@ -20,8 +20,6 @@
     7.4  
     7.5  import org.netbeans.modules.vcscore.VcsFileSystem;
     7.6  import org.netbeans.modules.vcscore.Variables;
     7.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
     7.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
     7.9  import org.netbeans.modules.vcscore.commands.*;
    7.10  import org.netbeans.modules.vcscore.cmdline.VcsAdditionalCommand;
    7.11  import org.netbeans.modules.vcscore.caching.FileStatusProvider;
    7.12 @@ -107,22 +105,6 @@
    7.13              String file = (String) vars.get("FILE");
    7.14              String path = (String) vars.get("PATH");
    7.15  
    7.16 -            if (Turbo.implemented()) {
    7.17 -                FileProperties fprops = Turbo.getMeta(FileUtil.toFileObject(new File(path)));
    7.18 -                String locker = fprops != null ? fprops.getLocker() : null;
    7.19 -                if (locker != null && locker.length() > 0) {
    7.20 -                    Object confirmation = DialogDisplayer.getDefault().notify(
    7.21 -                        new NotifyDescriptor.Confirmation(org.openide.util.NbBundle.getMessage(
    7.22 -                            PvcsGetWithQuestions.class, "Get_Lock_Confirmation", file, locker),
    7.23 -                            NotifyDescriptor.Confirmation.YES_NO_OPTION));
    7.24 -                    if (!NotifyDescriptor.YES_OPTION.equals(confirmation)) {
    7.25 -                        return false;
    7.26 -                    }
    7.27 -                }
    7.28 -                return true;
    7.29 -            }
    7.30 -
    7.31 -            // the original implementation
    7.32              FileStatusProvider statusProvider = fileSystem.getStatusProvider();
    7.33              if (statusProvider != null) {
    7.34                  String locker = statusProvider.getFileLocker(path);
     8.1 --- a/vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsVerifyAction.java	Mon Sep 06 12:19:32 2004 +0000
     8.2 +++ b/vcs.profiles.pvcs/src/org/netbeans/modules/vcs/profiles/pvcs/commands/PvcsVerifyAction.java	Mon Sep 06 16:41:47 2004 +0000
     8.3 @@ -37,9 +37,6 @@
     8.4  
     8.5  import org.netbeans.modules.vcscore.VcsFileSystem;
     8.6  import org.netbeans.modules.vcscore.VcsAction;
     8.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
     8.8 -import org.netbeans.modules.vcscore.turbo.Statuses;
     8.9 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    8.10  import org.netbeans.modules.vcscore.actions.AddCommandAction;
    8.11  import org.netbeans.modules.vcscore.actions.CommandActionSupporter;
    8.12  import org.netbeans.modules.vcscore.actions.GeneralCommandAction;
    8.13 @@ -106,40 +103,6 @@
    8.14      
    8.15      private void fillFilesByState(List fos, String getStatusCmd) throws InterruptedException {
    8.16  
    8.17 -        if (Turbo.implemented()) {
    8.18 -            for (Iterator it = fos.iterator(); it.hasNext(); ) {
    8.19 -                FileObject fo = (FileObject) it.next();
    8.20 -                if (!fileSystem.getFile(fo.getPath()).exists()) {
    8.21 -                    // File does not exist locally - same behavior as whan it was not changed locally:
    8.22 -                    uptoDateFiles.add(fo);
    8.23 -                    continue;
    8.24 -                }
    8.25 -                FileProperties fprops = Turbo.getMeta(fo);
    8.26 -                String status = FileProperties.getStatus(fprops);
    8.27 -                if (Statuses.getLocalStatus().equals(status)) {
    8.28 -                    localFiles.add(fo);
    8.29 -                    //System.out.println("  is Local");
    8.30 -                } else {
    8.31 -                    if (getStatusCmd != null) {
    8.32 -                        status = getFreshFileStatus(fo.getPath(), fileSystem.getCommand(getStatusCmd));
    8.33 -                        //System.out.println("getFreshFileStatus("+file+") = "+status);
    8.34 -                    }
    8.35 -                    if (UP_TO_DATE.equals(status)) {
    8.36 -                        uptoDateFiles.add(fo);
    8.37 -                        //System.out.println("  is Up to date");
    8.38 -                    } else {
    8.39 -                        //System.out.println("  is Unrecognized => should me modified or so.");
    8.40 -                        String locker = fprops != null ? fprops.getLocker() : null;
    8.41 -                        if (locker == null || locker.trim().length() == 0) {
    8.42 -                            notLockedFiles.add(fo);
    8.43 -                        }
    8.44 -                    }
    8.45 -                }
    8.46 -            }
    8.47 -            return;
    8.48 -        }
    8.49 -
    8.50 -        // the old implementation
    8.51          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
    8.52          if (statusProvider == null) {
    8.53              localFiles.addAll(fos);
     9.1 --- a/vcs.profiles.vss/src/org/netbeans/modules/vcs/profiles/vss/commands/VssVerifyAction.java	Mon Sep 06 12:19:32 2004 +0000
     9.2 +++ b/vcs.profiles.vss/src/org/netbeans/modules/vcs/profiles/vss/commands/VssVerifyAction.java	Mon Sep 06 16:41:47 2004 +0000
     9.3 @@ -38,9 +38,6 @@
     9.4  
     9.5  import org.netbeans.modules.vcscore.VcsFileSystem;
     9.6  import org.netbeans.modules.vcscore.VcsAction;
     9.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
     9.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
     9.9 -import org.netbeans.modules.vcscore.turbo.Statuses;
    9.10  import org.netbeans.modules.vcscore.actions.AddCommandAction;
    9.11  import org.netbeans.modules.vcscore.actions.CommandActionSupporter;
    9.12  import org.netbeans.modules.vcscore.actions.GeneralCommandAction;
    9.13 @@ -84,31 +81,6 @@
    9.14      
    9.15      private void fillFilesByState(List fos) {
    9.16  
    9.17 -        if (Turbo.implemented()) {
    9.18 -            for (Iterator it = fos.iterator(); it.hasNext(); ) {
    9.19 -                FileObject fo = (FileObject) it.next();
    9.20 -                FileProperties fprops = Turbo.getMeta(fo);
    9.21 -                String status = FileProperties.getStatus(fprops);
    9.22 -                //System.out.println("fillFilesByState: file = '"+file+"', status = "+status);
    9.23 -                if (Statuses.getLocalStatus().equals(status)) {
    9.24 -                    localFiles.add(fo);
    9.25 -                    //System.out.println("  is Local");
    9.26 -                } else if (UP_TO_DATE.equals(status)) {
    9.27 -                    uptoDateFiles.add(fo);
    9.28 -                    //System.out.println("  is Up to date");
    9.29 -                } else {
    9.30 -                    //System.out.println("  is Unrecognized => should me modified or so.");
    9.31 -                    String locker = fprops != null ? fprops.getLocker() : null;
    9.32 -                    if (locker == null || locker.trim().length() == 0) {
    9.33 -                        notLockedFiles.add(fo);
    9.34 -                    }
    9.35 -                }
    9.36 -            }
    9.37 -
    9.38 -            return;
    9.39 -        }
    9.40 -
    9.41 -        // the original implementation
    9.42          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
    9.43          if (statusProvider == null) {
    9.44              localFiles.addAll(fos);
    10.1 --- a/vcscore/manifest.mf	Mon Sep 06 12:19:32 2004 +0000
    10.2 +++ b/vcscore/manifest.mf	Mon Sep 06 16:41:47 2004 +0000
    10.3 @@ -5,4 +5,3 @@
    10.4  OpenIDE-Module-Implementation-Version: promotionD
    10.5  OpenIDE-Module-Layer: org/netbeans/modules/vcscore/resources/mf-layer.xml
    10.6  OpenIDE-Module-Requires: org.openide.windows.IOProvider
    10.7 -OpenIDE-Module-Install: org/netbeans/modules/vcscore/VcsModule.class
    11.1 --- a/vcscore/src/org/netbeans/modules/vcscore/DefaultVcsFactory.java	Mon Sep 06 12:19:32 2004 +0000
    11.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/DefaultVcsFactory.java	Mon Sep 06 16:41:47 2004 +0000
    11.3 @@ -50,7 +50,6 @@
    11.4  import org.netbeans.modules.vcscore.commands.VcsCommandIO;
    11.5  import org.netbeans.modules.vcscore.commands.VcsCommandExecutor;
    11.6  import org.netbeans.modules.vcscore.commands.VcsDescribedCommand;
    11.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    11.8  
    11.9  /**
   11.10   * This class provides a default implementation of VcsFactory.
   11.11 @@ -74,7 +73,6 @@
   11.12       * is the filesystem cache if implements <code>FileStatusProvider</code> or null otherwise.
   11.13       */
   11.14      public FileStatusProvider getFileStatusProvider() {
   11.15 -        assert Turbo.implemented() == false;
   11.16          VcsFileSystem fileSystem = (VcsFileSystem) this.fileSystem.get();
   11.17          Object cache = fileSystem.getCacheProvider();
   11.18          if (cache instanceof FileStatusProvider) return (FileStatusProvider) cache;
   11.19 @@ -86,7 +84,6 @@
   11.20       * is <code>VcsFSCache</code>.
   11.21       */
   11.22      public FileCacheProvider getFileCacheProvider() {
   11.23 -        assert Turbo.implemented() == false;
   11.24          VcsFileSystem fileSystem = (VcsFileSystem) this.fileSystem.get();
   11.25          return new VcsFSCache(fileSystem);
   11.26      }
    12.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsAction.java	Mon Sep 06 12:19:32 2004 +0000
    12.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsAction.java	Mon Sep 06 16:41:47 2004 +0000
    12.3 @@ -42,9 +42,6 @@
    12.4  import org.netbeans.modules.vcscore.cmdline.WrappingCommandTask;
    12.5  import org.netbeans.modules.vcscore.commands.*;
    12.6  import org.netbeans.modules.vcscore.versioning.VersioningFileSystem;
    12.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    12.8 -import org.netbeans.modules.vcscore.turbo.TurboUtil;
    12.9 -import org.netbeans.modules.vcscore.turbo.FileProperties;
   12.10  import org.openide.ErrorManager;
   12.11  import org.openide.filesystems.FileSystem;
   12.12  import org.openide.filesystems.FileUtil;
   12.13 @@ -194,14 +191,6 @@
   12.14       */
   12.15      private static void doList(VcsFileSystem fileSystem, String path) {
   12.16  
   12.17 -        if (Turbo.implemented()) {
   12.18 -            FileObject fo = fileSystem.findResource(path);
   12.19 -            Turbo.getRepositoryMeta(fo);
   12.20 -            TurboUtil.refreshFolder(fo);
   12.21 -            return;
   12.22 -        }
   12.23 -
   12.24 -        // the old implementation
   12.25          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
   12.26          FileCacheProvider cache = fileSystem.getCacheProvider();
   12.27          if (statusProvider == null) return;
   12.28 @@ -1479,26 +1468,6 @@
   12.29          return values.toArray();
   12.30      }
   12.31  
   12.32 -     /** Remove the files for which the command is disabled */
   12.33 -     private static Table removeDisabledWithTurbo(Table files, VcsCommand cmd) {
   12.34 -         String disabledStatus = (String) cmd.getProperty(VcsCommand.PROPERTY_DISABLED_ON_STATUS);
   12.35 -         if (disabledStatus == null) return files;
   12.36 -         Table remaining = new Table();
   12.37 -         for (Enumeration enum = files.keys(); enum.hasMoreElements(); ) {
   12.38 -             String name = (String) enum.nextElement();
   12.39 -             FileObject fo = FileUtil.toFileObject(new File(name));
   12.40 -             FileProperties fprops = Turbo.getMeta(fo);
   12.41 -             String status = FileProperties.getStatus(fprops);
   12.42 -             boolean disabled = VcsUtilities.isSetContainedInQuotedStrings(
   12.43 -                 disabledStatus, Collections.singleton(status));
   12.44 -             if (!disabled) {
   12.45 -                 remaining.put(name, files.get(name));
   12.46 -             }
   12.47 -         }
   12.48 -         return remaining;
   12.49 -     }
   12.50 -
   12.51 -
   12.52      /** Remove the files for which the command is disabled */
   12.53      private static Table removeDisabled(FileStatusProvider statusProvider, Table files, VcsCommand cmd) {
   12.54          if (statusProvider == null) return files;
   12.55 @@ -1546,11 +1515,7 @@
   12.56          Table files = new Table();
   12.57          //boolean refreshDone = false;
   12.58          addImportantFiles(fileObjects, files, processAll, fileSystem, true);
   12.59 -        if (Turbo.implemented()) {
   12.60 -            files = removeDisabledWithTurbo(files, cmd);
   12.61 -        } else {
   12.62 -            files = removeDisabled(fileSystem.getStatusProvider(), files, cmd);
   12.63 -        }
   12.64 +        files = removeDisabled(fileSystem.getStatusProvider(), files, cmd);
   12.65          if (VcsCommand.NAME_REFRESH.equals(cmd.getName()) ||
   12.66              (VcsCommand.NAME_REFRESH + VcsCommand.NAME_SUFFIX_OFFLINE).equals(cmd.getName())) {
   12.67              ArrayList paths = new ArrayList();
    13.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java	Mon Sep 06 12:19:32 2004 +0000
    13.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsAttributes.java	Mon Sep 06 16:41:47 2004 +0000
    13.3 @@ -45,10 +45,6 @@
    13.4  import org.netbeans.modules.vcscore.search.VcsSearchTypeFileSystem;
    13.5  import org.netbeans.modules.vcscore.util.Table;
    13.6  import org.netbeans.modules.vcscore.util.virtuals.VirtualsDataLoader;
    13.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    13.8 -import org.netbeans.modules.vcscore.turbo.FileReference;
    13.9 -import org.netbeans.modules.vcscore.turbo.FileProperties;
   13.10 -import org.netbeans.modules.vcscore.turbo.Statuses;
   13.11  
   13.12  /**
   13.13   * Implementation of file attributes for version control systems. All attributes
   13.14 @@ -243,19 +239,6 @@
   13.15          if (VCS_STATUS.equals(attrName)) {
   13.16              if (!fileSystem.getFile(name).exists()) return VCS_STATUS_MISSING;
   13.17  
   13.18 -            if (Turbo.implemented()) {
   13.19 -                FileObject fo = fileSystem.findResource(name);
   13.20 -                FileProperties fprops = Turbo.getMeta(fo);
   13.21 -                String status = FileProperties.getStatus(fprops);
   13.22 -                if (Statuses.getLocalStatus().equals(status)) {
   13.23 -                    return VCS_STATUS_LOCAL;
   13.24 -                } else if (Statuses.getUnknownStatus().equals(status)) {
   13.25 -                    return VCS_STATUS_UNKNOWN;
   13.26 -                }
   13.27 -                return VCS_STATUS_UP_TO_DATE;                                
   13.28 -            }
   13.29 -
   13.30 -            // original implementation
   13.31              FileStatusProvider statusProvider = fileSystem.getStatusProvider();
   13.32              if (statusProvider != null) {
   13.33                  String status = statusProvider.getFileStatus(name);
   13.34 @@ -278,26 +261,6 @@
   13.35              return fileSystem;
   13.36          }  else {
   13.37  
   13.38 -            if (Turbo.implemented()) {
   13.39 -                if ("NetBeansAttrAssignedLoader".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER */  //NOI18N
   13.40 -                    FileReference ref = fileSystem.getFileReference(name);
   13.41 -                    if ( (ref != null) && ref.isVirtual()) {
   13.42 -                            return VirtualsDataLoader.class.getName();
   13.43 -                    }
   13.44 -                } else if ("NetBeansAttrAssignedLoaderModule".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER_MODULE */  //NOI18N
   13.45 -                    FileReference ref = fileSystem.getFileReference(name);
   13.46 -                    if (ref != null) {
   13.47 -                        if (ref.isVirtual()) {
   13.48 -                            //                        System.out.println("is vitrual module..");
   13.49 -                            return "org.netbeans.modules.vcscore"; //NOI18N
   13.50 -                        }
   13.51 -                    }
   13.52 -                }
   13.53 -
   13.54 -                return super.readAttribute(name, attrName);
   13.55 -            }
   13.56 -
   13.57 -            // the old implementation
   13.58              if ("NetBeansAttrAssignedLoader".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER */  //NOI18N
   13.59                  CacheReference ref = fileSystem.getCacheReference(name);
   13.60                  if ( (ref != null) && ref.isVirtual()) {
   13.61 @@ -364,35 +327,6 @@
   13.62              super.writeAttribute(name, VCS_SCHEDULED_FILE_ATTR, value);
   13.63          } else {
   13.64  
   13.65 -            if (Turbo.implemented()) {
   13.66 -                if ("NetBeansAttrAssignedLoader".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER */  //NOI18N
   13.67 -                    if (value == null) {
   13.68 -                        FileReference ref = fileSystem.getFileReference(name);
   13.69 -                        if (ref != null) {
   13.70 -                            ref.setVirtual(false);
   13.71 -                        }
   13.72 -                    }
   13.73 -                    else if (VirtualsDataLoader.class.getName().equals(value)) {
   13.74 -                        FileReference ref = fileSystem.getFileReference(name);
   13.75 -                        if (ref != null) {
   13.76 -                            ref.setVirtual(true);
   13.77 -                        }
   13.78 -                        return;
   13.79 -                    }
   13.80 -                }
   13.81 -                if ("NetBeansAttrAssignedLoaderModule".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER_MODULE */  //NOI18N
   13.82 -                    if (value != null && "org.netbeans.modules.vcscore".equals(value.toString())  //NOI18N
   13.83 -                        && fileSystem.checkVirtual(name)) {
   13.84 -                       //don't write to .nbattrs file..
   13.85 -                       return;
   13.86 -                    }
   13.87 -                    //System.out.println("write assigned module=" + value);
   13.88 -                }
   13.89 -                super.writeAttribute(name, attrName, value);
   13.90 -
   13.91 -            }
   13.92 -
   13.93 -            // the old implementation
   13.94              if ("NetBeansAttrAssignedLoader".equals(attrName)) { /* DataObject.EA_ASSIGNED_LOADER */  //NOI18N
   13.95                  if (value == null) {
   13.96                      CacheReference ref = fileSystem.getCacheReference(name);
   13.97 @@ -502,11 +436,6 @@
   13.98              public void run() {
   13.99              boolean rec = Boolean.TRUE.equals(recursive);
  13.100  
  13.101 -                if (Turbo.implemented()) {
  13.102 -                    assert false : "Not implemented refresh for: " + name;  // TODO waht coming in name?
  13.103 -                    return;
  13.104 -                }
  13.105 -
  13.106              FileCacheProvider cache = fileSystem.getCacheProvider();
  13.107              if (cache != null) {
  13.108                  if (rec) {
    14.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Mon Sep 06 12:19:32 2004 +0000
    14.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Mon Sep 06 16:41:47 2004 +0000
    14.3 @@ -92,7 +92,6 @@
    14.4  import org.netbeans.modules.vcscore.versioning.RevisionListener;
    14.5  import org.netbeans.modules.vcscore.versioning.VersioningFileSystem;
    14.6  import org.netbeans.modules.vcscore.versioning.VersioningRepository;
    14.7 -import org.netbeans.modules.vcscore.turbo.*;
    14.8  
    14.9  /** Generic VCS filesystem.
   14.10   *
   14.11 @@ -105,8 +104,7 @@
   14.12                                                                            AbstractFileSystem.Change, FileSystem.Status,
   14.13                                                                            CommandExecutionContext, CacheHandlerListener,
   14.14                                                                            FileObjectExistence, VcsOISActivator, Serializable,
   14.15 -                                                                          FileSystem.HtmlStatus,
   14.16 -                                                                          TurboListener {
   14.17 +                                                                          FileSystem.HtmlStatus {
   14.18  
   14.19      public static interface IgnoreListSupport {
   14.20  
   14.21 @@ -1114,32 +1112,6 @@
   14.22       */
   14.23      private void checkScheduledStates(Set fos) {
   14.24  
   14.25 -        if (Turbo.implemented()) {
   14.26 -            VcsConfigVariable schVar = (VcsConfigVariable) variablesByName.get(VAR_STATUS_SCHEDULED_ADD);
   14.27 -            String scheduledStatusAdd = (schVar != null) ? schVar.getValue() : null;
   14.28 -            schVar = (VcsConfigVariable) variablesByName.get(VAR_STATUS_SCHEDULED_REMOVE);
   14.29 -            String scheduledStatusRemove = (schVar != null) ? schVar.getValue() : null;
   14.30 -            //System.out.println("checkScheduledStates(): scheduledStatusAdd = "+scheduledStatusAdd+", scheduledStatusRemove = "+scheduledStatusRemove);
   14.31 -            for (Iterator it = fos.iterator(); it.hasNext(); ) {
   14.32 -                FileObject fo = (FileObject) it.next();
   14.33 -                //System.out.println("checkScheduledStates("+fo.getPackageNameExt('/', '.')+")");
   14.34 -                String attr = (String) fo.getAttribute(VcsAttributes.VCS_SCHEDULED_FILE_ATTR);
   14.35 -                //System.out.println("attr("+VcsAttributes.VCS_SCHEDULED_FILE_ATTR+") = "+attr);
   14.36 -                if (VcsAttributes.VCS_SCHEDULING_ADD.equals(attr) && scheduledStatusAdd != null) {
   14.37 -                    FileProperties fprops = Turbo.getMeta(fo);
   14.38 -                    String status = FileProperties.getStatus(fprops);
   14.39 -                    if (!scheduledStatusAdd.equals(status) && isSchedulingDone(fo.getPath())) {
   14.40 -                        try {
   14.41 -                            fo.setAttribute(VcsAttributes.VCS_SCHEDULED_FILE_ATTR, null);
   14.42 -                        } catch (IOException exc) {}
   14.43 -                        removeScheduledFromPrimary(fo, 1);
   14.44 -                    }
   14.45 -                }
   14.46 -            }
   14.47 -            return;
   14.48 -        }
   14.49 -
   14.50 -        // the original implementation
   14.51          FileStatusProvider status = getStatusProvider();
   14.52          if (status == null) return ;
   14.53          VcsConfigVariable schVar = (VcsConfigVariable) variablesByName.get(VAR_STATUS_SCHEDULED_ADD);
   14.54 @@ -1326,17 +1298,6 @@
   14.55      protected java.lang.ref.Reference createReference(final FileObject fo) {
   14.56          Reference result = null;
   14.57  
   14.58 -        if (Turbo.implemented()) {
   14.59 -            result = Turbo.createFileReference(fo);
   14.60 -            String fullName = fo.getPath();
   14.61 -            if (!getFile(fullName).exists()) {
   14.62 -                // When the file does not exist on disk, it must be virtual.
   14.63 -                ((FileReference)result).setVirtual (true);
   14.64 -            }
   14.65 -            return result;
   14.66 -        }
   14.67 -
   14.68 -        // the old implementation
   14.69          if (cache != null) {
   14.70              result = cache.createReference(fo);
   14.71              String fullName = fo.getPath();
   14.72 @@ -1352,23 +1313,6 @@
   14.73      }
   14.74  
   14.75      /**
   14.76 -     * Utility method that find the fileobject reference and if it exists, retypes it to FileReference.
   14.77 -     * @param name pathname of the resource.
   14.78 -     * @return  the FileReference instance if one exists or null
   14.79 -     */
   14.80 -    protected final FileReference getFileReference(String name) {
   14.81 -
   14.82 -        assert Turbo.implemented();
   14.83 -        Reference ref = findReference(name);
   14.84 -        if (ref != null && ref instanceof FileReference) {
   14.85 -            FileReference cref = (FileReference) ref;
   14.86 -            return cref;
   14.87 -        }
   14.88 -        return null;
   14.89 -    }
   14.90 -
   14.91 -
   14.92 -    /**
   14.93       * Utility method that find the fileobject reference and if it exists, retypes it to CacheReference.
   14.94       * @param name pathname of the resource.
   14.95       * @return  the cacheReference instance if one exists or null
   14.96 @@ -1376,7 +1320,6 @@
   14.97       */
   14.98      protected final CacheReference getCacheReference(String name) {
   14.99  
  14.100 -        assert Turbo.implemented() == false;
  14.101         Reference ref = findReference(name);
  14.102         if (ref != null && ref instanceof CacheReference) {
  14.103            CacheReference cref = (CacheReference) ref;
  14.104 @@ -1390,7 +1333,6 @@
  14.105       * @deprecated by both Turbo and CacheHandler
  14.106       */
  14.107      public FileCacheProvider getCacheProvider() {
  14.108 -        assert Turbo.implemented() == false;
  14.109          return cache;
  14.110      }
  14.111  
  14.112 @@ -1399,13 +1341,11 @@
  14.113       * @deprecated by both Turbo and CacheHandler
  14.114       */
  14.115      public FileStatusProvider getStatusProvider() {
  14.116 -        assert Turbo.implemented() == false;
  14.117          return statusProvider;
  14.118      }
  14.119  
  14.120      //-------------------------------------------
  14.121      public void setCache(FileCacheProvider cache) {
  14.122 -        assert Turbo.implemented() == false;
  14.123          this.cache = cache;
  14.124      }
  14.125  
  14.126 @@ -1485,10 +1425,8 @@
  14.127          displayName = computeDisplayName();
  14.128          localFilenameFilter = new LocalFilenameFilter();
  14.129          if (tempFiles == null) tempFiles = new Vector();
  14.130 -        if (Turbo.implemented() == false) {
  14.131 -            cache = getVcsFactory().getFileCacheProvider();
  14.132 -            statusProvider = getVcsFactory().getFileStatusProvider();
  14.133 -        }
  14.134 +        cache = getVcsFactory().getFileCacheProvider();
  14.135 +        statusProvider = getVcsFactory().getFileStatusProvider();
  14.136          if (commandsProvider == null) {
  14.137              commandsProvider = new DefaultVcsCommandsProvider(new CommandsTree(null));
  14.138          }
  14.139 @@ -1503,17 +1441,6 @@
  14.140           */
  14.141          if (possibleFileStatusInfos == null) {
  14.142  
  14.143 -            if (Turbo.implemented()) {
  14.144 -                Set fss = getPossibleFileStatusInfos();
  14.145 -                if (fss == null || fss.size() == 0) {
  14.146 -                    fss = CacheFileStatusInfo.createDefaultPossibleFileStatusInfos();
  14.147 -                }
  14.148 -                Set statusInfos = Collections.unmodifiableSet(fss);
  14.149 -                setPossibleFileStatusInfos(statusInfos, Collections.EMPTY_MAP);
  14.150 -                origPossibleFileStatusInfos = statusInfos;
  14.151 -            } else
  14.152 -
  14.153 -            // original implementation
  14.154              if (statusProvider != null) {
  14.155                  Set statusInfos = Collections.unmodifiableSet(statusProvider.getPossibleFileStatusInfos());
  14.156                  setPossibleFileStatusInfos(statusInfos, Collections.EMPTY_MAP);
  14.157 @@ -1568,16 +1495,6 @@
  14.158          deleteFileCommandQueue = new ArrayList();
  14.159          deleteFolderCommandQueue = new ArrayList();
  14.160  
  14.161 -        if (Turbo.implemented()) {
  14.162 -            // listen on turbo changes and redistribute as file status changes
  14.163 -            Turbo.singleton().addTurboListener((TurboListener) WeakListeners.create(TurboListener.class, this, Turbo.singleton()));
  14.164 -
  14.165 -            // TODO revisit possible side effects of old implementaion
  14.166 -            integritySupportMaintainer = new IntegritySupportMaintainer(this, this);
  14.167 -            return;
  14.168 -        }
  14.169 -
  14.170 -        // the old implementation
  14.171          FileSystemCache fsCache = CacheHandler.getInstance().getCache(getCacheIdStr());
  14.172          if (fsCache != null) {
  14.173              // Hold the IntegritySupportMaintainer so that it's not garbage-collected.
  14.174 @@ -1586,13 +1503,6 @@
  14.175      }
  14.176  
  14.177      public void activate(VcsObjectIntegritySupport objectIntegritySupport) {
  14.178 -        if (Turbo.implemented()) {
  14.179 -            // TODO revisit possible side effects of old implementaion
  14.180 -            objectIntegritySupport.activate(this, null, getFile("").getAbsolutePath(), this);
  14.181 -            return;
  14.182 -        }
  14.183 -
  14.184 -        // the old implementation
  14.185          FileSystemCache fsCache = CacheHandler.getInstance().getCache(getCacheIdStr());
  14.186          if (fsCache != null) {
  14.187              objectIntegritySupport.activate(this, fsCache, getFile("").getAbsolutePath(), this);
  14.188 @@ -2243,14 +2153,6 @@
  14.189  
  14.190      public String getStatus(FileObject fo) {
  14.191  
  14.192 -        if (Turbo.implemented()) {
  14.193 -            // TODO what is purpose of the convert bellow, how does work FileObject.equals
  14.194 -            // note that get locker code does not use it
  14.195 -            FileProperties fprops = Turbo.getMeta(fo);
  14.196 -            return FileProperties.getStatus(fprops);
  14.197 -        }
  14.198 -
  14.199 -        // original implementation
  14.200          String status;
  14.201          if (statusProvider != null) {
  14.202              fo = convertForeignFileObjectToMyFileObject(fo);
  14.203 @@ -2271,7 +2173,7 @@
  14.204          Object[] oo = files.toArray();
  14.205          int len = oo.length;
  14.206          if (len == 0) return new String[0];
  14.207 -        if (statusProvider == null && Turbo.implemented() == false) {
  14.208 +        if (statusProvider == null) {
  14.209              return new String[0];
  14.210          } else {            
  14.211              for (int i = 0; i < len; i++) {
  14.212 @@ -2296,20 +2198,6 @@
  14.213       * retrieved from the VCS */
  14.214      private String getRealStatus(String fullName) {
  14.215  
  14.216 -        if (Turbo.implemented()) {
  14.217 -            FileObject fo = findResource(fullName);
  14.218 -            FileProperties fprops = Turbo.getMeta(fo);
  14.219 -            String status = FileProperties.getStatus(fprops);
  14.220 -            synchronized (possibleFileStatusesLock) {
  14.221 -                FileStatusInfo statusInfo = (FileStatusInfo) possibleFileStatusInfoMap.get(status);
  14.222 -                if (statusInfo != null) {
  14.223 -                    return statusInfo.getDisplayName();
  14.224 -                }
  14.225 -            }
  14.226 -            return status;
  14.227 -        }
  14.228 -
  14.229 -        // original implementation
  14.230          if (cache != null) {
  14.231              //findLoadedCacheDir(fullName);
  14.232              String dirName = VcsUtilities.getDirNamePart(fullName);
  14.233 @@ -2362,8 +2250,6 @@
  14.234       * after it's parents are loaded */
  14.235      private CacheDir findLoadedCacheDir(String name) {
  14.236  
  14.237 -        assert Turbo.implemented() == false;
  14.238 -
  14.239          String dirName = VcsUtilities.getDirNamePart(name);
  14.240          String fileName = VcsUtilities.getFileNamePart(name);
  14.241          if (dirName.length() == 0 || dirName.length() == name.length()) return null;
  14.242 @@ -2439,24 +2325,6 @@
  14.243              return icon;
  14.244          }
  14.245  
  14.246 -        if (Turbo.implemented()) {
  14.247 -            assert oo.length == 1;  // not implemented for multiple files
  14.248 -            FileProperties fprops = Turbo.getMeta((FileObject)oo[0]);
  14.249 -            String status = FileProperties.getStatus(fprops);
  14.250 -            Map statusInfoMap = getPossibleFileStatusInfoMap();
  14.251 -            FileStatusInfo statusinfo = (FileStatusInfo) statusInfoMap.get(status);
  14.252 -            if (statusinfo != null) {
  14.253 -                Image img = statusinfo.getIcon();//(Image) statusIconMap.get(status);
  14.254 -                //System.out.println("annotateIcon: status = "+status+" => img = "+img);
  14.255 -                if (img == null) img = statusIconDefault;
  14.256 -                if (img != null) {
  14.257 -                    icon = org.openide.util.Utilities.mergeImages(icon, img, BADGE_ICON_SHIFT_X, BADGE_ICON_SHIFT_Y);
  14.258 -                }
  14.259 -            }
  14.260 -            return icon;
  14.261 -        }
  14.262 -
  14.263 -        // original implementation
  14.264          if (statusProvider != null) {
  14.265              ArrayList importantFiles = getImportantFiles(oo);
  14.266              len = importantFiles.size();
  14.267 @@ -2505,20 +2373,6 @@
  14.268              return result;
  14.269          }
  14.270  
  14.271 -        if (Turbo.implemented()) {
  14.272 -            ArrayList importantFiles = getImportantFiles(files.toArray());
  14.273 -            len = importantFiles.size();
  14.274 -            if (len == 1) {
  14.275 -                String fullName = (String) importantFiles.get(0);
  14.276 -                FileObject fo = findResource(fullName);
  14.277 -                result = StatusFormat.getHtmlStatusAnnotation(fo, annotationPattern);
  14.278 -            } else {
  14.279 -                assert false;  // TODO implement status annotation for multiple file requests
  14.280 -            }
  14.281 -
  14.282 -        } else {
  14.283 -
  14.284 -            // original implementation
  14.285              if (statusProvider != null) {
  14.286                  ArrayList importantFiles = getImportantFiles(files.toArray());
  14.287                  len = importantFiles.size();
  14.288 @@ -2533,7 +2387,6 @@
  14.289                      result = RefreshCommandSupport.getHtmlStatusAnnotation(name, importantFiles, annotationPattern, statusProvider, multiFilesAnnotationTypes);
  14.290                  }
  14.291              }
  14.292 -        }
  14.293          //String result = annotateName (name, files);
  14.294          String fontColor = "<font color='!controlShadow'>";
  14.295          if(javax.swing.UIManager.getDefaults().getColor("Tree.selectionBackground").equals(javax.swing.UIManager.getDefaults().getColor("controlShadow"))){
  14.296 @@ -2575,21 +2428,6 @@
  14.297              return result;
  14.298          }
  14.299  
  14.300 -        if (Turbo.implemented()) {
  14.301 -            ArrayList importantFiles = getImportantFiles(files.toArray());
  14.302 -            len = importantFiles.size();
  14.303 -            if (len == 1) {
  14.304 -                String fullName = (String) importantFiles.get(0);
  14.305 -                FileObject fo = findResource(fullName);
  14.306 -                return StatusFormat.getStatusAnnotation(fo, annotationPattern);
  14.307 -            } else {
  14.308 -                assert false; // TODO implement multiple files annotations
  14.309 -            }
  14.310 -
  14.311 -            return result;
  14.312 -        }
  14.313 -
  14.314 -        // original implementation
  14.315          if (statusProvider != null) {
  14.316              ArrayList importantFiles = getImportantFiles(files.toArray());
  14.317              len = importantFiles.size();
  14.318 @@ -2687,12 +2525,6 @@
  14.319          Hashtable vars = getVariablesAsHashtable();
  14.320          String displayNameAnnotation = (String) vars.get(VAR_FS_DISPLAY_NAME_ANNOTATION);
  14.321          if (displayNameAnnotation != null) {
  14.322 -            if (Turbo.implemented()) {
  14.323 -                displayNameAnnotation = StatusFormat.getStatusAnnotation(getRoot(), displayNameAnnotation, vars);
  14.324 -                return displayNameAnnotation;
  14.325 -            }
  14.326 -
  14.327 -            // original implementation
  14.328              if (statusProvider != null) {
  14.329                  displayNameAnnotation = RefreshCommandSupport.getStatusAnnotation("", "", displayNameAnnotation, statusProvider, vars);
  14.330              } else {
  14.331 @@ -2825,12 +2657,10 @@
  14.332              //HACK
  14.333        //      this.cache.refreshDir(this.getRelativeMountPoint());
  14.334  
  14.335 -            if (Turbo.implemented() == false) {
  14.336                  if (cache != null) {
  14.337                      cache.setFSRoot(r.getAbsolutePath());
  14.338                      cache.setRelativeMountPoint(module);
  14.339                  }
  14.340 -            }
  14.341              // When we change the root, we have to create new attributes,
  14.342              // that are with respect to the new root.
  14.343              VcsAttributes a = new VcsAttributes (rootFile, info, change, this, this, actionSupporter);
  14.344 @@ -2899,12 +2729,6 @@
  14.345          Hashtable vars = getVariablesAsHashtable();
  14.346          String systemNameAnnotation = (String) vars.get(VAR_FS_SYSTEM_NAME_ANNOTATION);
  14.347          if (systemNameAnnotation != null) {
  14.348 -            if (Turbo.implemented()) {
  14.349 -                systemNameAnnotation = StatusFormat.getStatusAnnotation(getRoot(), systemNameAnnotation, vars);
  14.350 -                return systemNameAnnotation;
  14.351 -            }
  14.352 -
  14.353 -            // original implementation
  14.354              if (statusProvider != null) {
  14.355                  systemNameAnnotation = RefreshCommandSupport.getStatusAnnotation("", "", systemNameAnnotation, statusProvider, vars);
  14.356              } else {
  14.357 @@ -3014,11 +2838,9 @@
  14.358       * deleted and reappeared.
  14.359       */
  14.360      private void checkScheduledLocals(String path, Collection locals, Map removedFilesScheduledForRemove) {
  14.361 -        if (Turbo.implemented() == false) {
  14.362 -            // old strange code
  14.363 -            FileStatusProvider status = getStatusProvider();
  14.364 -            if (status == null) return ;
  14.365 -        }
  14.366 +        // old strange code
  14.367 +        FileStatusProvider status = getStatusProvider();
  14.368 +        if (status == null) return ;
  14.369          VcsConfigVariable schVar = (VcsConfigVariable) variablesByName.get(VAR_STATUS_SCHEDULED_REMOVE);
  14.370          String scheduledStatusRemove = (schVar != null) ? schVar.getValue() : null;
  14.371          if (scheduledStatusRemove == null) return ;
  14.372 @@ -3038,8 +2860,6 @@
  14.373  
  14.374      String[] addLocalFiles(String name, String[] cachedFiles, Map removedFilesScheduledForRemove) {
  14.375  
  14.376 -        assert Turbo.implemented() == false;
  14.377 -
  14.378          String[] files = getLocalFiles(name);
  14.379          String[] mergedFiles;
  14.380          if (files == null || files.length == 0) {
  14.381 @@ -3063,8 +2883,6 @@
  14.382  
  14.383      private void markAsMissingFiles(String name, String[] local, String[] cached) {
  14.384  
  14.385 -        assert Turbo.implemented() == false;
  14.386 -
  14.387          java.util.List locals = Arrays.asList(local);
  14.388          //if (name.length() > 0) name += "/";
  14.389          ArrayList files = new ArrayList();
  14.390 @@ -3100,22 +2918,6 @@
  14.391  
  14.392      private transient boolean isRootReferenced = false;
  14.393  
  14.394 -    private String[] childrenWithTurbo(String name) {
  14.395 -        String[] files = getLocalFiles(name);
  14.396 -
  14.397 -        // TODO hide dead files, consider deferring to VisibilityQuery
  14.398 -        if (isHideShadowFiles() == false) { // show shadow files
  14.399 -            if (isShowDeadFiles() == false) {
  14.400 -                //files = filterDeadFilesOut(name,files);
  14.401 -            }
  14.402 -            if (files != null) {
  14.403 -                // files = filterScheduledSecondaryFiles(name, files);
  14.404 -            }
  14.405 -        }
  14.406 -        return files;
  14.407 -
  14.408 -    }
  14.409 -
  14.410      /* Get children files inside a folder
  14.411       * @param name the name of the folder
  14.412       */
  14.413 @@ -3129,11 +2931,6 @@
  14.414              return new String[0];
  14.415          }
  14.416  
  14.417 -        if (Turbo.implemented()) {
  14.418 -            return childrenWithTurbo(name);
  14.419 -        }
  14.420 -
  14.421 -        // the old implementation
  14.422          if (!isRootReferenced) {
  14.423              if (cache != null) {
  14.424                  cache.createReference(getRoot());
  14.425 @@ -3195,8 +2992,6 @@
  14.426  
  14.427      private String[] filterDeadFilesOut(String name, String[] vcsFiles) {
  14.428  
  14.429 -        assert Turbo.implemented() == false;
  14.430 -
  14.431          if (vcsFiles == null) return null;
  14.432          FileStatusProvider statusProvider = getStatusProvider();
  14.433          if (statusProvider == null) return vcsFiles;
  14.434 @@ -3208,7 +3003,7 @@
  14.435          for (int i = 0; i < n; i++) {
  14.436              String file = (name.length() > 0) ? (name + "/" + (String) files.get(i)) : (String) files.get(i);
  14.437              if (cacheProvider != null && !cacheProvider.isFile(file)) continue;
  14.438 -            if (Statuses.STATUS_DEAD.equals(statusProvider.getFileStatus(file))) {
  14.439 +            if (CacheStatuses.STATUS_DEAD.equals(statusProvider.getFileStatus(file))) {
  14.440                  files.remove(i--);
  14.441                  n--;
  14.442              }
  14.443 @@ -3468,14 +3263,6 @@
  14.444              throw new IOException(MessageFormat.format (g("EXC_CannotCreateF"), errorParams)); // NOI18N
  14.445          }
  14.446  
  14.447 -        if (Turbo.implemented()) {
  14.448 -            // the call does not come from repository, it's local file creation
  14.449 -            FileProperties fprops = new FileProperties(f.getName());
  14.450 -            Turbo.setMeta(f, fprops);
  14.451 -            return;
  14.452 -        }
  14.453 -
  14.454 -        // original implementation
  14.455          if (cache != null) cache.addFolder(name);
  14.456      }
  14.457  
  14.458 @@ -3513,13 +3300,6 @@
  14.459          }
  14.460           */
  14.461  
  14.462 -        if (Turbo.implemented()) {
  14.463 -            FileProperties fprops = new FileProperties(f.getName());
  14.464 -            Turbo.setMeta(f, fprops);
  14.465 -            return;
  14.466 -        }
  14.467 -
  14.468 -        // original implementation
  14.469          if (statusProvider != null) {
  14.470              statusProvider.setFileStatus(name, statusProvider.getLocalFileStatus());
  14.471          }
  14.472 @@ -3736,12 +3516,6 @@
  14.473      public java.util.Date lastModified(String name) {
  14.474          File file = getFile(name);
  14.475          if (!file.exists()) {
  14.476 -            if (Turbo.implemented()) {
  14.477 -                // XXX file does not exist what is its modification time? Who cares, return a contant.
  14.478 -                return new Date(0);
  14.479 -            }
  14.480 -
  14.481 -            // the old implementation
  14.482              if (cache != null) {
  14.483                  CacheFile cFile = cache.getDir(name);
  14.484                  if (cFile == null) cFile = cache.getFile(name);
  14.485 @@ -3772,12 +3546,6 @@
  14.486      public boolean folder (String name) {
  14.487          boolean isFolder;
  14.488  
  14.489 -        if (Turbo.implemented()) {
  14.490 -            // TODO the orig implementation guessed it for virtual files, here we guess false in such case
  14.491 -            return getFile (name).isDirectory ();
  14.492 -        }
  14.493 -
  14.494 -        // original implementation
  14.495          if (cache != null) {
  14.496              isFolder = cache.isDir(name);
  14.497              if (!isFolder && !cache.isFile(name)) {
  14.498 @@ -3840,61 +3608,6 @@
  14.499      /** Change file status and add it to a vcs group. */
  14.500      private void fileChanged(final String name) {
  14.501  
  14.502 -        if(Turbo.implemented()) {
  14.503 -            // Fire the change asynchronously to prevent deadlocks.
  14.504 -            org.openide.util.RequestProcessor.getDefault().post(new Runnable() {
  14.505 -                public void run() {
  14.506 -                    FileObject fo = findResource(name);
  14.507 -                    FileProperties fprops = Turbo.getMeta(fo);
  14.508 -                    String oldStatus = FileProperties.getStatus(fprops);
  14.509 -                    if (!notModifiableStatuses.contains(oldStatus)) {
  14.510 -                        String status = FileStatusInfo.MODIFIED.getName();
  14.511 -                        Map tranls = getGenericStatusTranslation();
  14.512 -                        if (tranls != null) {
  14.513 -                            status = (String) tranls.get(status);
  14.514 -                            if (status == null) {
  14.515 -                                // There's no mapping, use the generic status name!
  14.516 -                                status = FileStatusInfo.MODIFIED.getName();
  14.517 -                            }
  14.518 -                        }
  14.519 -                        FileProperties updated = new FileProperties();
  14.520 -                        updated.setName(fo.getNameExt());
  14.521 -                        updated.setStatus(status);
  14.522 -                        Turbo.setMeta(fo, updated);
  14.523 -                    }
  14.524 -                    VcsGroupSettings grSettings = (VcsGroupSettings) SharedClassObject.findObject(VcsGroupSettings.class, true);
  14.525 -                    if (!grSettings.isDisableGroups()) {
  14.526 -                        if (grSettings.getAutoAddition() == VcsGroupSettings.ADDITION_TO_DEFAULT
  14.527 -                        || grSettings.getAutoAddition() == VcsGroupSettings.ADDITION_ASK) {
  14.528 -
  14.529 -                            if (fo != null) {
  14.530 -                                try {
  14.531 -                                    DataObject dobj = DataObject.find(fo);
  14.532 -                                    if (VcsFileSystem.this.isImportant(name)) {
  14.533 -                                        synchronized (GROUP_LOCK) {
  14.534 -                                            DataShadow shadow = GroupUtils.findDOInGroups(dobj);
  14.535 -                                            if (shadow == null) {
  14.536 -                                                // it doesn't exist in groups, add it..
  14.537 -                                                if (grSettings.getAutoAddition() == VcsGroupSettings.ADDITION_ASK) {
  14.538 -                                                    AddToGroupDialog.openChooseDialog(dobj);
  14.539 -                                                } else {
  14.540 -                                                    GroupUtils.addToDefaultGroup(new Node[] {dobj.getNodeDelegate()});
  14.541 -                                                }
  14.542 -                                            }
  14.543 -                                        }
  14.544 -                                    }
  14.545 -                                } catch (DataObjectNotFoundException exc) {
  14.546 -                                }
  14.547 -                            }
  14.548 -                        }
  14.549 -                    }
  14.550 -                }
  14.551 -            });
  14.552 -
  14.553 -            return;
  14.554 -        }
  14.555 -
  14.556 -        // original code
  14.557          if (statusProvider != null) {
  14.558              // Fire the change asynchronously to prevent deadlocks.
  14.559              org.openide.util.RequestProcessor.getDefault().post(new Runnable() {
  14.560 @@ -4067,26 +3780,6 @@
  14.561          } else */
  14.562          if (getCommand(VcsCommand.NAME_LOCK) == null) return false; // The LOCK command is not defined
  14.563  
  14.564 -        if (Turbo.implemented()) {
  14.565 -            FileObject fo = findResource(name);
  14.566 -            FileProperties fprops = Turbo.getMeta(fo);
  14.567 -            String locker = fprops != null ? fprops.getLocker() : null;
  14.568 -            String currentLocker = null;
  14.569 -            VcsConfigVariable currentLockerVar = (VcsConfigVariable) variablesByName.get(VAR_LOCKER_USER_NAME);
  14.570 -            if (currentLockerVar != null) {
  14.571 -                currentLocker = currentLockerVar.getValue();
  14.572 -                if (currentLocker != null && currentLocker.length() > 0) {
  14.573 -                    currentLocker = Variables.expand(getVariablesAsHashtable(), currentLocker, false);
  14.574 -                }
  14.575 -            }
  14.576 -            if (lockerMatch(locker, currentLocker)) {
  14.577 -                return false;
  14.578 -            }
  14.579 -
  14.580 -            return true;
  14.581 -        }
  14.582 -
  14.583 -        // original implementation
  14.584          if (statusProvider != null) {
  14.585              String locker = statusProvider.getFileLocker(name);
  14.586              String currentLocker = null;
  14.587 @@ -4126,23 +3819,6 @@
  14.588          }
  14.589          if (isCallEditFilesOn()) {
  14.590  
  14.591 -            if (Turbo.implemented()) {
  14.592 -                if (!file.canWrite ()) {
  14.593 -                    FileObject fo = findResource(name);
  14.594 -                    FileProperties fprops = Turbo.getCachedMeta(fo);
  14.595 -                    if (fprops != null && !fprops.isLocal () && !name.endsWith (".orig")) { // NOI18N
  14.596 -                        if (isPromptForEditOn()) {
  14.597 -                            VcsConfigVariable msgVar = (VcsConfigVariable) variablesByName.get(Variables.MSG_PROMPT_FOR_AUTO_EDIT);
  14.598 -                            String message;
  14.599 -                            if (msgVar != null && msgVar.getValue().length() > 0) message = msgVar.getValue();
  14.600 -                            else message = g("MSG_EditFileCh");
  14.601 -                            throw new FileLockUserQuestionException(message, "EDIT", name, filePath, editCommandExecutors);
  14.602 -                        } else {
  14.603 -                            runFileLockCommand("EDIT", name, filePath, editCommandExecutors);
  14.604 -                        }
  14.605 -                    }
  14.606 -                }
  14.607 -            } else // the old implementation
  14.608              if (!file.canWrite ()) {
  14.609                  VcsCacheFile vcsFile = (cache != null) ? ((VcsCacheFile) cache.getFile (name)) : null;
  14.610                  if (vcsFile != null && !vcsFile.isLocal () && !name.endsWith (".orig")) { // NOI18N
  14.611 @@ -4159,25 +3835,6 @@
  14.612              }
  14.613          }
  14.614          if (isLockFilesOn()) {
  14.615 -            if (Turbo.implemented()) {
  14.616 -                FileObject fo = findResource(name);
  14.617 -                FileProperties fprops = Turbo.getCachedMeta(fo);
  14.618 -                boolean local = fprops != null ? fprops.isLocal() : false;
  14.619 -                // *.orig is a temporary file created by AbstractFileObject
  14.620 -                // on saving every file to enable undo if saving fails
  14.621 -                if (shouldLock(name) && (local==false) && !name.endsWith (".orig")) { // NOI18N
  14.622 -                    if (isPromptForLockOn ()) {
  14.623 -                        VcsConfigVariable msgVar = (VcsConfigVariable) variablesByName.get(Variables.MSG_PROMPT_FOR_AUTO_LOCK);
  14.624 -                        String message;
  14.625 -                        if (msgVar != null && msgVar.getValue().length() > 0) message = msgVar.getValue();
  14.626 -                        else message = g("MSG_LockFileCh");
  14.627 -                        throw new FileLockUserQuestionException(message, "LOCK", name, filePath, lockCommandExecutors);
  14.628 -                    } else {
  14.629 -                        runFileLockCommand("LOCK", name, filePath, lockCommandExecutors);
  14.630 -                    }
  14.631 -                }
  14.632 -            } else {
  14.633 -                // original implementation
  14.634                  VcsCacheFile vcsFile = (cache != null) ? ((VcsCacheFile) cache.getFile (name)) : null;
  14.635                  // *.orig is a temporary file created by AbstractFileObject
  14.636                  // on saving every file to enable undo if saving fails
  14.637 @@ -4192,7 +3849,6 @@
  14.638                          runFileLockCommand("LOCK", name, filePath, lockCommandExecutors);
  14.639                      }
  14.640                  }
  14.641 -            }
  14.642          }
  14.643          if (!file.canWrite () && file.exists()) {
  14.644              throw new IOException() {
  14.645 @@ -4303,27 +3959,6 @@
  14.646          //System.out.println("unlock("+name+")");
  14.647          if (!isImportant(name)) return; // ignore unlocking of unimportant files
  14.648  
  14.649 -        if (Turbo.implemented()) {
  14.650 -            if(isLockFilesOn ()) {
  14.651 -                FileObject fo = findResource(name);
  14.652 -                FileProperties fprops = Turbo.getCachedMeta(fo);
  14.653 -                if (fprops != null && !fprops.isLocal () && !name.endsWith (".orig")) { // NOI18N
  14.654 -                    CommandSupport cmd = getCommandSupport("UNLOCK");
  14.655 -                    if (cmd != null) {
  14.656 -                        Command command = cmd.createCommand();
  14.657 -                        command.setFiles(new FileObject[] { findResource(name) });
  14.658 -                        boolean customized = VcsManager.getDefault().showCustomizer(command);
  14.659 -                        if (customized) {
  14.660 -                            CommandTask exec = command.execute();
  14.661 -                        }
  14.662 -                    }
  14.663 -                }
  14.664 -            }
  14.665 -
  14.666 -            return;
  14.667 -        }
  14.668 -
  14.669 -        // the old implementation
  14.670          if(isLockFilesOn ()) {
  14.671              VcsCacheFile vcsFile = (cache != null) ? ((VcsCacheFile) cache.getFile (name)) : null;
  14.672              if (vcsFile != null && !vcsFile.isLocal () && !name.endsWith (".orig")) { // NOI18N
  14.673 @@ -4357,30 +3992,9 @@
  14.674  }
  14.675      */
  14.676  
  14.677 -    // TurboListener implementation of CacheHandlerListener ~~~~~~~~~~~~~~
  14.678 -    public void turboChanged(TurboEvent e) {
  14.679 -        FileObject fo = e.getFileObject();
  14.680 -        try {
  14.681 -
  14.682 -            // for this filesystem forward as file status changes
  14.683 -
  14.684 -            if (fo.getFileSystem() == this) {
  14.685 -                String path = fo.getPath();
  14.686 -                statusChanged(path);
  14.687 -            }
  14.688 -        } catch (FileStateInvalidException e1) {
  14.689 -            ErrorManager err = ErrorManager.getDefault();
  14.690 -            err.annotate(e1, "FileObject = " + fo);  // NOI18N
  14.691 -            err.notify(ErrorManager.INFORMATIONAL, e1);
  14.692 -        }
  14.693 -    }
  14.694 -
  14.695 -
  14.696  //-------------------- methods from CacheHandlerListener------------------------
  14.697      public void cacheAdded(CacheHandlerEvent event) {
  14.698  
  14.699 -        assert Turbo.implemented() == false;
  14.700 -
  14.701          String root = getRootDirectory().getAbsolutePath();
  14.702          String absPath = event.getCacheFile().getAbsolutePath();
  14.703          if (absPath.startsWith(root)) { // it belongs to this FS -> do something
  14.704 @@ -4401,8 +4015,6 @@
  14.705  
  14.706      public void cacheRemoved(CacheHandlerEvent event) {
  14.707  
  14.708 -        assert Turbo.implemented() == false;
  14.709 -
  14.710          String root = getRootDirectory().getAbsolutePath();
  14.711          CacheFile removedFile = event.getCacheFile();
  14.712          String absPath = removedFile.getAbsolutePath();
  14.713 @@ -4434,8 +4046,6 @@
  14.714  
  14.715      public void statusChanged(CacheHandlerEvent event) {
  14.716  
  14.717 -        assert Turbo.implemented() == false;
  14.718 -        
  14.719          //System.out.println("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^");
  14.720          //System.out.println("statusChanged called for:" + event.getCacheFile().getAbsolutePath());
  14.721          String root = getRootDirectory().getAbsolutePath();
  14.722 @@ -4647,17 +4257,6 @@
  14.723                  } catch (IOException e) {}
  14.724              }
  14.725              else {
  14.726 -                if (Turbo.implemented()) {
  14.727 -                    Reference ref = findReference (o.getPath());
  14.728 -                    if ( (ref instanceof FileReference) && ((FileReference)ref).isVirtual()) {
  14.729 -                        try {
  14.730 -                            o.setAttribute ("NetBeansAttrAssignedLoader",null);       //NoI18N
  14.731 -                        } catch (IOException e) {}
  14.732 -                    }
  14.733 -                    return;
  14.734 -                }
  14.735 -
  14.736 -                // the old implementation
  14.737                  Reference ref = findReference (o.getPath());
  14.738                  if ( (ref instanceof CacheReference) && ((CacheReference)ref).isVirtual()) {
  14.739                      try {
    15.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsModule.java	Mon Sep 06 12:19:32 2004 +0000
    15.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.3 @@ -1,34 +0,0 @@
    15.4 -/*
    15.5 - *                 Sun Public License Notice
    15.6 - *
    15.7 - * The contents of this file are subject to the Sun Public License
    15.8 - * Version 1.0 (the "License"). You may not use this file except in
    15.9 - * compliance with the License. A copy of the License is available at
   15.10 - * http://www.sun.com/
   15.11 - *
   15.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   15.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   15.14 - * Microsystems, Inc. All Rights Reserved.
   15.15 - */
   15.16 -package org.netbeans.modules.vcscore;
   15.17 -
   15.18 -import org.openide.modules.ModuleInstall;
   15.19 -import org.netbeans.modules.vcscore.turbo.Turbo;
   15.20 -
   15.21 -/**
   15.22 - * Reditributes notifications about module lifetime.
   15.23 - * Warning: it's registered using module manifest,
   15.24 - * no usages can be found.
   15.25 - *
   15.26 - * @author Petr Kuzel
   15.27 - */
   15.28 -public final class VcsModule extends ModuleInstall {
   15.29 -
   15.30 -    private static final long serialVersionUID = 0L;
   15.31 -
   15.32 -    public void close() {
   15.33 -        if (Turbo.implemented()) {
   15.34 -            Turbo.shutdown();
   15.35 -        }
   15.36 -    }
   15.37 -}
    16.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsVersioningSystem.java	Mon Sep 06 12:19:32 2004 +0000
    16.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsVersioningSystem.java	Mon Sep 06 16:41:47 2004 +0000
    16.3 @@ -44,8 +44,6 @@
    16.4  import org.netbeans.modules.vcscore.versioning.RevisionListener;
    16.5  import org.netbeans.modules.vcscore.versioning.VersioningFileSystem;
    16.6  import org.netbeans.modules.vcscore.util.VcsUtilities;
    16.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    16.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    16.9  import org.openide.ErrorManager;
   16.10  
   16.11  //import org.netbeans.modules.vcscore.versioning.impl.NumDotRevisionChildren;
   16.12 @@ -113,7 +111,6 @@
   16.13      }        
   16.14      
   16.15      public FileStatusProvider getFileStatusProvider() {
   16.16 -        assert Turbo.implemented() == false;
   16.17          return fileSystem.getStatusProvider();
   16.18      }
   16.19      
   16.20 @@ -304,20 +301,6 @@
   16.21                              //System.out.println("ADDING new revisions: "+workNew);
   16.22                              oldList.removeAll(workOld); // remove all old revisions (some VCS may perhaps allow removing revisions)
   16.23  
   16.24 -                            if (Turbo.implemented()) {
   16.25 -                                FileObject fo = findResource(name);
   16.26 -                                FileProperties fprops = Turbo.getMeta(fo);
   16.27 -                                String revision = fprops != null ? fprops.getRevision() : null;
   16.28 -                                if (revision != null) {
   16.29 -                                    for (Iterator it = oldList.iterator(); it.hasNext(); ) {
   16.30 -                                        RevisionItem item = (RevisionItem) it.next();
   16.31 -                                        item.setCurrent(revision.equals(item.getRevision()));
   16.32 -                                    }
   16.33 -                                }
   16.34 -                                return;
   16.35 -                            }
   16.36 -
   16.37 -                            // original implementation
   16.38                              FileStatusProvider status = getFileStatusProvider();
   16.39                              if (status != null) {
   16.40                                  String revision = status.getFileRevision(name);
    17.1 --- a/vcscore/src/org/netbeans/modules/vcscore/caching/StatusFormat.java	Mon Sep 06 12:19:32 2004 +0000
    17.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/caching/StatusFormat.java	Mon Sep 06 16:41:47 2004 +0000
    17.3 @@ -13,8 +13,6 @@
    17.4  package org.netbeans.modules.vcscore.caching;
    17.5  
    17.6  import org.netbeans.modules.vcscore.Variables;
    17.7 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    17.8 -import org.netbeans.modules.vcscore.turbo.Turbo;
    17.9  import org.netbeans.api.vcs.FileStatusInfo;
   17.10  import org.openide.filesystems.FileObject;
   17.11  
   17.12 @@ -202,91 +200,4 @@
   17.13          return adjusted.toString();
   17.14      }
   17.15  
   17.16 -    /**
   17.17 -     * Get the annotation line for a file.
   17.18 -     * @param fo fileobject to annotate
   17.19 -     * @param annotationPattern the pattern how the annotation should be displayed
   17.20 -     * @return the annotation pattern filled up with proper attributes
   17.21 -     */
   17.22 -    public static String getStatusAnnotation(FileObject fo, String annotationPattern) {
   17.23 -        return getStatusAnnotation(fo, annotationPattern, null);
   17.24 -    }
   17.25 -
   17.26 -    public static String getStatusAnnotation(FileObject fileObject, String pattern, Map extraVars) {
   17.27 -        Hashtable vars = new Hashtable();
   17.28 -        if (extraVars != null) vars.putAll(extraVars);
   17.29 -        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, fileObject.getNameExt());
   17.30 -        // TODO use VCS neutral status names if possible
   17.31 -//        FileStatusInfo statusInfo = statusProvider.getFileStatusInfo(fullName);
   17.32 -//        String status;
   17.33 -//        if (statusInfo != null) {
   17.34 -//            status = statusInfo.getDisplayName();
   17.35 -//        } else {
   17.36 -//            status = statusProvider.getFileStatus(fullName);
   17.37 -//        }
   17.38 -        FileProperties fprops = Turbo.getMeta(fileObject);
   17.39 -        return substitute(pattern, fprops, vars);
   17.40 -
   17.41 -    }
   17.42 -
   17.43 -    /**
   17.44 -     * Get the annotation line in a HTML format for a file.
   17.45 -     * @param fo fileobject to annotate
   17.46 -     * @param annotationPattern the pattern how the annotation should be displayed
   17.47 -     * @return the annotation pattern filled up with proper attributes
   17.48 -     */
   17.49 -    public static String getHtmlStatusAnnotation(FileObject fo, String annotationPattern) {
   17.50 -        Hashtable vars = new Hashtable();
   17.51 -        vars.put(StatusFormat.ANNOTATION_PATTERN_FILE_NAME, fo.getNameExt());
   17.52 -        if ("${fileName}".equals(annotationPattern)) { // NOI18N
   17.53 -            return Variables.expand(vars, annotationPattern, false);
   17.54 -        }
   17.55 -        //String status = statusProvider.getFileStatus(fullName);
   17.56 -        FileProperties fprops = Turbo.getMeta(fo);
   17.57 -        // TODO colorize status
   17.58 -//        FileStatusInfo statusInfo = statusProvider.getFileStatusInfo(fullName);
   17.59 -//        String status;
   17.60 -//        if (statusInfo != null) {
   17.61 -//            status = statusInfo.getDisplayName();
   17.62 -//            if (statusInfo instanceof javax.swing.colorchooser.ColorSelectionModel) {
   17.63 -//                java.awt.Color c = ((javax.swing.colorchooser.ColorSelectionModel) statusInfo).getSelectedColor();
   17.64 -//                if (c != null) {
   17.65 -//                    String r = Integer.toHexString(c.getRed());
   17.66 -//                    if (r.length() == 1) r = "0"+r;
   17.67 -//                    String g = Integer.toHexString(c.getGreen());
   17.68 -//                    if (g.length() == 1) g = "0"+g;
   17.69 -//                    String b = Integer.toHexString(c.getBlue());
   17.70 -//                    if (b.length() == 1) b = "0"+b;
   17.71 -//                    status = "<font color=#"+r+g+b+">" + status + "</font>"; //NOI18N
   17.72 -//                }
   17.73 -//            }
   17.74 -//        } else {
   17.75 -//            status = statusProvider.getFileStatus(fullName);
   17.76 -//        }
   17.77 -        return substitute(annotationPattern, fprops, vars);
   17.78 -    }
   17.79 -
   17.80 -    private static String substitute(String annotationPattern, FileProperties fprops, Map vars) {
   17.81 -        String s = FileProperties.getStatus(fprops);
   17.82 -        if (s != null) vars.put(ANNOTATION_PATTERN_STATUS, s);
   17.83 -        if (fprops != null) {
   17.84 -            s = fprops.getLocker();
   17.85 -            if (s != null) vars.put(ANNOTATION_PATTERN_LOCKER, s);
   17.86 -            s = fprops.getRevision();
   17.87 -            if (s != null) vars.put(ANNOTATION_PATTERN_REVISION, s);
   17.88 -            s = fprops.getSticky();
   17.89 -            if (s != null) vars.put(ANNOTATION_PATTERN_STICKY, s);
   17.90 -            s = fprops.getSizeAsString();
   17.91 -            if (s != null) vars.put(ANNOTATION_PATTERN_SIZE, s);
   17.92 -            s = fprops.getAttr();
   17.93 -            if (s != null) vars.put(ANNOTATION_PATTERN_ATTR, s);
   17.94 -            s = fprops.getDate();
   17.95 -            if (s != null) vars.put(ANNOTATION_PATTERN_DATE, s);
   17.96 -            s = fprops.getTime();
   17.97 -            if (s != null) vars.put(ANNOTATION_PATTERN_TIME, s);
   17.98 -        }
   17.99 -        return Variables.expand(vars, annotationPattern, false);
  17.100 -
  17.101 -    }
  17.102 -
  17.103  }
    18.1 --- a/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandSupport.java	Mon Sep 06 12:19:32 2004 +0000
    18.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandSupport.java	Mon Sep 06 16:41:47 2004 +0000
    18.3 @@ -60,9 +60,6 @@
    18.4  import org.netbeans.modules.vcscore.FileReaderListener;
    18.5  import org.netbeans.modules.vcscore.Variables;
    18.6  import org.netbeans.modules.vcscore.VcsFileSystem;
    18.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    18.8 -import org.netbeans.modules.vcscore.turbo.TurboUtil;
    18.9 -import org.netbeans.modules.vcscore.turbo.FileProperties;
   18.10  import org.netbeans.modules.vcscore.cache.CacheDir;
   18.11  import org.netbeans.modules.vcscore.cache.CacheFile;
   18.12  import org.netbeans.modules.vcscore.cache.CacheHandler;
   18.13 @@ -418,12 +415,6 @@
   18.14          cmd.setExpertMode(executionContext.isExpertMode());
   18.15          if (executionContext instanceof VcsFileSystem) {
   18.16  
   18.17 -            if (Turbo.implemented()) {
   18.18 -                vcmd.addFileReaderListener(TurboUtil.fileReaderListener((VcsFileSystem)executionContext));
   18.19 -                return;
   18.20 -            }
   18.21 -
   18.22 -            // old implementation
   18.23              FileSystemCache cache = CacheHandler.getInstance().getCache(((VcsFileSystem) executionContext).getCacheIdStr());
   18.24              if (cache instanceof FileReaderListener) {
   18.25                  vcmd.addFileReaderListener((FileReaderListener) cache);
   18.26 @@ -486,9 +477,7 @@
   18.27  
   18.28          // set cache provider if not running in turbo mode
   18.29          FileCacheProvider cacheProvider = null;
   18.30 -        if (Turbo.implemented() == false) {
   18.31 -            cacheProvider = (fileSystem != null) ? fileSystem.getCacheProvider() : null;
   18.32 -        }
   18.33 +        cacheProvider = (fileSystem != null) ? fileSystem.getCacheProvider() : null;
   18.34  
   18.35          Object obj = doCustomization(doCreateCustomizer, null, cmd, files, cacheProvider,
   18.36                                       valueAdjustment, cmdCanRunOnMultipleFiles,
   18.37 @@ -1269,14 +1258,6 @@
   18.38              if (mime != null) vars.put("MIMETYPE", mime); // NOI18N
   18.39          }
   18.40  
   18.41 -        if (Turbo.implemented()) {
   18.42 -            FileProperties fprops = Turbo.getMeta(fo);
   18.43 -            if (fprops != null) {
   18.44 -                vars.put("CACHED_ATTR", fprops.getAttr());
   18.45 -                vars.put("CACHED_SIZE", Long.toString(fprops.getSize()));
   18.46 -                vars.put("CACHED_ISLOCAL", fprops.isLocal() ? "true" : "");
   18.47 -            }
   18.48 -        } else // the old implementation
   18.49          if (cacheProvider != null) {
   18.50              if (isFileFolder) {
   18.51                  CacheDir cDir = cacheProvider.getDir(origFullName);
    19.1 --- a/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandTask.java	Mon Sep 06 12:19:32 2004 +0000
    19.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/cmdline/UserCommandTask.java	Mon Sep 06 16:41:47 2004 +0000
    19.3 @@ -43,8 +43,6 @@
    19.4  import org.netbeans.modules.vcscore.VcsFileSystem;
    19.5  import org.netbeans.modules.vcscore.DirReaderListener;
    19.6  import org.netbeans.modules.vcscore.Variables;
    19.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    19.8 -import org.netbeans.modules.vcscore.turbo.TurboUtil;
    19.9  import org.netbeans.modules.vcscore.cache.CacheHandler;
   19.10  import org.netbeans.modules.vcscore.cache.FileSystemCache;
   19.11  import org.netbeans.modules.vcscore.commands.CommandCustomizationSupport;
   19.12 @@ -266,19 +264,6 @@
   19.13      
   19.14      /** Spawn the refresh task. */
   19.15      void spawnRefresh(VcsFileSystem fileSystem) {
   19.16 -        if (Turbo.implemented()) {
   19.17 -            if (spawnRefreshFile == null) return;
   19.18 -            FileObject fo = FileUtil.toFileObject(spawnRefreshFile);
   19.19 -            if (fo == null) return; // request for non existing 'test' probe file
   19.20 -            if (spawnRefreshRecursively) {
   19.21 -                TurboUtil.refreshRecursively(fo);
   19.22 -            } else {
   19.23 -                TurboUtil.refreshFolder(fo);
   19.24 -            }
   19.25 -            return;
   19.26 -        }
   19.27 -
   19.28 -        // original implementation
   19.29          FileSystemCache cache = CacheHandler.getInstance().getCache(fileSystem.getCacheIdStr());
   19.30          Object locker = new Object();
   19.31          cache.getCacheFile(spawnRefreshFile,
    20.1 --- a/vcscore/src/org/netbeans/modules/vcscore/commands/CommandCustomizationSupport.java	Mon Sep 06 12:19:32 2004 +0000
    20.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/commands/CommandCustomizationSupport.java	Mon Sep 06 16:41:47 2004 +0000
    20.3 @@ -45,8 +45,6 @@
    20.4  import org.netbeans.modules.vcscore.RetrievingDialog;
    20.5  import org.netbeans.modules.vcscore.VcsAttributes;
    20.6  import org.netbeans.modules.vcscore.VcsConfigVariable;
    20.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    20.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    20.9  import org.netbeans.modules.vcscore.caching.FileCacheProvider;
   20.10  import org.netbeans.modules.vcscore.caching.FileStatusProvider;
   20.11  import org.netbeans.modules.vcscore.cmdline.UserCommandSupport;
   20.12 @@ -181,25 +179,6 @@
   20.13                                          Table files, VcsCommand cmd) {
   20.14  
   20.15          FileStatusProvider statusProvider = null;
   20.16 -        if (Turbo.implemented()) {
   20.17 -            String disabledStatus = (String) cmd.getProperty(VcsCommand.PROPERTY_DISABLED_ON_STATUS);
   20.18 -            if (disabledStatus != null) {
   20.19 -                Table remaining = new Table();
   20.20 -                for (Enumeration enum = files.keys(); enum.hasMoreElements(); ) {
   20.21 -                    String name = (String) enum.nextElement();
   20.22 -                    FileObject fo = fileSystem.findResource(name);
   20.23 -                    FileProperties fprops = Turbo.getMeta(fo);
   20.24 -                    String status = FileProperties.getStatus(fprops);
   20.25 -                    boolean disabled = VcsUtilities.isSetContainedInQuotedStrings(
   20.26 -                        disabledStatus, Collections.singleton(status));
   20.27 -                    if (!disabled) {
   20.28 -                        remaining.put(name, files.get(name));
   20.29 -                    }
   20.30 -                }
   20.31 -                files = remaining;
   20.32 -            }
   20.33 -        } else {
   20.34 -            // original code
   20.35              statusProvider = fileSystem.getStatusProvider();
   20.36              if (statusProvider == null) return files;
   20.37              String disabledStatus = (String) cmd.getProperty(VcsCommand.PROPERTY_DISABLED_ON_STATUS);
   20.38 @@ -216,7 +195,6 @@
   20.39                  }
   20.40                  files = remaining;
   20.41              }
   20.42 -        }
   20.43          boolean disabledWhenNotLocked = VcsCommandIO.getBooleanProperty(cmd, VcsCommand.PROPERTY_DISABLED_WHEN_NOT_LOCKED);
   20.44          String disabledWhenNotLockedConditionedStr = (String) cmd.getProperty(VcsCommand.PROPERTY_DISABLED_WHEN_NOT_LOCKED+"Conditioned");
   20.45          if (disabledWhenNotLocked || disabledWhenNotLockedConditionedStr != null) {
   20.46 @@ -235,29 +213,17 @@
   20.47  
   20.48                      // cache provider is not necessary in turbo mode
   20.49                      FileCacheProvider cacheProvider = null;
   20.50 -                    if (Turbo.implemented() == false) {
   20.51 -                        cacheProvider = fileSystem.getCacheProvider();
   20.52 -                    }
   20.53 +                    cacheProvider = fileSystem.getCacheProvider();
   20.54                      UserCommandSupport.setVariables(varFiles, vvars, fileSystem.getVarValueAdjustment(),
   20.55                                                      cacheProvider,
   20.56                                                      fileSystem.getRelativeMountPoint(), true);
   20.57                      String disabledWhenNotLockedConditionedExp = Variables.expand(vvars, disabledWhenNotLockedConditionedStr, false);
   20.58                      disabledWhenNotLocked = "true".equalsIgnoreCase(disabledWhenNotLockedConditionedExp);
   20.59                      if (disabledWhenNotLocked) {
   20.60 -                        if (Turbo.implemented()) {
   20.61 -                            FileObject fo = fileSystem.findResource(name);
   20.62 -                            FileProperties fprops = Turbo.getMeta(fo);
   20.63 -                            String locker = fprops != null ? fprops.getLocker() : null;
   20.64 -                            if (VcsFileSystem.lockerMatch(locker, currentLocker)) {
   20.65 -                                remaining.put(name, files.get(name));
   20.66 -                            }
   20.67 -                        } else {
   20.68 -                            // original code
   20.69                              String locker = statusProvider.getFileLocker(name);
   20.70                              if (VcsFileSystem.lockerMatch(locker, currentLocker)) {
   20.71                                  remaining.put(name, files.get(name));
   20.72                              }
   20.73 -                        }
   20.74                      } else {
   20.75                          remaining.put(name, files.get(name));
   20.76                      }
   20.77 @@ -265,20 +231,10 @@
   20.78              } else {
   20.79                  for (Enumeration enum = files.keys(); enum.hasMoreElements(); ) {
   20.80                      String name = (String) enum.nextElement();
   20.81 -                    if (Turbo.implemented()) {
   20.82 -                        FileObject fo = fileSystem.findResource(name);
   20.83 -                        FileProperties fprops = Turbo.getMeta(fo);
   20.84 -                        String locker = fprops != null ? fprops.getLocker() : null;
   20.85 -                        if (VcsFileSystem.lockerMatch(locker, currentLocker)) {
   20.86 -                            remaining.put(name, files.get(name));
   20.87 -                        }
   20.88 -                    } else {
   20.89 -                        // original code
   20.90                          String locker = statusProvider.getFileLocker(name);
   20.91                          if (VcsFileSystem.lockerMatch(locker, currentLocker)) {
   20.92                              remaining.put(name, files.get(name));
   20.93                          }
   20.94 -                    }
   20.95                  }
   20.96              }
   20.97              files = remaining;
    21.1 --- a/vcscore/src/org/netbeans/modules/vcscore/commands/CommandExecutorSupport.java	Mon Sep 06 12:19:32 2004 +0000
    21.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/commands/CommandExecutorSupport.java	Mon Sep 06 16:41:47 2004 +0000
    21.3 @@ -48,12 +48,9 @@
    21.4  //import org.netbeans.modules.vcscore.VcsAction;
    21.5  import org.netbeans.modules.vcscore.Variables;
    21.6  import org.netbeans.modules.vcscore.RetrievingDialog;
    21.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    21.8 -import org.netbeans.modules.vcscore.turbo.TurboUtil;
    21.9 -import org.netbeans.modules.vcscore.turbo.Statuses;
   21.10 -import org.netbeans.modules.vcscore.turbo.FileProperties;
   21.11  import org.netbeans.modules.vcscore.caching.FileCacheProvider;
   21.12  import org.netbeans.modules.vcscore.caching.FileStatusProvider;
   21.13 +import org.netbeans.modules.vcscore.caching.CacheStatuses;
   21.14  import org.netbeans.modules.vcscore.util.VariableInputDescriptor;
   21.15  import org.netbeans.modules.vcscore.util.VariableInputComponent;
   21.16  import org.netbeans.modules.vcscore.util.VariableInputDialog;
   21.17 @@ -127,35 +124,9 @@
   21.18      
   21.19      private static void deleteUnimportantFiles(VcsFileSystem fileSystem, Collection processedFiles) {
   21.20  
   21.21 -        if (Turbo.implemented()) {
   21.22 -            String localFileStatus = Statuses.getLocalStatus();
   21.23 -            String ignoredFileStatus = Statuses.STATUS_IGNORED;
   21.24 -            for (Iterator filesIt = getAllFilesAssociatedWith(fileSystem, processedFiles).iterator(); filesIt.hasNext(); ) {
   21.25 -                org.openide.filesystems.FileObject fo = (org.openide.filesystems.FileObject) filesIt.next();
   21.26 -                String name = fo.getPath();
   21.27 -                if (!fileSystem.isImportant(name)) {
   21.28 -                    FileProperties fprops = Turbo.getMeta(fo);
   21.29 -                    String status = FileProperties.getStatus(fprops);  // XXX this status is VCS specific
   21.30 -                    // Do not delete unimportant files, that are version controled.
   21.31 -                    if (!(localFileStatus.equals(status) || ignoredFileStatus.equals(status))) continue;
   21.32 -                    if (fo != null) {
   21.33 -                        try {
   21.34 -                            fo.delete(fo.lock());
   21.35 -                        } catch (java.io.IOException ioexc) {}
   21.36 -                    } else {
   21.37 -                        try {
   21.38 -                            fileSystem.delete(name);
   21.39 -                        } catch (java.io.IOException ioexc) {}
   21.40 -                    }
   21.41 -                }
   21.42 -            }
   21.43 -            return;
   21.44 -        }
   21.45 -
   21.46 -        // original code
   21.47          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
   21.48          String localFileStatus = (statusProvider != null) ? statusProvider.getLocalFileStatus() : null;
   21.49 -        String ignoredFileStatus = Statuses.STATUS_IGNORED;
   21.50 +        String ignoredFileStatus = CacheStatuses.STATUS_IGNORED;
   21.51          for (Iterator filesIt = getAllFilesAssociatedWith(fileSystem, processedFiles).iterator(); filesIt.hasNext(); ) {
   21.52              org.openide.filesystems.FileObject fo = (org.openide.filesystems.FileObject) filesIt.next();
   21.53              String name = fo.getPath();
   21.54 @@ -313,18 +284,6 @@
   21.55       */
   21.56      public static void doRefresh(VcsFileSystem fileSystem, String refreshPath, boolean recursive) {
   21.57  
   21.58 -        if (Turbo.implemented()) {
   21.59 -            FileObject fo = fileSystem.findResource(refreshPath);
   21.60 -            if (recursive) {
   21.61 -                // TODO the old implementaion poped up an window, when? why?
   21.62 -                TurboUtil.refreshRecursively(fo);
   21.63 -            } else {
   21.64 -                TurboUtil.refreshFolder(fo);
   21.65 -            }
   21.66 -            return;
   21.67 -        }
   21.68 -
   21.69 -        // the old implementation
   21.70          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
   21.71          if (statusProvider == null) return ;
   21.72          FileCacheProvider cache = fileSystem.getCacheProvider();
   21.73 @@ -394,8 +353,6 @@
   21.74                                               boolean foldersOnly, boolean doRefreshCurrent,
   21.75                                               boolean doRefreshParent, Boolean[] recursively) {
   21.76  
   21.77 -        assert Turbo.implemented() == false; // TODO decode it and add turbo mode support
   21.78 -
   21.79          FileCacheProvider cache = fileSystem.getCacheProvider();
   21.80          FileStatusProvider statusProvider = fileSystem.getStatusProvider();
   21.81          if (statusProvider == null) return null; // No refresh without a status provider
    22.1 --- a/vcscore/src/org/netbeans/modules/vcscore/objectintegrity/VcsObjectIntegritySupport.java	Mon Sep 06 12:19:32 2004 +0000
    22.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/objectintegrity/VcsObjectIntegritySupport.java	Mon Sep 06 16:41:47 2004 +0000
    22.3 @@ -54,8 +54,6 @@
    22.4  
    22.5  import org.netbeans.modules.vcscore.FileObjectExistence;
    22.6  import org.netbeans.modules.vcscore.VcsAttributes;
    22.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    22.8 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    22.9  import org.netbeans.modules.vcscore.cache.CacheDir;
   22.10  import org.netbeans.modules.vcscore.cache.CacheFile;
   22.11  import org.netbeans.modules.vcscore.cache.CacheHandler;
   22.12 @@ -183,14 +181,9 @@
   22.13                                        String fsRootPath,
   22.14                                        FileObjectExistence foExistence) {
   22.15  
   22.16 -        if (Turbo.implemented()) {
   22.17 -            // TODO are we able to do the same tricks using TurboListener?
   22.18 -        } else {
   22.19 -            // original implementation
   22.20              this.cache = cache;
   22.21              cacheHandlerListaner = (CacheHandlerListener) WeakListener.create(CacheHandlerListener.class, this, cache);
   22.22              cache.addCacheHandlerListener(cacheHandlerListaner);
   22.23 -        }
   22.24  
   22.25          this.fileSystem = fileSystem;
   22.26          this.fsRootPath = fsRootPath;
   22.27 @@ -218,9 +211,7 @@
   22.28                  pool.removeOperationListener(operationListener);
   22.29              }
   22.30              if (cacheHandlerListaner != null) {
   22.31 -                if (Turbo.implemented() == false) {
   22.32                      cache.removeCacheHandlerListener(cacheHandlerListaner);
   22.33 -                }
   22.34              }
   22.35          }
   22.36          // We must allow that the analyzar task can fire property changes,
   22.37 @@ -298,134 +289,6 @@
   22.38          analyzerTask.schedule(ANALYZER_SCHEDULE_TIME);
   22.39      }
   22.40  
   22.41 -    private void runWithTurbo() {
   22.42 -
   22.43 -        Set paths;
   22.44 -        Set objects;
   22.45 -        boolean changed = false;
   22.46 -        synchronized (objectsToAnalyze) {
   22.47 -            paths = pathsToAnalyze;
   22.48 -            objects = objectsToAnalyze;
   22.49 -            pathsToAnalyze = new HashSet();
   22.50 -            objectsToAnalyze = new HashSet();
   22.51 -        }
   22.52 -        if (!paths.isEmpty()) {
   22.53 -            Enumeration existingEnum = foExistence.getExistingFiles();
   22.54 -            while(existingEnum.hasMoreElements() && !paths.isEmpty()) {
   22.55 -                FileObject fo = (FileObject) existingEnum.nextElement();
   22.56 -                if (paths.remove(fo.getPath())) {
   22.57 -                    try {
   22.58 -                        DataObject dobj = DataObject.find(fo);
   22.59 -                        objects.add(dobj);
   22.60 -                    } catch (DataObjectNotFoundException donfex) {
   22.61 -                        // Ignored. If the DO does not exist, it can not be analyzed.
   22.62 -                    }
   22.63 -                }
   22.64 -            }
   22.65 -        }
   22.66 -        boolean initialized = false; // Assume, that initialization was not called yet.
   22.67 -        for (Iterator objIt = objects.iterator(); objIt.hasNext(); ) {
   22.68 -            DataObject dobj = (DataObject) objIt.next();
   22.69 -            FileObject primary = dobj.getPrimaryFile();
   22.70 -            FileSystem fs = (FileSystem) primary.getAttribute(VcsAttributes.VCS_NATIVE_FS);
   22.71 -            if (primary.isFolder() || !fileSystem.equals(fs)) {
   22.72 -                //System.out.println("VOIS.run(): ignoring primary = "+primary+" from "+fs);
   22.73 -                continue;
   22.74 -            }
   22.75 -            File primaryFile = FileUtil.toFile(primary);
   22.76 -            if (primaryFile == null) {
   22.77 -                // There's no real File underneath
   22.78 -                continue;
   22.79 -            }
   22.80 -            if (!initialized) {
   22.81 -                initialize(); // Assure, that we're initialized.
   22.82 -                initialized = true;
   22.83 -            }
   22.84 -            //fileSystem.getCacheProvider().
   22.85 -            FileProperties fprops = Turbo.getCachedMeta(primary);
   22.86 -            if (fprops == null || fprops.isLocal()) {
   22.87 -                synchronized (primaryLocalFiles) {
   22.88 -                    if (filesStorageLocked) {
   22.89 -                        try {
   22.90 -                            primaryLocalFiles.wait();
   22.91 -                        } catch (InterruptedException iex) { /* continue */ }
   22.92 -                    }
   22.93 -                    primaryLocalFiles.add(primary.getPath());
   22.94 -                }
   22.95 -                changed = true;
   22.96 -                continue;
   22.97 -            } else {
   22.98 -                synchronized (primaryLocalFiles) {
   22.99 -                    if (filesStorageLocked) {
  22.100 -                        try {
  22.101 -                            primaryLocalFiles.wait();
  22.102 -                        } catch (InterruptedException iex) { /* continue */ }
  22.103 -                    }
  22.104 -                    if (primaryLocalFiles.remove(primary.getPath())) {
  22.105 -                        changed = true;
  22.106 -                    }
  22.107 -                }
  22.108 -            }
  22.109 -            String primaryFilePath = primary.getPath();
  22.110 -            //System.out.println("VOIS.run(): have primary: "+primaryFilePath);
  22.111 -            dobj.addPropertyChangeListener(doFileChangeListener);
  22.112 -            Set filesToAdd = new HashSet();
  22.113 -            Set filesToRemove = new HashSet();
  22.114 -            Set fileSet = dobj.files();
  22.115 -            for (Iterator fileIt = fileSet.iterator(); fileIt.hasNext(); ) {
  22.116 -                FileObject fo = (FileObject) fileIt.next();
  22.117 -                if (primary.equals(fo)) continue;
  22.118 -                String filePath = fo.getPath();
  22.119 -                fs = (FileSystem) fo.getAttribute(VcsAttributes.VCS_NATIVE_FS);
  22.120 -                File file = FileUtil.toFile(fo);
  22.121 -                if (file == null) {
  22.122 -                    filesToRemove.add(filePath);
  22.123 -                    continue;
  22.124 -                }
  22.125 -                if (fo.isFolder() || !fileSystem.equals(fs) ||
  22.126 -                    SharabilityQuery.getSharability(file) == SharabilityQuery.NOT_SHARABLE ||
  22.127 -                    ignoredSecondaryLocalFiles.contains(filePath)) {
  22.128 -
  22.129 -                    filesToRemove.add(filePath);
  22.130 -                    continue;
  22.131 -                }
  22.132 -                FileProperties fprops2 = Turbo.getCachedMeta(fo);
  22.133 -                //System.out.println("   VOIS.run(): secondary '"+fo+"', cache = "+cFile);
  22.134 -                if (fprops2 == null || fprops2.isLocal()) {
  22.135 -                    filesToAdd.add(filePath);
  22.136 -                } else {
  22.137 -                    filesToRemove.add(filePath);
  22.138 -                }
  22.139 -            }
  22.140 -            synchronized (objectsWithLocalFiles) {
  22.141 -                if (filesStorageLocked) {
  22.142 -                    try {
  22.143 -                        objectsWithLocalFiles.wait();
  22.144 -                    } catch (InterruptedException iex) { /* continue */ }
  22.145 -                }
  22.146 -                Set localSec = (Set) objectsWithLocalFiles.get(primaryFilePath);
  22.147 -                if (localSec == null) {
  22.148 -                    localSec = new HashSet();
  22.149 -                }
  22.150 -                localSec.addAll(filesToAdd);
  22.151 -                for (Iterator fileIt = filesToAdd.iterator(); fileIt.hasNext(); ) {
  22.152 -                    String secFile = (String) fileIt.next();
  22.153 -                    filesMap.put(secFile, primaryFilePath);
  22.154 -                }
  22.155 -                localSec.removeAll(filesToRemove);
  22.156 -                filesMap.keySet().removeAll(filesToRemove);
  22.157 -                if (localSec.size() > 0) {
  22.158 -                    objectsWithLocalFiles.put(primaryFilePath, localSec);
  22.159 -                    changed = true;
  22.160 -                } else {
  22.161 -                    Object removedObj = objectsWithLocalFiles.remove(primaryFilePath);
  22.162 -                    if (removedObj != null) changed = true;
  22.163 -                }
  22.164 -            }
  22.165 -        }
  22.166 -        if (changed) firePropertyChange();
  22.167 -    }
  22.168 -
  22.169      /**
  22.170       * Get the created DataObject from the queue, analyze their files and
  22.171       * add the file names into the integrity list if necessary.
  22.172 @@ -434,12 +297,6 @@
  22.173       */
  22.174      public void run() {
  22.175  
  22.176 -        if (Turbo.implemented()) {
  22.177 -            runWithTurbo();
  22.178 -            return;
  22.179 -        }
  22.180 -
  22.181 -        // old implementation
  22.182          Set paths;
  22.183          Set objects;
  22.184          boolean changed = false;
  22.185 @@ -637,8 +494,6 @@
  22.186       */
  22.187      public void cacheAdded(CacheHandlerEvent event) {
  22.188  
  22.189 -        assert Turbo.implemented() == false;
  22.190 -
  22.191          CacheFile cFile = event.getCacheFile();
  22.192          //System.out.println("VOIS.cacheAdded("+cFile+")");
  22.193          if (cFile instanceof CacheDir || cFile.isLocal()) return ;
  22.194 @@ -692,8 +547,6 @@
  22.195       */
  22.196      public void cacheRemoved(CacheHandlerEvent event) {
  22.197  
  22.198 -        assert Turbo.implemented() == false;
  22.199 -
  22.200          CacheFile cFile = event.getCacheFile();
  22.201          // If the removed cache file was local, ignore it, because only delete
  22.202          // can remove it entirely.
  22.203 @@ -726,8 +579,6 @@
  22.204       */
  22.205      public void statusChanged(CacheHandlerEvent event) {
  22.206  
  22.207 -        assert Turbo.implemented() == false;
  22.208 -
  22.209          CacheFile cFile = event.getCacheFile();
  22.210          if (cFile instanceof CacheDir) return ;
  22.211          //System.out.println("VOIS.statusChanged("+cFile+")");
    23.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/Bundle.properties	Mon Sep 06 12:19:32 2004 +0000
    23.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.3 @@ -1,17 +0,0 @@
    23.4 -#                 Sun Public License Notice
    23.5 -#
    23.6 -# The contents of this file are subject to the Sun Public License
    23.7 -# Version 1.0 (the "License"). You may not use this file except in
    23.8 -# compliance with the License. A copy of the License is available at
    23.9 -# http://www.sun.com/
   23.10 -#
   23.11 -# The Original Code is NetBeans. The Initial Developer of the Original
   23.12 -# Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   23.13 -# Microsystems, Inc. All Rights Reserved.
   23.14 -
   23.15 -
   23.16 -# Statuses.java
   23.17 -local=Local
   23.18 -unknown=Unknown
   23.19 -
   23.20 -#--
    24.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/FileProperties.java	Mon Sep 06 12:19:32 2004 +0000
    24.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.3 @@ -1,263 +0,0 @@
    24.4 -/*
    24.5 - *                 Sun Public License Notice
    24.6 - *
    24.7 - * The contents of this file are subject to the Sun Public License
    24.8 - * Version 1.0 (the "License"). You may not use this file except in
    24.9 - * compliance with the License. A copy of the License is available at
   24.10 - * http://www.sun.com/
   24.11 - *
   24.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   24.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   24.14 - * Microsystems, Inc. All Rights Reserved.
   24.15 - */
   24.16 -package org.netbeans.modules.vcscore.turbo;
   24.17 -
   24.18 -import org.netbeans.modules.vcscore.caching.StatusFormat;
   24.19 -
   24.20 -
   24.21 -/**
   24.22 - * Additional FileObject metadata for versioned files.
   24.23 - * The object is treated as immutable. One initializing
   24.24 - * the object should invoke {@link #freeze} to assure it.
   24.25 - *
   24.26 - * @author Petr Kuzel
   24.27 - */
   24.28 -public final class FileProperties {
   24.29 -
   24.30 -    // It MUST not keep reference to associated FileObject
   24.31 -
   24.32 -    private String status;
   24.33 -
   24.34 -    /** Retrieved from repository on */
   24.35 -    private long retrieval;
   24.36 -
   24.37 -    private String name = ""; // NOI18N
   24.38 -    private String revision = ""; // NOI18N
   24.39 -    private String sticky = ""; // NOI18N
   24.40 -    private String attr = ""; // NOI18N
   24.41 -    private String date = ""; // NOI18N
   24.42 -    private String time = ""; // NOI18N
   24.43 -    private long    size = 0;
   24.44 -    private String locker;
   24.45 -
   24.46 -    // XXX it's not writen to disc layer
   24.47 -    private IgnoreList ignoreList;
   24.48 -
   24.49 -    private boolean canUpdate = true;
   24.50 -
   24.51 -
   24.52 -    public FileProperties() {
   24.53 -        retrieval = System.currentTimeMillis();
   24.54 -    }
   24.55 -
   24.56 -    /** Clones FileProperties except retrieval time. Clone is not frozen. */
   24.57 -    public FileProperties(FileProperties fprops) {
   24.58 -        status = fprops.status;
   24.59 -        retrieval = System.currentTimeMillis();
   24.60 -        name = fprops.name;
   24.61 -        revision = fprops.revision;
   24.62 -        sticky = fprops.sticky;
   24.63 -        attr = fprops.attr;
   24.64 -        date = fprops.date;
   24.65 -        time = fprops.time;
   24.66 -        size = fprops.size;
   24.67 -        locker = fprops.locker;
   24.68 -        ignoreList = fprops.ignoreList;
   24.69 -    }
   24.70 -
   24.71 -    /**
   24.72 -     * Creates file properties with LOCAL status for given file.
   24.73 -     * @param name name of file (without path)
   24.74 -     */
   24.75 -    public FileProperties(String name) {
   24.76 -        this.name = name;
   24.77 -        status = Statuses.getLocalStatus();
   24.78 -        retrieval = System.currentTimeMillis();
   24.79 -    }
   24.80 -
   24.81 -    /** Constructs from StatusFormatElements. */
   24.82 -    FileProperties(String[] elements) {
   24.83 -        status = elements[StatusFormat.ELEMENT_INDEX_STATUS];
   24.84 -        name = elements[StatusFormat.ELEMENT_INDEX_FILE_NAME];
   24.85 -        locker = elements[StatusFormat.ELEMENT_INDEX_LOCKER];
   24.86 -        attr = elements[StatusFormat.ELEMENT_INDEX_ATTR];
   24.87 -        revision = elements[StatusFormat.ELEMENT_INDEX_REVISION];
   24.88 -        try {
   24.89 -            size = Long.parseLong(elements[StatusFormat.ELEMENT_INDEX_SIZE]);
   24.90 -        } catch (NumberFormatException ex) {
   24.91 -            size = 0;
   24.92 -        }
   24.93 -        sticky = elements[StatusFormat.ELEMENT_INDEX_STICKY];
   24.94 -        time = elements[StatusFormat.ELEMENT_INDEX_TIME];
   24.95 -        date = elements[StatusFormat.ELEMENT_INDEX_DATE];
   24.96 -        retrieval = System.currentTimeMillis();
   24.97 -    }
   24.98 -
   24.99 -    /** Clients must access using {@link IgnoreList#forFolder}.*/
  24.100 -    IgnoreList getIgnoreList() {
  24.101 -        return ignoreList;
  24.102 -    }
  24.103 -
  24.104 -    void setIgnoreList(IgnoreList list) {
  24.105 -        ignoreList = list;
  24.106 -    }
  24.107 -
  24.108 -    /**
  24.109 -     * Status as provided by VCS repository or LOCAL or UNKNOWN assidned by cache.
  24.110 -     * It's not abstract repository neutral status as defined by FileStatusInfo. 
  24.111 -     */
  24.112 -    public String getStatus() {
  24.113 -        return status;
  24.114 -    }
  24.115 -
  24.116 -    public void setStatus(String status) {
  24.117 -        assert canUpdate;
  24.118 -        this.status = status;
  24.119 -    }
  24.120 -
  24.121 -    /**
  24.122 -     * Keeps time when updated from repository. The longer time
  24.123 -     * elapsed since that point the more unknown data this hold.
  24.124 -     */
  24.125 -    public long getRetrieval() {
  24.126 -        return retrieval;
  24.127 -    }
  24.128 -
  24.129 -    public void setRetrieval(long retrieval) {
  24.130 -        assert canUpdate;
  24.131 -        this.retrieval = retrieval;
  24.132 -    }
  24.133 -
  24.134 -    public String getName() {
  24.135 -        return name;
  24.136 -    }
  24.137 -
  24.138 -    public void setName(String name) {
  24.139 -        assert canUpdate;
  24.140 -        this.name = name;
  24.141 -    }
  24.142 -
  24.143 -    public String getRevision() {
  24.144 -        return revision;
  24.145 -    }
  24.146 -
  24.147 -    public void setRevision(String revision) {
  24.148 -        assert canUpdate;
  24.149 -        this.revision = revision;
  24.150 -    }
  24.151 -
  24.152 -    public String getSticky() {
  24.153 -        return sticky;
  24.154 -    }
  24.155 -
  24.156 -    public void setSticky(String sticky) {
  24.157 -        assert canUpdate;
  24.158 -        this.sticky = sticky;
  24.159 -    }
  24.160 -
  24.161 -    /** VCS specific additonal attributes (e.g CVS -kb) */
  24.162 -    public String getAttr() {
  24.163 -        return attr;
  24.164 -    }
  24.165 -
  24.166 -    public void setAttr(String attr) {
  24.167 -        assert canUpdate;
  24.168 -        this.attr = attr;
  24.169 -    }
  24.170 -
  24.171 -    public String getDate() {
  24.172 -        return date;
  24.173 -    }
  24.174 -
  24.175 -    public void setDate(String date) {
  24.176 -        assert canUpdate;
  24.177 -        this.date = date;
  24.178 -    }
  24.179 -
  24.180 -    public String getTime() {
  24.181 -        return time;
  24.182 -    }
  24.183 -
  24.184 -    public void setTime(String time) {
  24.185 -        assert canUpdate;
  24.186 -        this.time = time;
  24.187 -    }
  24.188 -
  24.189 -    public long getSize() {
  24.190 -        return size;
  24.191 -    }
  24.192 -
  24.193 -    public String getSizeAsString() {
  24.194 -        return "" + size;
  24.195 -    }
  24.196 -
  24.197 -    public void setSize(long size) {
  24.198 -        assert canUpdate;
  24.199 -        this.size = size;
  24.200 -    }
  24.201 -
  24.202 -    /**
  24.203 -     * Determines whether reported status means that file is not versioned.
  24.204 -     * @return true if for sure local, otherwise false (even if unknown)
  24.205 -     */
  24.206 -    public boolean isLocal() {
  24.207 -        if (status == null) return false;
  24.208 -        return Statuses.getLocalStatus().equals(status);
  24.209 -    }
  24.210 -
  24.211 -    /**
  24.212 -     * Make object immutable, all setters throw exception.
  24.213 -     */
  24.214 -    public void freeze() {
  24.215 -        canUpdate = false;
  24.216 -    }
  24.217 -
  24.218 -    /** What user holds lock on the file. */
  24.219 -    public String getLocker() {
  24.220 -        return locker;
  24.221 -    }
  24.222 -
  24.223 -    public void setLocker(String locker) {
  24.224 -        assert canUpdate;
  24.225 -        this.locker = locker;
  24.226 -    }
  24.227 -
  24.228 -    /**
  24.229 -     * Get status or UNKNOWN
  24.230 -     * @param fprops propeties or null
  24.231 -     * @return status or UNKNOWN for null properties or status
  24.232 -     */
  24.233 -    public static String getStatus(FileProperties fprops) {
  24.234 -        if (fprops == null) {
  24.235 -            return Statuses.getUnknownStatus();
  24.236 -        } else {
  24.237 -            String status = fprops.getStatus();
  24.238 -            if (status == null) {
  24.239 -                return Statuses.getUnknownStatus();
  24.240 -            } else {
  24.241 -                return status;
  24.242 -            }
  24.243 -        }
  24.244 -    }
  24.245 -
  24.246 -    /** Converts to format accepted by StatusFormat */
  24.247 -    public String[] toElements() {
  24.248 -        String[] elements = new String[StatusFormat.NUM_ELEMENTS];
  24.249 -        elements[StatusFormat.ELEMENT_INDEX_FILE_NAME] = getName();
  24.250 -        elements[StatusFormat.ELEMENT_INDEX_STATUS] = getStatus();
  24.251 -        elements[StatusFormat.ELEMENT_INDEX_LOCKER] = getLocker();
  24.252 -        elements[StatusFormat.ELEMENT_INDEX_ATTR] = getAttr();
  24.253 -        elements[StatusFormat.ELEMENT_INDEX_REVISION] = getRevision();
  24.254 -        elements[StatusFormat.ELEMENT_INDEX_SIZE] = getSizeAsString();
  24.255 -        elements[StatusFormat.ELEMENT_INDEX_STICKY] = getSticky();
  24.256 -        elements[StatusFormat.ELEMENT_INDEX_TIME] = getTime();
  24.257 -        elements[StatusFormat.ELEMENT_INDEX_DATE] = getDate();
  24.258 -
  24.259 -        return elements;
  24.260 -    }
  24.261 -
  24.262 -    public String toString() {
  24.263 -        return "[" + name + "=>"  + status + "]";
  24.264 -    }
  24.265 -
  24.266 -}
    25.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/IgnoreList.java	Mon Sep 06 12:19:32 2004 +0000
    25.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.3 @@ -1,122 +0,0 @@
    25.4 -/*
    25.5 - *                 Sun Public License Notice
    25.6 - *
    25.7 - * The contents of this file are subject to the Sun Public License
    25.8 - * Version 1.0 (the "License"). You may not use this file except in
    25.9 - * compliance with the License. A copy of the License is available at
   25.10 - * http://www.sun.com/
   25.11 - *
   25.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   25.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   25.14 - * Microsystems, Inc. All Rights Reserved.
   25.15 - */
   25.16 -package org.netbeans.modules.vcscore.turbo;
   25.17 -
   25.18 -import org.openide.filesystems.FileObject;
   25.19 -import org.openide.filesystems.FileStateInvalidException;
   25.20 -import org.openide.filesystems.FileSystem;
   25.21 -import org.netbeans.modules.vcscore.util.VcsUtilities;
   25.22 -import org.netbeans.modules.vcscore.VcsFileSystem;
   25.23 -
   25.24 -import java.util.regex.Pattern;
   25.25 -import java.util.regex.PatternSyntaxException;
   25.26 -import java.util.List;
   25.27 -
   25.28 -/**
   25.29 - * Represents .ignorelist or equivalent listing files that
   25.30 - * should not be versioned in repository. It's friend
   25.31 - * client of Turbo. It uses package private FileProperties
   25.32 - * attribute.
   25.33 - *
   25.34 - * TODO add support for DISK and REFRESH levels, current impl looks like DISK_OR_REFRESH
   25.35 - *
   25.36 - * @author Petr Kuzel
   25.37 - */
   25.38 -public final class IgnoreList {
   25.39 -
   25.40 -    // buffered regular expression, for efficiency reasons
   25.41 -    private Pattern regExp;
   25.42 -
   25.43 -    private final List ignoreList;
   25.44 -
   25.45 -    IgnoreList(List elements) {
   25.46 -        ignoreList = elements;
   25.47 -    }
   25.48 -
   25.49 -    /**
   25.50 -     * Finds ignore list for specified folder either in
   25.51 -     * cache or connect server.
   25.52 -     */
   25.53 -    public static IgnoreList forFolder(FileObject folder) {
   25.54 -        FileProperties fprops = Turbo.getMeta(folder);
   25.55 -        IgnoreList ilist = fprops.getIgnoreList();
   25.56 -        if (ilist == null) {
   25.57 -            try {
   25.58 -                FileSystem fs = folder.getFileSystem();
   25.59 -                if (fs instanceof VcsFileSystem) {
   25.60 -                    VcsFileSystem.IgnoreListSupport is = ((VcsFileSystem)fs).getIgnoreListSupport();
   25.61 -                    createIgnoreList(folder, is);
   25.62 -                }
   25.63 -            } catch (FileStateInvalidException e) {
   25.64 -
   25.65 -            }
   25.66 -
   25.67 -        }
   25.68 -        return new IgnoreList(null);
   25.69 -    }
   25.70 -
   25.71 -    /**
   25.72 -     * @param name path to file in test
   25.73 -     */
   25.74 -    public boolean isIgnored(String name) {
   25.75 -        if (ignoreList == null) {
   25.76 -            return false;
   25.77 -        }
   25.78 -        //System.out.println("isIgnored("+name+"), ignoreList = "+org.netbeans.modules.vcscore.util.VcsUtilities.arrayToString((String[]) ignoreList.toArray(new String[0])));
   25.79 -        //System.out.println(" regExp = "+regExp);
   25.80 -        if (regExp == null) {
   25.81 -            String unionExp = VcsUtilities.computeRegularExpressionFromIgnoreList(ignoreList);
   25.82 -            try {
   25.83 -                regExp = Pattern.compile(unionExp);
   25.84 -                //System.out.println(" **** GOT reg EXP: '"+unionExp+"' *********");
   25.85 -            } catch (PatternSyntaxException malformedRE) {
   25.86 -                try {
   25.87 -                    regExp = Pattern.compile(""); // epsilon, no regular file match epsilon // NOI18N
   25.88 -                } catch (PatternSyntaxException innerMalformedRE) {
   25.89 -                }
   25.90 -            }
   25.91 -        }
   25.92 -        //System.out.println(regExp+".match("+name+") = "+regExp.match(name));
   25.93 -        return regExp.matcher(name).matches();
   25.94 -
   25.95 -    }
   25.96 -
   25.97 -    private static IgnoreList createIgnoreList(FileObject folder, VcsFileSystem.IgnoreListSupport ignSupport) {
   25.98 -        FileObject parent = folder.getParent();
   25.99 -        String path = folder.getPath();
  25.100 -        //System.out.println("createIgnoreList("+folder.getAbsolutePath()+", "+path+"), parent = "+((parent == null) ? "null" : parent.getAbsolutePath()));
  25.101 -        List ignoreList = null;
  25.102 -        if (parent == null) {
  25.103 -            ignoreList = ignSupport.createIgnoreList(path, ignSupport.createInitialIgnoreList());
  25.104 -        } else {
  25.105 -            //CacheDir pd = cache.getDir(parent.getPackageNameExt('/','.'));
  25.106 -            List parentIgnoreList;
  25.107 -            //System.out.println("  parent has ignore list set = "+parent.isIgnoreListSet());
  25.108 -            FileProperties pprops = Turbo.getMeta(parent);
  25.109 -            IgnoreList ilist = pprops.getIgnoreList();
  25.110 -            if (ilist == null) {
  25.111 -                ilist = createIgnoreList(parent, ignSupport);
  25.112 -                pprops.setIgnoreList(ilist);
  25.113 -                parentIgnoreList = ilist.getElements();
  25.114 -            } else {
  25.115 -                parentIgnoreList = ilist.getElements();
  25.116 -            }
  25.117 -            ignoreList = ignSupport.createIgnoreList(path, parentIgnoreList);
  25.118 -        }
  25.119 -        return new IgnoreList(ignoreList);
  25.120 -    }
  25.121 -
  25.122 -    private List getElements() {
  25.123 -        return ignoreList;
  25.124 -    }
  25.125 -}
    26.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/Profiles.java	Mon Sep 06 12:19:32 2004 +0000
    26.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    26.3 @@ -1,81 +0,0 @@
    26.4 -/*
    26.5 - *                 Sun Public License Notice
    26.6 - *
    26.7 - * The contents of this file are subject to the Sun Public License
    26.8 - * Version 1.0 (the "License"). You may not use this file except in
    26.9 - * compliance with the License. A copy of the License is available at
   26.10 - * http://www.sun.com/
   26.11 - *
   26.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   26.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   26.14 - * Microsystems, Inc. All Rights Reserved.
   26.15 - */
   26.16 -package org.netbeans.modules.vcscore.turbo;
   26.17 -
   26.18 -import org.netbeans.modules.vcscore.registry.FSRegistry;
   26.19 -import org.netbeans.modules.vcscore.registry.FSInfo;
   26.20 -import org.netbeans.modules.vcscore.VcsFileSystem;
   26.21 -import org.netbeans.api.vcs.FileStatusInfo;
   26.22 -import org.openide.filesystems.FileUtil;
   26.23 -
   26.24 -import java.io.File;
   26.25 -
   26.26 -/**
   26.27 - * Access profile specifics data, such as possible statuses,
   26.28 - * abstract Statuses to VCS statuses mapping and cache
   26.29 - * file relative path.
   26.30 - * <p>
   26.31 - * The implementation forwards to FS that should be hopefully
   26.32 - * CommandLineVCSFS that knows it's profile.
   26.33 - *
   26.34 - * @author Petr Kuzel
   26.35 - */
   26.36 -final class Profiles {
   26.37 -
   26.38 -    /**
   26.39 -     * Consults profile to get proper cache file. Note that
   26.40 -     * one cache file is returned for all files is one directory.
   26.41 -     * It return null if disk caching cannot be used.
   26.42 -     */
   26.43 -    public static File findCacheFile(File file) {
   26.44 -        VcsFileSystem fs = findVcsFileSystem(file);
   26.45 -        if (fs != null) {
   26.46 -            String root = FileUtil.toFile(fs.getRoot()).getAbsolutePath();
   26.47 -            String path = file.getAbsolutePath().substring(root.length());
   26.48 -            File ret = fs.getCacheFileName(file, path);
   26.49 -            // assert that it does not return null for FS root subdirs
   26.50 -            // it's allowed to return null for files like "path/CVS/Root"
   26.51 -            assert path.length() == 0 || path.indexOf(File.separatorChar) != 0 || ret != null : "Root " + root + " path " + path;
   26.52 -            return ret;
   26.53 -        }
   26.54 -        return null;
   26.55 -    }
   26.56 -
   26.57 -    /**
   26.58 -     * Locates VCSFs that cover given file.
   26.59 -     */
   26.60 -    private static VcsFileSystem findVcsFileSystem(File file) {
   26.61 -        String path = file.getAbsolutePath();
   26.62 -        FSRegistry registry = FSRegistry.getDefault();
   26.63 -        FSInfo[] infos = registry.getRegistered();
   26.64 -        for (int i = 0; i<infos.length; i++) {
   26.65 -            FSInfo info = infos[i];
   26.66 -            if (info.isControl() == false) continue;
   26.67 -            File root = info.getFSRoot();
   26.68 -            String rootPath = root.getAbsolutePath();
   26.69 -            if (path.startsWith(rootPath)) {
   26.70 -                return (VcsFileSystem) info.getFileSystem();  // assuming here that VCSFSs cannot overlap
   26.71 -            }
   26.72 -        }
   26.73 -        return null;
   26.74 -    }
   26.75 -
   26.76 -    /**
   26.77 -     * Translates VCS specific statuc to abstract one.
   26.78 -     */
   26.79 -    public static FileStatusInfo toStatusInfo(File file, FileProperties fprops) {
   26.80 -        // TODO implement
   26.81 -        return null;
   26.82 -    }
   26.83 -
   26.84 -}
    27.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/Repository.java	Mon Sep 06 12:19:32 2004 +0000
    27.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    27.3 @@ -1,185 +0,0 @@
    27.4 -/*
    27.5 - *                 Sun Public License Notice
    27.6 - *
    27.7 - * The contents of this file are subject to the Sun Public License
    27.8 - * Version 1.0 (the "License"). You may not use this file except in
    27.9 - * compliance with the License. A copy of the License is available at
   27.10 - * http://www.sun.com/
   27.11 - *
   27.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   27.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   27.14 - * Microsystems, Inc. All Rights Reserved.
   27.15 - */
   27.16 -package org.netbeans.modules.vcscore.turbo;
   27.17 -
   27.18 -import org.openide.filesystems.FileObject;
   27.19 -import org.openide.filesystems.FileStateInvalidException;
   27.20 -import org.openide.filesystems.FileSystem;
   27.21 -import org.openide.filesystems.FileUtil;
   27.22 -import org.openide.util.WeakSet;
   27.23 -import org.openide.util.RequestProcessor;
   27.24 -import org.netbeans.modules.vcscore.VcsFileSystem;
   27.25 -import org.netbeans.modules.vcscore.VcsAttributes;
   27.26 -import org.netbeans.modules.vcscore.commands.VcsCommand;
   27.27 -import org.netbeans.modules.vcscore.commands.VcsDescribedCommand;
   27.28 -import org.netbeans.spi.vcs.commands.CommandSupport;
   27.29 -import org.netbeans.api.vcs.commands.Command;
   27.30 -import org.netbeans.api.vcs.commands.CommandTask;
   27.31 -import org.netbeans.api.vcs.VcsManager;
   27.32 -
   27.33 -import java.io.File;
   27.34 -import java.util.Set;
   27.35 -import java.util.Iterator;
   27.36 -import java.util.Collections;
   27.37 -
   27.38 -/**
   27.39 - * Connects to repository to get fresh status.
   27.40 - *
   27.41 - * @author Petr Kuzel
   27.42 - */
   27.43 -final class Repository {
   27.44 -
   27.45 -    /**
   27.46 -     * Can return null on failure = unknown status.
   27.47 -     */
   27.48 -    public static FileProperties get(FileObject fileObject) {
   27.49 -        if (refresh(fileObject)) {
   27.50 -            // it was loaded by dirReaderListener
   27.51 -            FileProperties fprops = Memory.get(fileObject);
   27.52 -            return fprops;
   27.53 -        } else {
   27.54 -            return null;
   27.55 -        }
   27.56 -    }
   27.57 -
   27.58 -    /**
   27.59 -     * Run REFRESH on single repository file. It's highly ineffecient
   27.60 -     * to ask for single file status because implementaion solves this
   27.61 -     * by asking for statuses of all files inr parent dir.
   27.62 -     * <p>
   27.63 -     * It delegates to profile provider. It can block for
   27.64 -     * several seconds. Results if any are inserted into
   27.65 -     * Memory layer (using DirReaderListener).
   27.66 -     *
   27.67 -     * @return true if command for sure reported some results to listeners
   27.68 -     */
   27.69 -    private static boolean refresh(FileObject fileObject) {
   27.70 -
   27.71 -        System.out.println("[turbo] Repository.refresh(" + fileObject + ")");
   27.72 -
   27.73 -        // TODO profiles does not define command for refreshing single file
   27.74 -        // there is only support for directory refresh and recursive directory refresh
   27.75 -        // if I want to refresh single file or folder status one must use parent folder refresh
   27.76 -
   27.77 -        // single folder status WORKAROUND
   27.78 -        // it seems to come from CVS that supports stauses for files only
   27.79 -        // folder has only [local]/[versioned] status that cannot be directly retrieved
   27.80 -        // and is guessed in dirReaderListener implementation
   27.81 -
   27.82 -        // single file status WORKAROUND
   27.83 -        // ask for all statuses in parent folder, one of them is the right one
   27.84 -        if (fileObject.isData()) {
   27.85 -            fileObject = fileObject.getParent();
   27.86 -        }
   27.87 -
   27.88 -        VcsFileSystem fsystem = (VcsFileSystem) fileObject.getAttribute(VcsAttributes.VCS_NATIVE_FS);
   27.89 -        if (fsystem != null) {
   27.90 -            CommandSupport engine;
   27.91 -            boolean offLine = ((VcsFileSystem)fsystem).isOffLine();
   27.92 -            if (offLine) {
   27.93 -                // VcsCommand.NAME_REFRESH_RECURSIVELY for recursive impl
   27.94 -                engine = ((VcsFileSystem)fsystem).getCommandSupport(VcsCommand.NAME_REFRESH + VcsCommand.NAME_SUFFIX_OFFLINE);
   27.95 -            } else {
   27.96 -                engine = ((VcsFileSystem)fsystem).getCommandSupport(VcsCommand.NAME_REFRESH);
   27.97 -            }
   27.98 -
   27.99 -            Command cmd = engine.createCommand();
  27.100 -            if (cmd instanceof VcsDescribedCommand) {
  27.101 -                File f = (File) fileObject.getAttribute(VcsAttributes.FILE_ATTRIBUTE);
  27.102 -                assert f != null;  // what if request comes for virtual file?
  27.103 -                ((VcsDescribedCommand) cmd).setDiskFiles(new File[] { f });
  27.104 -
  27.105 -                ((VcsDescribedCommand) cmd).addDirReaderListener(TurboUtil.dirReaderListener(fsystem));
  27.106 -                // TODO this one is never called however it can mean that there exists single file refresh
  27.107 -                //((VcsDescribedCommand) cmd).addFileReaderListener(TurboUtil.fileReaderListener(fsystem));
  27.108 -                VcsManager.getDefault().showCustomizer(cmd);
  27.109 -                CommandTask task = cmd.execute();
  27.110 -                try {
  27.111 -                    task.waitFinished(10000); // give it 10s
  27.112 -                    // the command is not killed, it continues and will probably asynchronously report results
  27.113 -                    // I think it's OK, anyway it could be prevented by special dirReaderListener that would ignore results
  27.114 -                    return task.isFinished();
  27.115 -                } catch (InterruptedException e) {
  27.116 -                    return false;
  27.117 -                }
  27.118 -            }
  27.119 -        }
  27.120 -
  27.121 -        return false;
  27.122 -    }
  27.123 -
  27.124 -    /** Holds fileobject that were requested for background status retrieval. */
  27.125 -    private static final Set prepareRequests = Collections.synchronizedSet(new WeakSet());
  27.126 -
  27.127 -    private static PreparationTask preparationTask;
  27.128 -
  27.129 -    /** Tries to locate meta on disk or in repository */
  27.130 -    public static void prepareMeta(FileObject fileObject) {
  27.131 -        synchronized(Repository.class) {
  27.132 -            if (preparationTask == null) {
  27.133 -                preparationTask = new PreparationTask(prepareRequests);
  27.134 -                RequestProcessor.getDefault().post(preparationTask);
  27.135 -            }
  27.136 -        }
  27.137 -
  27.138 -        prepareRequests.add(fileObject);
  27.139 -        preparationTask.notifyNewRequest();
  27.140 -    }
  27.141 -
  27.142 -    /**
  27.143 -     * On background fetches data from repository.
  27.144 -     */
  27.145 -    private static class PreparationTask implements Runnable {
  27.146 -
  27.147 -        private final Set requests;
  27.148 -
  27.149 -        public PreparationTask(Set requests) {
  27.150 -            this.requests = requests;
  27.151 -        }
  27.152 -
  27.153 -        public void run() {
  27.154 -            try {
  27.155 -                Thread.currentThread().setName("VCS Repository Fetcher");  // NOI18N
  27.156 -                while (true) {
  27.157 -                    waitForRequests();
  27.158 -                    FileObject[] fos;
  27.159 -                    synchronized(requests) {
  27.160 -                        fos = (FileObject[]) requests.toArray(new FileObject[0]);
  27.161 -                        requests.clear();
  27.162 -                    }
  27.163 -                    for (int i = 0; i<fos.length; i++) {
  27.164 -                        FileObject fo = fos[i];
  27.165 -                        if (fo == null) continue;
  27.166 -                        Repository.refresh(fo);
  27.167 -                    }
  27.168 -                }
  27.169 -            } catch (InterruptedException ex) {
  27.170 -                synchronized(Repository.class) {
  27.171 -                    // forget about recent requests
  27.172 -                    prepareRequests.clear();
  27.173 -                    preparationTask = null;
  27.174 -                }
  27.175 -            }
  27.176 -        }
  27.177 -
  27.178 -        private synchronized void waitForRequests() throws InterruptedException {
  27.179 -            while (requests.size() == 0) wait();
  27.180 -        }
  27.181 -
  27.182 -        public synchronized void notifyNewRequest() {
  27.183 -            notify();
  27.184 -        }
  27.185 -    }
  27.186 -
  27.187 -
  27.188 -}
    28.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/Statuses.java	Mon Sep 06 12:19:32 2004 +0000
    28.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    28.3 @@ -1,56 +0,0 @@
    28.4 -/*
    28.5 - *                 Sun Public License Notice
    28.6 - *
    28.7 - * The contents of this file are subject to the Sun Public License
    28.8 - * Version 1.0 (the "License"). You may not use this file except in
    28.9 - * compliance with the License. A copy of the License is available at
   28.10 - * http://www.sun.com/
   28.11 - *
   28.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   28.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   28.14 - * Microsystems, Inc. All Rights Reserved.
   28.15 - */
   28.16 -package org.netbeans.modules.vcscore.turbo;
   28.17 -
   28.18 -import org.openide.util.NbBundle;
   28.19 -
   28.20 -/**
   28.21 - * Enumerates statuses with special meaning for VcsFileSystem.
   28.22 - * These well known statuses can be set directly by REFRESH
   28.23 - * command to assure the file status is properly recognized
   28.24 - * by infrastructure (otherwise statuses are not interpreted).
   28.25 - * <p>
   28.26 - * TODO Profiles could be able to define real status values
   28.27 - * for these symbolic constants. See FileStatusInfo.
   28.28 - *
   28.29 - * @author Petr Kuzel
   28.30 - */
   28.31 -public final class Statuses {
   28.32 -
   28.33 -    private static final String localStatus = NbBundle.getBundle(Statuses.class).getString("local");
   28.34 -    private static final String unknownStatus = NbBundle.getBundle(Statuses.class).getString("unknown");
   28.35 -
   28.36 -    /**
   28.37 -     * The status of ignored files. These are files, that are ignored by the
   28.38 -     * targed version control system. It's assigned by cache if such files do
   28.39 -     * not get VCS specific status. The REFRESH command can assign it too.
   28.40 -     */
   28.41 -    public static final String STATUS_IGNORED = "Ignored"; // NOI18N
   28.42 -
   28.43 -    /**
   28.44 -     * The status of dead files. These are files, that were deleted in the
   28.45 -     * targed version control system, but their old revisions still exist.
   28.46 -     * If REFRESH command mark file using this sttaus it can be recognized
   28.47 -     * and treated specially by VcsFileSystem (e.g. hidden but why).
   28.48 -     */
   28.49 -    public static final String STATUS_DEAD = "Dead"; // NOI18N
   28.50 -
   28.51 -    // XXX see also FileStatusInfo.LOCAL
   28.52 -    public static String getLocalStatus() {
   28.53 -        return localStatus;
   28.54 -    }
   28.55 -
   28.56 -    public static String getUnknownStatus() {
   28.57 -        return unknownStatus;
   28.58 -    }
   28.59 -}
    29.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/Turbo.java	Mon Sep 06 12:19:32 2004 +0000
    29.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    29.3 @@ -1,246 +0,0 @@
    29.4 -/*
    29.5 - *                 Sun Public License Notice
    29.6 - *
    29.7 - * The contents of this file are subject to the Sun Public License
    29.8 - * Version 1.0 (the "License"). You may not use this file except in
    29.9 - * compliance with the License. A copy of the License is available at
   29.10 - * http://www.sun.com/
   29.11 - *
   29.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   29.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   29.14 - * Microsystems, Inc. All Rights Reserved.
   29.15 - */
   29.16 -package org.netbeans.modules.vcscore.turbo;
   29.17 -
   29.18 -import org.openide.filesystems.FileObject;
   29.19 -
   29.20 -import javax.swing.*;
   29.21 -import java.util.ArrayList;
   29.22 -import java.util.List;
   29.23 -import java.util.Arrays;
   29.24 -import java.io.File;
   29.25 -
   29.26 -/**
   29.27 - * Client code main entry point.
   29.28 - *
   29.29 - * @author Petr Kuzel
   29.30 - */
   29.31 -public final class Turbo {
   29.32 -
   29.33 -    private static TurboListener[] listeners = new TurboListener[0];
   29.34 -
   29.35 -    private static final Turbo SINGLETON = new Turbo();
   29.36 -
   29.37 -    private static volatile boolean justFiring = false;
   29.38 -
   29.39 -    private static boolean ENABLED;
   29.40 -
   29.41 -    static {
   29.42 -        ENABLED = Boolean.getBoolean("netbeans.experimental.useVcsTurbo"); // NOI18N
   29.43 -        if (ENABLED) {
   29.44 -            System.out.println("Thank you for testing netbeans.experimental.useVcsTurbo!"); // NOI18N
   29.45 -            System.out.println("  It's an experimental VCS repository status cache."); // NOI18N
   29.46 -        }
   29.47 -    }
   29.48 -
   29.49 -    private Turbo() {
   29.50 -    }
   29.51 -
   29.52 -    /**
   29.53 -     * Request last known status. If called from AWT it
   29.54 -     * tries to locate data in memory layer. If it does
   29.55 -     * not find any it returns null and schedules background
   29.56 -     * meta retrieval. If called from other threads
   29.57 -     * it tries disk and possibly repository layer too.
   29.58 -     *
   29.59 -     * @return status or <code>null</code> for unknown
   29.60 -     */
   29.61 -    public static FileProperties getMeta(FileObject fileObject) {
   29.62 -
   29.63 -        if (fileObject == null) return null;
   29.64 -
   29.65 -        if (SwingUtilities.isEventDispatchThread()) {
   29.66 -            Statistics.request();
   29.67 -            FileProperties fprops = Memory.get(fileObject);
   29.68 -            if (fprops != null) {
   29.69 -                Statistics.memoryHit();
   29.70 -                return fprops;
   29.71 -            }
   29.72 -            Disk.prepareMeta(fileObject);
   29.73 -            return null;
   29.74 -        } else {
   29.75 -            FileProperties fprops = getCachedMeta(fileObject);  // it does statistics
   29.76 -            if (fprops != null) {
   29.77 -                return fprops;
   29.78 -            } else {
   29.79 -                return getRepositoryMeta(fileObject);
   29.80 -            }
   29.81 -        }
   29.82 -    }
   29.83 -
   29.84 -    /**
   29.85 -     * Request fresh status from repository. May block forever.
   29.86 -     * As side effect the status is cached. Hence it must
   29.87 -     * not be called from AWT.
   29.88 -     *
   29.89 -     * @return status or <code>null</code> for unknown
   29.90 -     */
   29.91 -    public static FileProperties getRepositoryMeta(FileObject fileObject) {
   29.92 -
   29.93 -        assert SwingUtilities.isEventDispatchThread() == false;
   29.94 -
   29.95 -        if (fileObject == null) return null;
   29.96 -
   29.97 -        FileProperties fprops = Repository.get(fileObject);
   29.98 -        // do not invalidate cached data if repository returns null due to command failure
   29.99 -        if (fprops != null) setMeta(fileObject, fprops);
  29.100 -        return fprops;
  29.101 -    }
  29.102 -
  29.103 -    /**
  29.104 -     * Instruct system to load data from slow layers. Data are actualy delivered
  29.105 -     * sometimes in future. It's possible to attach a listener to get notified.
  29.106 -     *
  29.107 -     * @param fileObject
  29.108 -     */
  29.109 -    public static void prepareMeta(FileObject fileObject) {
  29.110 -        if (fileObject == null) return;
  29.111 -        Statistics.request();
  29.112 -        if (Memory.get(fileObject) != null) {
  29.113 -            Statistics.memoryHit();
  29.114 -            return;
  29.115 -        }
  29.116 -        Disk.prepareMeta(fileObject);
  29.117 -    }
  29.118 -
  29.119 -    /**
  29.120 -     * Request cached status. Handled promptly but can return
  29.121 -     * unknown rather often.
  29.122 -     *
  29.123 -     * @return status or <code>null</code> for unknown
  29.124 -     */
  29.125 -    public static FileProperties getCachedMeta(FileObject fileObject) {
  29.126 -        if (fileObject == null) return null;
  29.127 -
  29.128 -        Statistics.request();
  29.129 -        FileProperties fprops = Memory.get(fileObject);
  29.130 -        if (fprops != null) {
  29.131 -            Statistics.memoryHit();
  29.132 -            return fprops;
  29.133 -        }
  29.134 -
  29.135 -        assert SwingUtilities.isEventDispatchThread() == false;
  29.136 -
  29.137 -        fprops = Disk.get(fileObject);
  29.138 -        if (fprops != null) {
  29.139 -            Statistics.diskHit();
  29.140 -            Memory.put(fileObject, fprops);
  29.141 -            return fprops;
  29.142 -        }
  29.143 -
  29.144 -        return null;
  29.145 -    }
  29.146 -
  29.147 -    /**
  29.148 -     * Populate cache by given attributes. Makes them immutable.
  29.149 -     * @param status new status or <code<null</code> for invalidating
  29.150 -     */
  29.151 -    public static void setMeta(FileObject fileObject, FileProperties status) {
  29.152 -        assert justFiring == false;
  29.153 -        if (fileObject == null) return;
  29.154 -        if (status != null) status.freeze();
  29.155 -        Memory.put(fileObject, status);
  29.156 -        Disk.put(fileObject, status);
  29.157 -    }
  29.158 -
  29.159 -    /**
  29.160 -     * Populates the cache by given attributes. It tries to locate
  29.161 -     * live fileobject. If it fails it silently stores the status
  29.162 -     * without distributing change event.
  29.163 -     * @param file
  29.164 -     */
  29.165 -    public static void setMeta(File file, FileProperties status) {
  29.166 -        assert justFiring == false;
  29.167 -        status.freeze();
  29.168 -        FileObject fo = Memory.getLiveFileObject(file);
  29.169 -        if (fo != null) {
  29.170 -            setMeta(fo, status);
  29.171 -        } else {
  29.172 -            Memory.putDeadFile(file, status);
  29.173 -            Disk.put(file, status);
  29.174 -        }
  29.175 -    }
  29.176 -
  29.177 -    public void addTurboListener(TurboListener l) {
  29.178 -        List clone = new ArrayList(Arrays.asList(listeners));
  29.179 -        clone.add(l);
  29.180 -        listeners = (TurboListener[]) clone.toArray(new TurboListener[clone.size()]);
  29.181 -    }
  29.182 -
  29.183 -    public void removeTurboListener(TurboListener l) {
  29.184 -        List clone = new ArrayList(Arrays.asList(listeners));
  29.185 -        clone.remove(l);
  29.186 -        listeners = (TurboListener[]) clone.toArray(new TurboListener[clone.size()]);
  29.187 -    }
  29.188 -
  29.189 -    static void fireTurboEvent(FileObject fileObject, FileProperties status) {
  29.190 -        try {
  29.191 -            justFiring = true;
  29.192 -            if (listeners.length > 0) {
  29.193 -                TurboEvent e = new TurboEvent(fileObject, status);
  29.194 -                for (int i=0; i<listeners.length; i++) {
  29.195 -                    listeners[i].turboChanged(e);
  29.196 -                }
  29.197 -            }
  29.198 -        } finally {
  29.199 -            justFiring = false;
  29.200 -        }
  29.201 -    }
  29.202 -
  29.203 -    /**
  29.204 -     * AbstractFileSystem allows hooks using customized
  29.205 -     * FileObject references. It should be called by AbstractFileSystems
  29.206 -     * subclasses only.
  29.207 -     */
  29.208 -    public static FileReference createFileReference(FileObject fileObject) {
  29.209 -        return new FileReference(fileObject);
  29.210 -    }
  29.211 -
  29.212 -    /**
  29.213 -     * For testing purposes only. It allows to temporary keep two
  29.214 -     * cache implementations. E.g. client code that does no break
  29.215 -     * indentation of the old code:
  29.216 -     * <pre>
  29.217 -     *   if (Turbo.implemented()) {
  29.218 -     *       // use cool approach
  29.219 -     *       return;
  29.220 -     *   } // else use old cumbersome approach
  29.221 -     * </pre>
  29.222 -     * @deprecated client's code should use Turbo unconditionally...
  29.223 -     */
  29.224 -    public static boolean implemented() {
  29.225 -        return ENABLED;
  29.226 -    }
  29.227 -
  29.228 -    /**
  29.229 -     * You do not need this until you need add event listeners. There are static
  29.230 -     * methods for all other oprations. Listeners must be added on default
  29.231 -     * instance in order to support WeakListeners. WeakListeners
  29.232 -     * are crucial here as Turbo's lifetime (it's static) exceeds
  29.233 -     * lifetime of most potentional listeners.
  29.234 -     */
  29.235 -    public static Turbo singleton() {
  29.236 -        return SINGLETON;
  29.237 -    }
  29.238 -
  29.239 -    /**
  29.240 -     * Notifies turbo tha t it's not needed anymore.
  29.241 -     * It comes on IDE shutdown.
  29.242 -     */
  29.243 -    public static void shutdown() {
  29.244 -        Statistics.shutdown();
  29.245 -        System.out.println("Thank you for testing netbeans.experimental.useVcsTurbo!"); // NOI18N
  29.246 -        System.out.println("  Statistics goes to " + Statistics.logPath()); // NOI18N
  29.247 -    }
  29.248 -
  29.249 -}
    30.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/TurboEvent.java	Mon Sep 06 12:19:32 2004 +0000
    30.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    30.3 @@ -1,51 +0,0 @@
    30.4 -/*
    30.5 - *                 Sun Public License Notice
    30.6 - *
    30.7 - * The contents of this file are subject to the Sun Public License
    30.8 - * Version 1.0 (the "License"). You may not use this file except in
    30.9 - * compliance with the License. A copy of the License is available at
   30.10 - * http://www.sun.com/
   30.11 - *
   30.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   30.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   30.14 - * Microsystems, Inc. All Rights Reserved.
   30.15 - */
   30.16 -package org.netbeans.modules.vcscore.turbo;
   30.17 -
   30.18 -import org.openide.filesystems.FileObject;
   30.19 -
   30.20 -import java.util.EventObject;
   30.21 -
   30.22 -/**
   30.23 - * Event describing FileObject's FileProperties change.
   30.24 - * It's fired only for <b>live</b> FileObjects. Operations that
   30.25 - * set status of not-yet created FileObjects do not raise it.
   30.26 - * Above comes from assumtion that nobody cares about
   30.27 - * listening on status changes for non-FileObjects. Listening
   30.28 - * is typically UI frontend requirement. The UI'll be most
   30.29 - * propably holding (live) FileObjects.
   30.30 - *
   30.31 - * @author Petr Kuzel
   30.32 - */
   30.33 -public final class TurboEvent extends EventObject {
   30.34 -
   30.35 -    private final FileObject target;
   30.36 -
   30.37 -    private final FileProperties fprops;
   30.38 -
   30.39 -    TurboEvent(FileObject fileObject, FileProperties fprops) {
   30.40 -        super(Turbo.singleton());
   30.41 -        this.target = fileObject;
   30.42 -        this.fprops = fprops;
   30.43 -    }
   30.44 -
   30.45 -    /** Gets target file object whose metadata have changed. */
   30.46 -    public FileObject getFileObject() {
   30.47 -        return target;
   30.48 -    }
   30.49 -
   30.50 -    /** Gets actual FileProperties value. */
   30.51 -    public FileProperties getFileProperties() {
   30.52 -        return fprops;
   30.53 -    }
   30.54 -}
    31.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/TurboListener.java	Mon Sep 06 12:19:32 2004 +0000
    31.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    31.3 @@ -1,33 +0,0 @@
    31.4 -/*
    31.5 - *                 Sun Public License Notice
    31.6 - *
    31.7 - * The contents of this file are subject to the Sun Public License
    31.8 - * Version 1.0 (the "License"). You may not use this file except in
    31.9 - * compliance with the License. A copy of the License is available at
   31.10 - * http://www.sun.com/
   31.11 - *
   31.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   31.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   31.14 - * Microsystems, Inc. All Rights Reserved.
   31.15 - */
   31.16 -package org.netbeans.modules.vcscore.turbo;
   31.17 -
   31.18 -import java.util.EventListener;
   31.19 -
   31.20 -/**
   31.21 - * Turbo.setMeta callbacks contract. Should be implemented
   31.22 - * by filesystems only. It must not wait to any threads.
   31.23 - *
   31.24 - * @author Petr Kuzel
   31.25 - */
   31.26 -public interface TurboListener extends EventListener {
   31.27 -
   31.28 -    /**
   31.29 -     * Called after {@link Turbo#setMeta} invocation to notify
   31.30 -     * external observers. It guaranteed that status information
   31.31 -     * is available for fast in-memory layer retrieval. It
   31.32 -     * also comes with the event.
   31.33 -     */
   31.34 -    void turboChanged(TurboEvent e);
   31.35 -
   31.36 -}
    32.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/TurboUtil.java	Mon Sep 06 12:19:32 2004 +0000
    32.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    32.3 @@ -1,232 +0,0 @@
    32.4 -/*
    32.5 - *                 Sun Public License Notice
    32.6 - *
    32.7 - * The contents of this file are subject to the Sun Public License
    32.8 - * Version 1.0 (the "License"). You may not use this file except in
    32.9 - * compliance with the License. A copy of the License is available at
   32.10 - * http://www.sun.com/
   32.11 - *
   32.12 - * The Original Code is NetBeans. The Initial Developer of the Original
   32.13 - * Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
   32.14 - * Microsystems, Inc. All Rights Reserved.
   32.15 - */
   32.16 -package org.netbeans.modules.vcscore.turbo;
   32.17 -
   32.18 -import org.openide.filesystems.FileObject;
   32.19 -import org.openide.filesystems.FileSystem;
   32.20 -import org.netbeans.modules.vcscore.FileReaderListener;
   32.21 -import org.netbeans.modules.vcscore.DirReaderListener;
   32.22 -import org.netbeans.modules.vcscore.VcsDirContainer;
   32.23 -import org.netbeans.modules.vcscore.caching.RefreshCommandSupport;
   32.24 -import org.netbeans.modules.vcscore.caching.StatusFormat;
   32.25 -import org.netbeans.modules.vcscore.util.VcsUtilities;
   32.26 -
   32.27 -import java.util.*;
   32.28 -
   32.29 -/**
   32.30 - * Various utility methods eliminating boilerplate constructions
   32.31 - * over {@link Turbo} API goes here.
   32.32 - *
   32.33 - * @author Petr Kuzel
   32.34 - */
   32.35 -public final class TurboUtil {
   32.36 -
   32.37 -    // TODO what status to set here, we want to say that it's not local
   32.38 -    private static final String STATUS_VERSIONED_FOLDER = "";
   32.39 -
   32.40 -    public static FileObject[] listFolders(FileObject fileObject) {
   32.41 -        FileObject fo[] = fileObject.getChildren();
   32.42 -        List ret = new ArrayList(fo.length);
   32.43 -        for (int i = 0; i<fo.length; i++) {
   32.44 -            if (fo[i].isFolder()) {
   32.45 -                ret.add(fo[i]);
   32.46 -            }
   32.47 -        }
   32.48 -        return (FileObject[]) ret.toArray(new FileObject[ret.size()]);
   32.49 -    }
   32.50 -
   32.51 -    /**
   32.52 -     * Iterates over folder children and updates status from repository
   32.53 -     */
   32.54 -    public static void refreshFolder(FileObject folder) {
   32.55 -        if (folder.isFolder() == false) return;
   32.56 -        Turbo.getRepositoryMeta(folder); // it refreshes whole folder
   32.57 -//        FileObject[] files = folder.getChildren();
   32.58 -//        // XXX it would be faster to issue batch command instead of set of commands
   32.59 -//        for (int i = 0; i < files.length; i++) {
   32.60 -//            FileObject fileObject = files[i];
   32.61 -//            Turbo.getRepositoryMeta(fileObject);
   32.62 -//        }
   32.63 -    }
   32.64 -
   32.65 -    /**
   32.66 -     * Recursively iterates over all children and updates status from repository
   32.67 -     */
   32.68 -    public static void refreshRecursively(FileObject folder) {
   32.69 -        Turbo.getRepositoryMeta(folder);
   32.70 -        if (folder.isFolder() == false) return;
   32.71 -
   32.72 -        FileObject[] files = folder.getChildren();
   32.73 -        // XXX it would be faster to issue batch command instead of set of commands
   32.74 -        for (int i = 0; i < files.length; i++) {
   32.75 -            FileObject fileObject = files[i];
   32.76 -            if (fileObject.isFolder()) {
   32.77 -                refreshRecursively(fileObject); // recursion
   32.78 -            }
   32.79 -        }
   32.80 -    }
   32.81 -
   32.82 -    /**
   32.83 -     * Populates cache by command output ({@link VcsCache#readDirFinished}).
   32.84 -     *
   32.85 -     * @param fileSystem filesystem that allows to properly match command
   32.86 -     *   output to fileobjects
   32.87 -     * @param path directory that was read by VcsDirReader relative to the filesystem root
   32.88 -     * @param rawData vector of <CODE>String[]</CODE> that describes files and subdirectories
   32.89 -     * @param success whether the refresh command succeeded.
   32.90 -     */
   32.91 -    public static void populateCache(FileSystem fileSystem, String path, Collection rawData, boolean success) {
   32.92 -
   32.93 -        // XXX for dir results we can tip local files
   32.94 -
   32.95 -//        for (Iterator it = rawData.iterator(); it.hasNext(); ) {
   32.96 -//            String[] elements = (String[]) it.next();
   32.97 -//            String elemName = RefreshCommandSupport.getFileName(elements);
   32.98 -//        }
   32.99 -
  32.100 -        if (success == false) return;
  32.101 -
  32.102 -        // path is folder relative to FS root then raw data contains children
  32.103 -        FileObject fileObject = fileSystem.findResource(path);    // "" denotes root
  32.104 -        FileProperties fprops;
  32.105 -
  32.106 -        if (fileObject.isFolder()) {
  32.107 -
  32.108 -            // TODO can I mark here folder as versioned?
  32.109 -            fprops = new FileProperties(fileObject.getNameExt());
  32.110 -            fprops.setStatus(STATUS_VERSIONED_FOLDER);
  32.111 -            Turbo.setMeta(fileObject, fprops);
  32.112 -
  32.113 -            // TODO set [local] and [ignored] statuses overhere
  32.114 -            FileObject[] localCandidates = fileObject.getChildren();
  32.115 -            Iterator it = rawData.iterator();
  32.116 -            while (it.hasNext()) {
  32.117 -                String[] next = (String[]) it.next();
  32.118 -                String fileName = next[StatusFormat.ELEMENT_INDEX_FILE_NAME]; // contains trailing '/' (or pathSeparator?) for dirs
  32.119 -                String status = next[StatusFormat.ELEMENT_INDEX_STATUS];
  32.120 -                String revision = next[StatusFormat.ELEMENT_INDEX_REVISION];
  32.121 -
  32.122 -                FileObject fo = fileObject.getFileObject(fileName);
  32.123 -
  32.124 -                if (fo == null) {
  32.125 -                    // TODO it disappeared
  32.126 -                    System.out.println("[turbo] FO=" + fo + " child=" + fileName + " disappeared.");
  32.127 -                } else {
  32.128 -                    if (fo.isData()) {
  32.129 -                        fprops = new FileProperties();
  32.130 -                        fprops.setName(fileName);
  32.131 -                        fprops.setStatus(status);
  32.132 -                        fprops.setRevision(revision);
  32.133 -                        Turbo.setMeta(fo, fprops);
  32.134 -                    } else {
  32.135 -                        fprops = new FileProperties();
  32.136 -                        fprops.setName(fileName);
  32.137 -                        fprops.setStatus(status == null ? STATUS_VERSIONED_FOLDER : status);
  32.138 -                        Turbo.setMeta(fo, fprops);
  32.139 -                    }
  32.140 -                }
  32.141 -            }
  32.142 -
  32.143 -        } else {  // data
  32.144 -
  32.145 -            String[] next = (String[]) rawData.iterator().next();
  32.146 -            String fileName = next[StatusFormat.ELEMENT_INDEX_FILE_NAME]; // contains trailing '/' (or pathSeparator?) for dirs
  32.147 -            String status = next[StatusFormat.ELEMENT_INDEX_STATUS];
  32.148 -            String revision = next[StatusFormat.ELEMENT_INDEX_REVISION];
  32.149 -
  32.150 -            fprops = new FileProperties();
  32.151 -            fprops.setName(fileName);
  32.152 -            fprops.setStatus(status);
  32.153 -            fprops.setRevision(revision);
  32.154 -            Turbo.setMeta(fileObject, fprops);
  32.155 -        }
  32.156 -    }
  32.157 -
  32.158 -
  32.159 -    /**
  32.160 -     * Returns FileReaderListener implementation that populates
  32.161 -     * the cache from the command data execuded over given FS.
  32.162 -     * <p>
  32.163 -     * It's used by e.g. LIST command.
  32.164 -     *
  32.165 -     * @param fs filesystem that allows to properly match command
  32.166 -     *   output to fileobjects
  32.167 -     */
  32.168 -    public static FileReaderListener fileReaderListener(FileSystem fs) {
  32.169 -        return new FileReaderListenerImpl(fs);
  32.170 -    }
  32.171 -
  32.172 -
  32.173 -    /**
  32.174 -     * Returns DirReaderListener implementation that populates
  32.175 -     * the cache from the command data execuded over given FS.
  32.176 -     *
  32.177 -     * @param fs filesystem that allows to properly match command
  32.178 -     *   output to fileobjects
  32.179 -     */
  32.180 -    public static DirReaderListener dirReaderListener(FileSystem fs) {
  32.181 -        return new DirReaderListenerImpl(fs);
  32.182 -    }
  32.183 -
  32.184 -    /**
  32.185 -     * Populates the cache from command output data.
  32.186 -     */
  32.187 -    static final class FileReaderListenerImpl implements FileReaderListener {
  32.188 -
  32.189 -        private final FileSystem fileSystem;
  32.190 -
  32.191 -        private FileReaderListenerImpl(FileSystem fileSystem) {
  32.192 -            this.fileSystem = fileSystem;
  32.193 -        }
  32.194 -
  32.195 -        public void readFileFinished(String path, Collection rawData) {
  32.196 -            populateCache(fileSystem, path, rawData, true);
  32.197 -        }
  32.198 -
  32.199 -    }
  32.200 -
  32.201 -    static final class DirReaderListenerImpl implements DirReaderListener {
  32.202 -
  32.203 -        private final FileSystem fileSystem;
  32.204 -
  32.205 -        private DirReaderListenerImpl(FileSystem fileSystem) {
  32.206 -            this.fileSystem = fileSystem;
  32.207 -        }
  32.208 -
  32.209 -        public void readDirFinished(String path, Collection rawData, boolean success) {
  32.210 -            populateCache(fileSystem, path, rawData, success);
  32.211 -        }
  32.212 -
  32.213 -        // it's typically comming from refresh recursively command all other commands
  32.214 -        // use sequence of readDirFinished or readFileFinished  TODO what's diference? diferent contract for the same purpose?
  32.215 -        public void readDirFinishedRecursive(String path, VcsDirContainer rawData, boolean success) {
  32.216 -            // TODO check this it's taken from sample debuging on linux
  32.217 -            // VcsCache:888
  32.218 -
  32.219 -            // path is folder relative to FS root then raw data contains children
  32.220 -            FileObject folder = fileSystem.findResource(path);    // "" denotes root
  32.221 -            assert folder.isFolder();
  32.222 -
  32.223 -            Map fileToRawData = (Map) rawData.getElement(); // it's a hashmap<name, rawData.element>
  32.224 -            Collection extractedRawData = fileToRawData.values();
  32.225 -            populateCache(fileSystem, path, extractedRawData, success);
  32.226 -
  32.227 -            VcsDirContainer subdirs[] = rawData.getSubdirContainers();
  32.228 -            for (int i = 0; i < subdirs.length; i++) {
  32.229 -                VcsDirContainer container = subdirs[i];
  32.230 -                String containerPath = container.getPath();  // path relative to fs root
  32.231 -                readDirFinishedRecursive(containerPath, container, success);  // recursion
  32.232 -            }
  32.233 -        }
  32.234 -    }
  32.235 -}
    33.1 --- a/vcscore/src/org/netbeans/modules/vcscore/turbo/package.html	Mon Sep 06 12:19:32 2004 +0000
    33.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    33.3 @@ -1,86 +0,0 @@
    33.4 -<h2>The VCS File Attributes Implementation</h2>
    33.5 -
    33.6 -The implementation speedups VCS status access for
    33.7 -remote repositories. It caches last know repository
    33.8 -state. The state is assumed to not change too often.
    33.9 -Note that final state check reponsibility is on
   33.10 -particular VCS command. It's by nature distributed system
   33.11 -and no shared state information exists.
   33.12 -E.g. <code>cvs commit</code> must fail if someone have
   33.13 -commited the same file into repository 1ms before.
   33.14 -
   33.15 -<p>
   33.16 -The {@link Turbo} and {@link IgnoreList} implementaions have two main abstract goals:
   33.17 -<ul>
   33.18 -<li>reliability (#39817), here achieved by simplicity
   33.19 -<li>performance and scalability (#41012) similar to local operations
   33.20 -</ul>
   33.21 -
   33.22 -<p>
   33.23 -They are responsible for:
   33.24 -<ul>
   33.25 -<li>STATUS: keeping last known status (up-to-date, localy modified, ....)
   33.26 -<li>UNKNOWN: model unknown status
   33.27 -<li>NOTIFICATIONS: support external status change listeners
   33.28 -<li>UPDATED_ON: holding retrieval date of last known status
   33.29 -<li>LEVELS: client can put strategy contraints
   33.30 -<li>IGNORELIST: keep merged .ignorelists
   33.31 -<ul>
   33.32 -
   33.33 -<h3>Simplifications</h3>
   33.34 -
   33.35 -It works over {@link FileSystem} it's expected that we do not need
   33.36 -to store FilePropeties for non FileObjects. It's safe
   33.37 -to call <code>findResource(path)</code> in FileSystem
   33.38 -implementation except <code>children(folderName)</code> method.
   33.39 -
   33.40 -<p>
   33.41 -Memory layer is not hierachical but two simple plain maps
   33.42 -FileObject to FilePropeties. Refs map content is driven by
   33.43 -FileReference lifetime. Cache map holds few recent
   33.44 -values for unreachable fileobjects.
   33.45 -
   33.46 -<p>
   33.47 -Threading - no extra thread is spawned. All operation are
   33.48 -done synchronously. Clients are warned that some methods
   33.49 -can hang forever. It may need to be fixed in future by setting
   33.50 -timeouts (and possibly killing worker threads). However client's
   33.51 -interface will stay the same.
   33.52 -
   33.53 -<p>
   33.54 -Debuggibility - small contract containing mainly methods without
   33.55 -behaviour modification parameters (i.e. dedicate methods instead
   33.56 -of one method taking a strategy constant passed all around and
   33.57 -invisible on thread dumps). Some asserts scattered all around code.
   33.58 -
   33.59 -<p>
   33.60 -No pluggability. There is only one implementation without
   33.61 -possibility to plug-in different one (vs. the original approach
   33.62 -allowing for diferent cache implementation for javacvs filesystem).
   33.63 -It could be hopefully dropped on request. Important advantage remains -
   33.64 -simple contract counting few methods.
   33.65 -
   33.66 -<h3>Status</h3>
   33.67 -
   33.68 -WORK IN PROGRESS - SHARING IDEA
   33.69 -
   33.70 -<p>
   33.71 -Existing client code contains new code paths guarded by <code>Turbo.implemented()</code>
   33.72 -checks. These are not ready to be used right now. There are still missing
   33.73 -following client code (filesystem and commands) conversions
   33.74 -(it obviously excludes cache and caching packages):
   33.75 -<ul>
   33.76 -  <li>objectidentity package implements CacheHandlerListener, there is nothing like that in
   33.77 -     simplified implementation
   33.78 -  <li>VcsFileSystem.getRealStatus() used in search, it also implements CacheHandlerListener
   33.79 -     to perform refresh
   33.80 -  <li>VcsFilesystem.List.children() support for filtering out DEAD and scheduled files.
   33.81 -      InList context we cannot use FileObject keyed access. Try VisibilityQuery approach.
   33.82 -  <li>RefreshCommandSupport in VCSFileSystem annotation and cvscore.cmdline formatting
   33.83 -  <li>status management translating abstract statuses to profile specifics statuses and vice versa
   33.84 -</ul>
   33.85 -
   33.86 -<p>
   33.87 -Documenatation and tests are missing... Special test VCS profile should be
   33.88 -created. It allows backdoor operations - programatically setting its state.
   33.89 -It allows to simulate various situations.
    34.1 --- a/vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java	Mon Sep 06 12:19:32 2004 +0000
    34.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/util/VcsUtilities.java	Mon Sep 06 16:41:47 2004 +0000
    34.3 @@ -35,7 +35,6 @@
    34.4  import org.openide.util.io.NbObjectOutputStream;
    34.5  
    34.6  import org.netbeans.modules.vcscore.VcsAttributes;
    34.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    34.8  import org.openide.util.Lookup;
    34.9  import org.openide.util.RequestProcessor;
   34.10  
   34.11 @@ -1077,8 +1076,6 @@
   34.12                                               final String path,
   34.13                                               final org.netbeans.modules.vcscore.VcsFileSystem.IgnoreListSupport ignSupport) {
   34.14  
   34.15 -        assert Turbo.implemented() == false;
   34.16 -        
   34.17          org.netbeans.modules.vcscore.cache.CacheDir parent = dir.getParent();
   34.18          //System.out.println("createIgnoreList("+dir.getAbsolutePath()+", "+path+"), parent = "+((parent == null) ? "null" : parent.getAbsolutePath()));
   34.19          List ignoreList = null;
    35.1 --- a/vcscore/src/org/netbeans/modules/vcscore/versioning/VersioningFileSystem.java	Mon Sep 06 12:19:32 2004 +0000
    35.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/versioning/VersioningFileSystem.java	Mon Sep 06 16:41:47 2004 +0000
    35.3 @@ -27,7 +27,6 @@
    35.4  import org.netbeans.modules.vcscore.actions.VersioningExplorerAction;
    35.5  import org.netbeans.modules.vcscore.caching.FileStatusProvider;
    35.6  import org.netbeans.modules.vcscore.VcsFileSystem;
    35.7 -import org.netbeans.modules.vcscore.turbo.Turbo;
    35.8  
    35.9  /**
   35.10   * Adds support for versioned input streams to VcsFileSystems.
   35.11 @@ -202,7 +201,6 @@
   35.12       *         is defined.
   35.13       */
   35.14      public FileStatusProvider getFileStatusProvider() {
   35.15 -        assert Turbo.implemented() == false;
   35.16          return null;
   35.17      }
   35.18  
    36.1 --- a/vcscore/src/org/netbeans/modules/vcscore/versioning/impl/FolderNode.java	Mon Sep 06 12:19:32 2004 +0000
    36.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/versioning/impl/FolderNode.java	Mon Sep 06 16:41:47 2004 +0000
    36.3 @@ -40,8 +40,6 @@
    36.4  
    36.5  import org.netbeans.modules.vcscore.caching.FileStatusProvider;
    36.6  import org.netbeans.modules.vcscore.versioning.VersioningFileSystem;
    36.7 -import org.netbeans.modules.vcscore.turbo.FileProperties;
    36.8 -import org.netbeans.modules.vcscore.turbo.Turbo;
    36.9  
   36.10  /**
   36.11   * Visualizes folder as much closely to FolderNode as possible
   36.12 @@ -319,7 +317,6 @@
   36.13      }
   36.14  
   36.15      private FileStatusProvider getFileStatusProvider() {
   36.16 -        assert Turbo.implemented() == false;
   36.17          VersioningFileSystem vfs;
   36.18          try {
   36.19              vfs = VersioningFileSystem.findFor(file.getFileSystem());
   36.20 @@ -335,15 +332,6 @@
   36.21       * @return Value of property status.
   36.22       */
   36.23      public String getStatus() {
   36.24 -        if (Turbo.implemented()) {
   36.25 -            if (status == null) {
   36.26 -                FileProperties fprops = Turbo.getMeta(file);
   36.27 -                status = FileProperties.getStatus(fprops);
   36.28 -            }
   36.29 -            return status;
   36.30 -        }
   36.31 -
   36.32 -        // original implementation
   36.33          if (status == null) {
   36.34              FileStatusProvider statusProvider = getFileStatusProvider();
   36.35              if (statusProvider == null) return null;
   36.36 @@ -358,15 +346,6 @@
   36.37       * @return Value of property locker.
   36.38       */
   36.39      public String getLocker() {
   36.40 -        if (Turbo.implemented()) {
   36.41 -            if (locker == null) {
   36.42 -                FileProperties fprops = Turbo.getMeta(file);
   36.43 -                locker = fprops != null ? fprops.getLocker() : null;
   36.44 -            }
   36.45 -            return locker;
   36.46 -        }
   36.47 -
   36.48 -        // original implementation
   36.49          if (locker == null) {
   36.50              FileStatusProvider statusProvider = getFileStatusProvider();
   36.51              if (statusProvider == null) return null;
   36.52 @@ -381,15 +360,6 @@
   36.53       * @return Value of property revision.
   36.54       */
   36.55      public String getRevision() {
   36.56 -        if (Turbo.implemented()) {
   36.57 -            if (revision == null) {
   36.58 -                FileProperties fprops = Turbo.getMeta(file);
   36.59 -                revision = fprops != null ? fprops.getRevision() : null;
   36.60 -            }
   36.61 -            return revision;
   36.62 -        }
   36.63 -
   36.64 -        // original implementation
   36.65          if (revision == null) {
   36.66              FileStatusProvider statusProvider = getFileStatusProvider();
   36.67              if (statusProvider == null) return null;
   36.68 @@ -404,15 +374,6 @@
   36.69       * @return Value of property sticky.
   36.70       */
   36.71      public String getSticky() {
   36.72 -        if (Turbo.implemented()) {
   36.73 -            if (sticky == null) {
   36.74 -                FileProperties fprops = Turbo.getMeta(file);
   36.75 -                sticky = fprops != null ? fprops.getSticky() : null;
   36.76 -            }
   36.77 -            return sticky;
   36.78 -        }
   36.79 -
   36.80 -        // original implementation
   36.81          if (sticky == null) {
   36.82              FileStatusProvider statusProvider = getFileStatusProvider();
   36.83              if (statusProvider == null) return null;
   36.84 @@ -429,34 +390,29 @@
   36.85                  String newState;
   36.86                  String oldState;
   36.87                  FileStatusProvider statusProvider = null;
   36.88 -                FileProperties fprops = null;
   36.89  
   36.90 -                if (Turbo.implemented()) {
   36.91 -                    fprops = Turbo.getMeta(file);
   36.92 -                } else {
   36.93                      statusProvider = getFileStatusProvider();
   36.94                      if (statusProvider == null) return;
   36.95 -                }
   36.96  
   36.97 -                newState = Turbo.implemented() ? FileProperties.getStatus(fprops) : statusProvider.getFileStatus(name);
   36.98 +                newState = statusProvider.getFileStatus(name);
   36.99                  if (status == null && newState != null || status != null && !status.equals(newState)) {
  36.100                      oldState = status;
  36.101                      status = newState;
  36.102                      firePropertyChange(PROP_STATUS, oldState, newState);
  36.103                  }
  36.104 -                newState = Turbo.implemented() ? fprops.getLocker() : statusProvider.getFileLocker(name);
  36.105 +                newState = statusProvider.getFileLocker(name);
  36.106                  if (locker == null && newState != null || locker != null && !locker.equals(newState)) {
  36.107                      oldState = locker;
  36.108                      locker = newState;
  36.109                      firePropertyChange(PROP_LOCKER, oldState, newState);
  36.110                  }
  36.111 -                newState = Turbo.implemented() ? fprops.getRevision() : statusProvider.getFileRevision(name);
  36.112 +                newState = statusProvider.getFileRevision(name);
  36.113                  if (revision == null && newState != null || revision != null && !revision.equals(newState)) {
  36.114                      oldState = revision;
  36.115                      revision = newState;
  36.116                      firePropertyChange(PROP_REVISION, oldState, newState);
  36.117                  }
  36.118 -                newState = Turbo.implemented() ? fprops.getSticky() : statusProvider.getFileSticky(name);
  36.119 +                newState = statusProvider.getFileSticky(name);
  36.120                  if (sticky == null && newState != null || sticky != null && !sticky.equals(newState)) {
  36.121                      oldState = sticky;
  36.122                      sticky = newState;