Beispiel #1
0
 public void saveIndex(Index index) throws IOException {
   // must have permission to write from the write monitor
   if (index.hasChanged()) {
     if (VERBOSE) Util.verbose("-> saving index " + index.getIndexFile()); // $NON-NLS-1$
     index.save();
   }
   synchronized (this) {
     IPath containerPath = new Path(index.containerPath);
     if (this.jobEnd > this.jobStart) {
       for (int i = this.jobEnd; i > this.jobStart; i--) { // skip the current job
         IJob job = this.awaitingJobs[i];
         if (job instanceof IndexRequest)
           if (((IndexRequest) job).containerPath.equals(containerPath)) return;
       }
     }
     IPath indexLocation = computeIndexLocation(containerPath);
     updateIndexState(indexLocation, SAVED_STATE);
   }
 }