Expert mode can be set, splitloaders_jan2001_build1
authormentlicher@netbeans.org
Tue, 02 Jan 2001 15:48:43 +0000
changeset 7624e77ff04cf94
parent 761 46ab0c716e8f
child 763 0bb7eefb51a7
Expert mode can be set,
serialize the number of finished commands which are to be kept,
Javadoc added.
vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java
     1.1 --- a/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Tue Jan 02 15:40:55 2001 +0000
     1.2 +++ b/vcscore/src/org/netbeans/modules/vcscore/VcsFileSystem.java	Tue Jan 02 15:48:43 2001 +0000
     1.3 @@ -34,6 +34,7 @@
     1.4  import org.openide.loaders.DataObject;
     1.5  import org.openide.nodes.Node;
     1.6  import org.openide.nodes.Children;
     1.7 +import org.openide.util.Utilities;
     1.8  
     1.9  import org.netbeans.modules.vcscore.cache.CacheHandlerListener;
    1.10  import org.netbeans.modules.vcscore.cache.CacheHandlerEvent;
    1.11 @@ -59,8 +60,6 @@
    1.12      private static ResourceBundle resourceBundle = null;
    1.13      
    1.14      private transient Hashtable commandsByName=null;
    1.15 -    //private transient Vector mainCommands = null;
    1.16 -    //private transient Vector revisionCommands = null;
    1.17  
    1.18      protected static final int REFRESH_TIME = 15000; // This is default in LocalFileSystem
    1.19      protected volatile int refreshTimeToSet = REFRESH_TIME;
    1.20 @@ -71,7 +70,9 @@
    1.21      private static final String LOCK_FILES_ON = "LOCKFILES"; // NOI18N
    1.22      private static final String PROMPT_FOR_LOCK_ON = "PROMPTFORLOCK"; // NOI18N
    1.23  
    1.24 -    public static final String  VAR_QUOTING = "QUOTING"; // NOI18N
    1.25 +    public static final String VAR_QUOTING = "QUOTING"; // NOI18N
    1.26 +    public static final String VAR_EXPERT_MODE = "EXPERT_MODE"; // NOI18N
    1.27 +
    1.28      private static final String DEFAULT_QUOTING_VALUE = "\\\\\""; // NOI18N
    1.29  
    1.30      private static final String DEFAULT_CACHE_ID = "VCS_Cache"; // NOI18N
    1.31 @@ -96,7 +97,7 @@
    1.32       * The name of the variable for the local additional parameters.
    1.33       */
    1.34      private static final String USER_PARAM = "USER_PARAM";
    1.35 -
    1.36 +    
    1.37      private static int last_refreshTime = REFRESH_TIME;
    1.38      private static volatile File last_rootFile = new File (System.getProperty("user.home")); // NOI18N
    1.39  
    1.40 @@ -139,10 +140,6 @@
    1.41      private transient VcsAction action = null;
    1.42      private transient VcsFactory factory = null;
    1.43  
    1.44 -    //private transient ErrorCommandDialog errorDialog = null;
    1.45 -    //private transient volatile boolean lastCommandState = true;
    1.46 -    //private transient volatile boolean lastCommandFinished = true;
    1.47 -
    1.48      private transient Vector unimportantNames = null;
    1.49      private Boolean processUnimportantFiles = Boolean.FALSE;
    1.50  
    1.51 @@ -182,17 +179,24 @@
    1.52      
    1.53      private volatile boolean acceptUserParams = false;
    1.54      
    1.55 +    /** The expert mode. When true, the user might be prompted for other options.
    1.56 +     */
    1.57 +    private boolean expertMode = false;
    1.58 +    
    1.59      /**
    1.60       * Whether to run command when doing refresh of folders. Recommended to turn this property off when working off-line.
    1.61       */
    1.62      private boolean doCommandRefresh = true;
    1.63      
    1.64      private volatile transient CommandsPool commandsPool = null;
    1.65 +    private int numOfFinishedCmdsToCollect = CommandsPool.DEFAULT_NUM_OF_FINISHED_CMDS_TO_COLLECT;
    1.66      
    1.67      private ArrayList revisionListeners;
    1.68  
    1.69      private volatile boolean offLine = false;
    1.70  
    1.71 +    private Collection notModifiableStatuses = Collections.EMPTY_SET;
    1.72 +
    1.73      public boolean isLockFilesOn () { return lockFilesOn; }
    1.74      public void setLockFilesOn (boolean lock) { lockFilesOn = lock; }
    1.75      public boolean isPromptForLockOn () { return promptForLockOn; }
    1.76 @@ -240,6 +244,14 @@
    1.77      public String[] getUserParams() {
    1.78          return userParams;
    1.79      }
    1.80 +    
    1.81 +    public void setExpertMode(boolean expertMode) {
    1.82 +        this.expertMode = expertMode;
    1.83 +    }
    1.84 +    
    1.85 +    public boolean getExpertMode() {
    1.86 +        return expertMode;
    1.87 +    }
    1.88  
    1.89      public CommandsPool getCommandsPool() {
    1.90          return commandsPool;
    1.91 @@ -282,6 +294,10 @@
    1.92          }
    1.93      }
    1.94      
    1.95 +    protected void setNotModifiableStatuses(Collection notModifiableStatuses) {
    1.96 +        this.notModifiableStatuses = notModifiableStatuses;
    1.97 +    }
    1.98 +    
    1.99      /**
   1.100       * Get whether to perform the auto-refresh in the given directory path.
   1.101       * @param path The given directory path
   1.102 @@ -643,7 +659,11 @@
   1.103          if (annotationPattern == null) {
   1.104              annotationPattern = RefreshCommandSupport.DEFAULT_ANNOTATION_PATTERN;
   1.105          }
   1.106 +        if (notModifiableStatuses == null) {
   1.107 +            notModifiableStatuses = Collections.EMPTY_SET;
   1.108 +        }
   1.109          commandsPool = new CommandsPool(this);
   1.110 +        commandsPool.setCollectFinishedCmdsNum(numOfFinishedCmdsToCollect);
   1.111      }
   1.112  
   1.113  
   1.114 @@ -738,6 +758,7 @@
   1.115      private void writeObject(ObjectOutputStream out) throws IOException {
   1.116          //D.deb("writeObject() - saving bean"); // NOI18N
   1.117          // cache is transient
   1.118 +        numOfFinishedCmdsToCollect = commandsPool.getCollectFinishedCmdsNum();
   1.119          out.writeBoolean (true/*cache.isLocalFilesAdd ()*/); // for compatibility
   1.120          out.defaultWriteObject();
   1.121      }
   1.122 @@ -761,12 +782,20 @@
   1.123      }
   1.124  
   1.125  
   1.126 -    //-------------------------------------------
   1.127 +    /**
   1.128 +     * Set the file system's variables.
   1.129 +     * @param variables the vector of <code>VcsConfigVariable</code> objects.
   1.130 +     */
   1.131      public void setVariables(Vector variables) {
   1.132          //System.out.println("setVariables("+VcsUtilities.toSpaceSeparatedString(variables)+")");
   1.133          //D.deb ("setVariables()"); // NOI18N
   1.134          boolean containsCd = false;
   1.135 -        String cdValue = System.getProperty ("os.name").equals ("Windows NT") ? "cd /D" : "cd";
   1.136 +        // Windows != 95 && != 98 needs "cd /D" to change the directory accross disks !!!
   1.137 +        // Windows 95 || 98 do not recognize /D => change the directory accross disks is NOT possible by a single command !!!
   1.138 +        int os = Utilities.getOperatingSystem();
   1.139 +        String cdValue = (Utilities.isWindows()
   1.140 +                          && os != Utilities.OS_WIN95
   1.141 +                          && os != Utilities.OS_WIN98) ? "cd /D" : "cd";
   1.142          int len = variables.size ();
   1.143          VcsConfigVariable var;
   1.144          for(int i = 0; i < len; i++) {
   1.145 @@ -884,6 +913,7 @@
   1.146          //if (osName.indexOf("Win") >= 0) // NOI18N
   1.147          //module=module.replace('\\','/');
   1.148          result.put("ROOTDIR", VcsFileSystem.substractRootDir(rootDir, module)); // NOI18N
   1.149 +        result.put(VAR_EXPERT_MODE, expertMode ? "expert" : "");
   1.150  
   1.151          return result;
   1.152      }
   1.153 @@ -1377,9 +1407,9 @@
   1.154      }
   1.155  
   1.156  
   1.157 -    /**
   1.158 -     * Annotate a single file.
   1.159 +    /** Annotate a single file.
   1.160       * @params fullName The full path to the file.
   1.161 +     * @return the annotation string
   1.162       */
   1.163      public String annotateName(String fullName) {
   1.164          FileObject fo = findResource(fullName);
   1.165 @@ -1391,14 +1421,18 @@
   1.166          if (ext != null && ext.length() > 0) name += "."+ext;
   1.167          return annotateName(name, Collections.synchronizedSet(hset));
   1.168      }
   1.169 -    
   1.170 +
   1.171 +    /** Find the file object from a file path.
   1.172 +     * @param fullName the full path to the file
   1.173 +     * @return the file object of that file
   1.174 +     */
   1.175      public FileObject findFileObject(String fullName) {
   1.176          return findResource(fullName);
   1.177      }
   1.178  
   1.179 -    /**
   1.180 -     * Annotate the Data Object from a single file.
   1.181 +    /** Annotate the Data Object file.
   1.182       * @params fullName The full path to the file.
   1.183 +     * @return the annotation string
   1.184       */
   1.185      public String annotateDOName(String fullName) throws org.openide.loaders.DataObjectNotFoundException {
   1.186          FileObject fo = findResource(fullName);
   1.187 @@ -1411,11 +1445,13 @@
   1.188          return annotateName(fo.getName(), dobj.files());
   1.189      }
   1.190      
   1.191 -    //-------------------------------------------
   1.192 +    /** Annotate the set of files with additional version control attributes.
   1.193 +     * @param name the original annotation
   1.194 +     * @param files the files to annotate
   1.195 +     * @return the annotation string
   1.196 +     */
   1.197      public String annotateName(String name, Set files) {
   1.198          String result = name;
   1.199 -        String fullName = ""; // NOI18N
   1.200 -        //String fileName=""; // NOI18N
   1.201  
   1.202          Object[] oo = files.toArray();
   1.203          int len = oo.length;
   1.204 @@ -1426,32 +1462,13 @@
   1.205          if (statusProvider != null) {
   1.206              if (len == 1) {
   1.207                  FileObject ff = (FileObject) oo[0];
   1.208 -                fullName = ff.getPackageNameExt('/','.');
   1.209 +                String fullName = ff.getPackageNameExt('/','.');
   1.210                  result = RefreshCommandSupport.getStatusAnnotation(name, fullName, annotationPattern, statusProvider);
   1.211              } else {
   1.212                  ArrayList importantFiles = getImportantFiles(oo);
   1.213                  result = RefreshCommandSupport.getStatusAnnotation(name, importantFiles, annotationPattern, statusProvider, multiFilesAnnotationTypes);
   1.214              }
   1.215          }
   1.216 -        /*
   1.217 -        String trans = null;
   1.218 -        if (possibleFileStatusesMap != null) {
   1.219 -            synchronized (possibleFileStatusesMap) {
   1.220 -                trans = (String) possibleFileStatusesMap.get(status);
   1.221 -            }
   1.222 -        }
   1.223 -        if (trans != null) {
   1.224 -            status = trans;
   1.225 -        }
   1.226 -        //D.deb("name = "+fullName+": status = "+status);
   1.227 -        if (status.length() > 0) {
   1.228 -            result = name + " ["+status+"]"; // NOI18N
   1.229 -        }
   1.230 -        //D.deb("locker = '"+locker+"'");
   1.231 -        if (locker != null && locker.length() > 0) {
   1.232 -            result += " ("+locker+")";  // NOI18N
   1.233 -        }
   1.234 -         */
   1.235          //System.out.println("annotateName("+name+") -> result='"+result+"'");
   1.236          //D.deb("annotateName("+name+") -> result='"+result+"'"); // NOI18N
   1.237          return result;
   1.238 @@ -1495,29 +1512,16 @@
   1.239          return getVcsFactory ().getActions(fos);
   1.240      }
   1.241  
   1.242 -    /*
   1.243 -    public void setValidFS(boolean v) {
   1.244 -        boolean valid = isValid();
   1.245 -        D.deb("Filesystem is "+((valid) ? "":"not ")+"valid.");
   1.246 -        if (v != valid) {
   1.247 -            D.deb("setting valid = "+v);
   1.248 -            firePropertyChange (org.openide.filesystems.FileSystem.PROP_VALID,
   1.249 -                                new Boolean (!v), new Boolean (v));
   1.250 -        }
   1.251 -        D.deb("Filesystem is "+((isValid()) ? "":"not ")+"valid.");
   1.252 -    }
   1.253 -     */
   1.254 -    
   1.255      /**
   1.256 -     * Get human presentable name.
   1.257 +     * Get a human presentable name of the file system
   1.258       */
   1.259      public String getDisplayName() {
   1.260 -        //D.deb("getDisplayName() isValid="+isValid()); // NOI18N
   1.261 -        /*
   1.262 -        if(!isValid())
   1.263 -          return g("LAB_FileSystemInvalid", rootFile.toString ()); // NOI18N
   1.264 -        else
   1.265 -        */
   1.266 +        if (commandsRoot != null) {
   1.267 +            String VCSName = commandsRoot.getDisplayName();
   1.268 +            if (VCSName != null && VCSName.length() > 0) {
   1.269 +                return VCSName + " " + rootFile.toString();
   1.270 +            }
   1.271 +        }
   1.272          return g("LAB_FileSystemValid", rootFile.toString ()); // NOI18N
   1.273      }
   1.274  
   1.275 @@ -1587,12 +1591,13 @@
   1.276          }
   1.277      }
   1.278  
   1.279 -    //-------------------------------------------
   1.280 +    /** Set the root directory of the file system.
   1.281 +     * @param rootFile root directory
   1.282 +     */
   1.283      public void setRootFile(File rootFile) {
   1.284          this.rootFile = rootFile;
   1.285      }
   1.286  
   1.287 -    //-------------------------------------------
   1.288      /** Get the root directory of the file system.
   1.289       * @return root directory
   1.290       */
   1.291 @@ -1600,7 +1605,6 @@
   1.292          return rootFile;
   1.293      }
   1.294  
   1.295 -    //-------------------------------------------
   1.296      /** Set whether the file system should be read only.
   1.297       * @param flag <code>true</code> if it should
   1.298       */
   1.299 @@ -1612,16 +1616,14 @@
   1.300          }
   1.301      }
   1.302  
   1.303 -    //-------------------------------------------
   1.304      /* Test whether file system is read only.
   1.305 -     * @return <true> if file system is read only
   1.306 +     * @return <code>true</code> if file system is read only
   1.307       */
   1.308      public boolean isReadOnly() {
   1.309          //D.deb("isReadOnly() ->"+readOnly); // NOI18N
   1.310          return readOnly;
   1.311      }
   1.312  
   1.313 -    //-------------------------------------------
   1.314      /** Prepare environment by adding the root directory of the file system to the class path.
   1.315       * @param environment the environment to add to
   1.316       */
   1.317 @@ -1630,7 +1632,6 @@
   1.318          environment.addClassPath(rootFile.toString ());
   1.319      }
   1.320  
   1.321 -    //-------------------------------------------
   1.322      /** Compute the system name of this file system for a given root directory.
   1.323       * <P>
   1.324       * The default implementation simply returns the filename separated by slashes.
   1.325 @@ -1643,8 +1644,7 @@
   1.326          return rootFile.toString ().replace(File.separatorChar, '/');
   1.327      }
   1.328  
   1.329 -    //-------------------------------------------
   1.330 -    /** Creates file for given string name.
   1.331 +    /** Get file representation for given string name.
   1.332       * @param name the name
   1.333       * @return the file
   1.334       */
   1.335 @@ -1657,28 +1657,27 @@
   1.336      // List
   1.337      //
   1.338  
   1.339 -    public String[] getLocalFiles(String name) {
   1.340 +    private String[] getLocalFiles(String name) {
   1.341          File dir = new File(getRootDirectory(), name);
   1.342          if (dir == null || !dir.exists() || !dir.canRead()) return new String[0];
   1.343          String files[] = dir.list(getLocalFileFilter());
   1.344          return files;
   1.345      }
   1.346  
   1.347 -    public String[] addLocalFiles(String name, String[] cachedFiles) {
   1.348 -        File dir = new File(getRootDirectory(), name);
   1.349 -        if (dir == null || !dir.exists() || !dir.canRead()) return cachedFiles;
   1.350 -        String[] files = dir.list(getLocalFileFilter());
   1.351 +    private String[] addLocalFiles(String name, String[] cachedFiles) {
   1.352 +        String[] files = getLocalFiles(name);
   1.353 +        if (files == null || files.length == 0) {
   1.354 +            return cachedFiles;
   1.355 +        }
   1.356          Vector cached = new Vector(Arrays.asList(cachedFiles));
   1.357 -        if (files != null) {
   1.358 -            Vector local = new Vector(Arrays.asList(files));
   1.359 -            local.removeAll(cached);
   1.360 -            cached.addAll(local);
   1.361 -        }
   1.362 +        Vector local = new Vector(Arrays.asList(files));
   1.363 +        local.removeAll(cached);
   1.364 +        cached.addAll(local);
   1.365          return (String[]) cached.toArray(new String[0]);
   1.366      }
   1.367  
   1.368 -    //-------------------------------------------
   1.369 -    /* Scans children for given name
   1.370 +    /* Get children files inside a folder
   1.371 +     * @param name the name of the folder
   1.372       */
   1.373      public String[] children (String name) {
   1.374          D.deb("children('"+name+"')"); // NOI18N
   1.375 @@ -1749,7 +1748,8 @@
   1.376      //
   1.377      
   1.378      /**
   1.379 -     * Should be called when the modification in a file or folder is expected and should be refreshed.
   1.380 +     * Should be called when the modification in a file or folder is expected
   1.381 +     * and its content should be refreshed.
   1.382       */
   1.383      public void checkForModifications(String path) {
   1.384          //System.out.println("checkForModifications("+path+")");
   1.385 @@ -1801,11 +1801,8 @@
   1.386          if (cache != null) cache.addFolder(name);
   1.387      }
   1.388  
   1.389 -    //-------------------------------------------
   1.390 -    /* Create new data file.
   1.391 -     *
   1.392 +    /** Create new data file.
   1.393       * @param name name of the file
   1.394 -     *
   1.395       * @return the new data file object
   1.396       * @exception IOException if the file cannot be created (e.g. already exists)
   1.397       */
   1.398 @@ -1842,9 +1839,7 @@
   1.399          }
   1.400      }
   1.401  
   1.402 -    //-------------------------------------------
   1.403 -    /* Renames a file.
   1.404 -     *
   1.405 +    /** Rename a file.
   1.406       * @param oldName old name of the file
   1.407       * @param newName new name of the file
   1.408       */
   1.409 @@ -1859,10 +1854,8 @@
   1.410          if (cache != null) cache.rename(oldName, newName);
   1.411      }
   1.412  
   1.413 -    //-------------------------------------------
   1.414 -    /* Delete the file.
   1.415 -     *
   1.416 -     * @param name name of file
   1.417 +    /** Delete a file.
   1.418 +     * @param name name of the file
   1.419       * @exception IOException if the file could not be deleted
   1.420       */
   1.421      public void delete (String name) throws IOException {
   1.422 @@ -1886,8 +1879,7 @@
   1.423      // Info
   1.424      //
   1.425  
   1.426 -    //-------------------------------------------
   1.427 -    /*
   1.428 +    /**
   1.429       * Get last modification time.
   1.430       * @param name the file to test
   1.431       * @return the date
   1.432 @@ -1897,8 +1889,7 @@
   1.433          return new java.util.Date (getFile (name).lastModified ());
   1.434      }
   1.435  
   1.436 -    //-------------------------------------------
   1.437 -    /* Test if the file is folder or contains data.
   1.438 +    /** Test if the file is folder or contains data.
   1.439       * @param name name of the file
   1.440       * @return true if the file is folder, false otherwise
   1.441       */
   1.442 @@ -1917,8 +1908,7 @@
   1.443          // return getFile (name).isDirectory ();
   1.444      }
   1.445  
   1.446 -    //-------------------------------------------
   1.447 -    /* Test whether this file can be written to or not.
   1.448 +    /** Test whether this file can be written to or not.
   1.449       * All folders are not read only, they are created before writting into them.
   1.450       * @param name the file to test
   1.451       * @return <CODE>true</CODE> if file is read-only
   1.452 @@ -1949,9 +1939,7 @@
   1.453          return s == null ? "content/unknown" : s; // NOI18N
   1.454      }
   1.455  
   1.456 -    //-------------------------------------------
   1.457 -    /* Get the size of the file.
   1.458 -     *
   1.459 +    /** Get the size of a file.
   1.460       * @param name the file to test
   1.461       * @return the size of the file in bytes or zero if the file does not contain data (does not
   1.462       *  exist or is a folder).
   1.463 @@ -1961,8 +1949,7 @@
   1.464          return getFile (name).length ();
   1.465      }
   1.466  
   1.467 -    /* Get input stream.
   1.468 -     *
   1.469 +    /** Get input stream to a file.
   1.470       * @param name the file to test
   1.471       * @return an input stream to read the contents of this file
   1.472       * @exception FileNotFoundException if the file does not exists or is invalid
   1.473 @@ -1985,8 +1972,13 @@
   1.474  
   1.475      private void fileChanged(String name) {
   1.476          D.deb("fileChanged("+name+")");
   1.477 -        if (statusProvider != null) statusProvider.setFileModified(name);
   1.478 -        statusChanged(name);
   1.479 +        if (statusProvider != null) {
   1.480 +            String oldStatus = statusProvider.getFileStatus(name);
   1.481 +            if (!notModifiableStatuses.contains(oldStatus)) {
   1.482 +                statusProvider.setFileModified(name);
   1.483 +                statusChanged(name);
   1.484 +            }
   1.485 +        }
   1.486      }
   1.487  
   1.488      private class FileOutputStreamPlus extends FileOutputStream {
   1.489 @@ -2002,8 +1994,7 @@
   1.490          }
   1.491      }
   1.492  
   1.493 -    /* Get output stream.
   1.494 -     *
   1.495 +    /** Get output stream to a file.
   1.496       * @param name the file to test
   1.497       * @return output stream to overwrite the contents of this file
   1.498       * @exception IOException if an error occures (the file is invalid, etc.)
   1.499 @@ -2122,11 +2113,6 @@
   1.500              file.setImportant(false);
   1.501  }
   1.502      */
   1.503 -
   1.504 -    /*
   1.505 -     * Get the cache identification.
   1.506 -     */
   1.507 -    //public abstract String getCacheIdStr();
   1.508      
   1.509  //-------------------- methods from CacheHandlerListener------------------------
   1.510      public void cacheAdded(CacheHandlerEvent event) {
   1.511 @@ -2177,35 +2163,6 @@
   1.512          }
   1.513      }
   1.514  
   1.515 -    /*
   1.516 -    public Object getAdvancedConfig () {
   1.517 -        return this.advanced;
   1.518 -    }
   1.519 -
   1.520 -    /*
   1.521 -    //------------------------------------------
   1.522 -    public void setAdvancedConfig (Object advanced) {
   1.523 -        //super.setAdvancedConfig (advanced);
   1.524 -        this.advanced = advanced;
   1.525 -        Vector commands = (Vector) advanced;
   1.526 -        int len = commands.size();
   1.527 -        commandsByName = new Hashtable(len + 5);
   1.528 -        mainCommands = new Vector();
   1.529 -        revisionCommands = new Vector();
   1.530 -        for(int i = 0; i < len; i++) {
   1.531 -            VcsCommand vc = (VcsCommand) commands.elementAt(i);
   1.532 -            commandsByName.put(vc.getName(), vc);
   1.533 -            int numRevisions = VcsCommandIO.getIntegerCommandPropertyAssumeZero(vc, VcsCommand.PROPERTY_NUM_REVISIONS);
   1.534 -            //if (uc.getNumRevisions() == 0) {
   1.535 -            if (numRevisions == 0) {
   1.536 -                mainCommands.add(vc);
   1.537 -            } else {
   1.538 -                revisionCommands.add(vc);
   1.539 -            }
   1.540 -        }        
   1.541 -    }
   1.542 -     */
   1.543 -    
   1.544      private void addCommandsToHashTable(Node root) {
   1.545          Children children = root.getChildren();
   1.546          for (Enumeration subnodes = children.nodes(); subnodes.hasMoreElements(); ) {
   1.547 @@ -2217,8 +2174,7 @@
   1.548          }
   1.549      }
   1.550      
   1.551 -    /**
   1.552 -     * Set the tree structure of commands.
   1.553 +    /** Set the tree structure of commands.
   1.554       * @param root the tree of {@link VcsCommandNode} objects.
   1.555       */
   1.556      public void setCommands(Node root) {
   1.557 @@ -2227,32 +2183,18 @@
   1.558          addCommandsToHashTable(root);
   1.559      }
   1.560  
   1.561 -    //-------------------------------------------
   1.562 -    /*
   1.563 -    public Vector getCommands(){
   1.564 -        return (Vector) getAdvancedConfig ();
   1.565 -    }
   1.566 +    /** Get the commands.
   1.567 +     * @return the root command
   1.568       */
   1.569      public Node getCommands() {
   1.570          return commandsRoot;
   1.571      }
   1.572  
   1.573 -    /*
   1.574 -    public Vector getMainCommands() {
   1.575 -        return mainCommands;
   1.576 -    }
   1.577 -    
   1.578 -    public Vector getRevisionCommands() {
   1.579 -        return revisionCommands;
   1.580 -    }
   1.581 -
   1.582 -    //-------------------------------------------
   1.583 -    public void setCommands(Vector commands){
   1.584 -        setAdvancedConfig (commands);
   1.585 -    }
   1.586 +    /** Get a command by its name.
   1.587 +     * @param name the name of the command to get
   1.588 +     * @return the command of the given name or <code>null</code>,
   1.589 +     *         when the command is not defined
   1.590       */
   1.591 -
   1.592 -    //-------------------------------------------
   1.593      public VcsCommand getCommand(String name){
   1.594          if (commandsByName == null) {
   1.595              setCommands (commandsRoot);
   1.596 @@ -2313,56 +2255,3 @@
   1.597      }
   1.598      //-------------------------------------------
   1.599  }
   1.600 -/*
   1.601 - * Log
   1.602 - *  35   Jaga      1.31.1.2    3/21/00  Martin Entlicher Fixed unimportant names
   1.603 - *  34   Jaga      1.31.1.1    3/15/00  Martin Entlicher Use markUnimportant() 
   1.604 - *       method.
   1.605 - *  33   Jaga      1.31.1.0    2/24/00  Martin Entlicher Remember the refresh 
   1.606 - *       time,  prompt for additional variables.
   1.607 - *  32   Gandalf   1.31        2/15/00  Martin Entlicher netbeans.user added to 
   1.608 - *       variables.
   1.609 - *  31   Gandalf   1.30        2/11/00  Martin Entlicher changed setRootDirectory
   1.610 - *       to consider its argument as a working directory  without module name.
   1.611 - *  30   Gandalf   1.29        2/10/00  Martin Entlicher Locking action changed, 
   1.612 - *       warning of nonexistent root directory or module name, automatic refresh
   1.613 - *       after last command only.
   1.614 - *  29   Gandalf   1.28        2/9/00   Martin Entlicher Set user.home as the 
   1.615 - *       starting directory.
   1.616 - *  28   Gandalf   1.27        1/19/00  Martin Entlicher Deleted catching of 
   1.617 - *       annotated name,  new files has initial local status.
   1.618 - *  27   Gandalf   1.26        1/18/00  Martin Entlicher 
   1.619 - *  26   Gandalf   1.25        1/17/00  Martin Entlicher 
   1.620 - *  25   Gandalf   1.24        1/15/00  Ian Formanek    NOI18N
   1.621 - *  24   Gandalf   1.23        1/6/00   Martin Entlicher 
   1.622 - *  23   Gandalf   1.22        1/5/00   Martin Entlicher 
   1.623 - *  22   Gandalf   1.21        12/28/99 Martin Entlicher One ErrorCommandDialog 
   1.624 - *       for the whole session + Yuri changes
   1.625 - *  21   Gandalf   1.20        12/21/99 Martin Entlicher Refresh time set after 
   1.626 - *       the filesystem is mounted.
   1.627 - *  20   Gandalf   1.19        12/16/99 Martin Entlicher 
   1.628 - *  19   Gandalf   1.18        12/8/99  Martin Entlicher 
   1.629 - *  18   Gandalf   1.17        11/30/99 Martin Entlicher 
   1.630 - *  17   Gandalf   1.16        11/24/99 Martin Entlicher 
   1.631 - *  16   Gandalf   1.15        11/23/99 Martin Entlicher 
   1.632 - *  15   Gandalf   1.14        11/16/99 Martin Entlicher Fixed update of file 
   1.633 - *       status
   1.634 - *  14   Gandalf   1.13        11/9/99  Martin Entlicher 
   1.635 - *  13   Gandalf   1.12        11/9/99  Martin Entlicher 
   1.636 - *  12   Gandalf   1.11        11/4/99  Martin Entlicher 
   1.637 - *  11   Gandalf   1.10        11/2/99  Pavel Buzek     statusChanged is using 
   1.638 - *       fireFileStatusChanged
   1.639 - *  10   Gandalf   1.9         10/26/99 Martin Entlicher 
   1.640 - *  9    Gandalf   1.8         10/25/99 Pavel Buzek     copyright and log
   1.641 - *  8    Gandalf   1.7         10/23/99 Ian Formanek    NO SEMANTIC CHANGE - Sun
   1.642 - *       Microsystems Copyright in File Comment
   1.643 - *  7    Gandalf   1.6         10/12/99 Pavel Buzek     
   1.644 - *  6    Gandalf   1.5         10/9/99  Pavel Buzek     
   1.645 - *  5    Gandalf   1.4         10/9/99  Pavel Buzek     
   1.646 - *  4    Gandalf   1.3         10/9/99  Pavel Buzek     
   1.647 - *  3    Gandalf   1.2         10/7/99  Pavel Buzek     
   1.648 - *  2    Gandalf   1.1         10/5/99  Pavel Buzek     VCS at least can be 
   1.649 - *       mounted
   1.650 - *  1    Gandalf   1.0         9/30/99  Pavel Buzek     
   1.651 - * $
   1.652 -*/