public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true; /* ensure no concurrent write access to index */ Index index = getIndex(this.containerPath, indexLocation, true, /*reuse index file*/ true /*create if none*/); if (index == null) return true; ReadWriteMonitor monitor = index.monitor; if (monitor == null) return true; // index got deleted since acquired final Path indexPath = new Path(indexLocation.getCanonicalFilePath()); try { monitor.enterWrite(); // ask permission to write indexDocument(searchDocument, searchParticipant, index, indexPath); } finally { monitor.exitWrite(); // free write lock } if (searchDocument.shouldIndexResolvedDocument()) { indexResolvedDocument(searchDocument, searchParticipant, index, indexPath); } return true; } public String toString() {
@Override public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true; /* ensure no concurrent write access to index */ Index index = getIndex(this.containerPath, indexLocation, true, /*reuse index file*/ true /*create if none*/); if (index == null) return true; ReadWriteMonitor monitor = index.monitor; if (monitor == null) return true; // index got deleted since acquired final Path indexPath = new Path(indexLocation.getCanonicalFilePath()); try { monitor.enterWrite(); // ask permission to write indexDocument(searchDocument, searchParticipant, index, indexPath); } finally { monitor.exitWrite(); // free write lock } if (searchDocument.shouldIndexResolvedDocument()) { indexResolvedDocument(searchDocument, searchParticipant, index, indexPath); } return true; } @Override
public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true; /* ensure no concurrent write access to index */ Index index = getIndex(this.containerPath, indexLocation, true, /*reuse index file*/ true /*create if none*/); if (index == null) return true; ReadWriteMonitor monitor = index.monitor; if (monitor == null) return true; // index got deleted since acquired final Path indexPath = new Path(indexLocation.getCanonicalFilePath()); try { monitor.enterWrite(); // ask permission to write indexDocument(searchDocument, searchParticipant, index, indexPath); } finally { monitor.exitWrite(); // free write lock } if (searchDocument.shouldIndexResolvedDocument()) { indexResolvedDocument(searchDocument, searchParticipant, index, indexPath); } return true; } public String toString() {
public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true; /* ensure no concurrent write access to index */ Index index = getIndex(this.containerPath, indexLocation, true, /*reuse index file*/ true /*create if none*/); if (index == null) return true; ReadWriteMonitor monitor = index.monitor; if (monitor == null) return true; // index got deleted since acquired final Path indexPath = new Path(indexLocation.getCanonicalFilePath()); try { monitor.enterWrite(); // ask permission to write indexDocument(searchDocument, searchParticipant, index, indexPath); } finally { monitor.exitWrite(); // free write lock } if (searchDocument.shouldIndexResolvedDocument()) { indexResolvedDocument(searchDocument, searchParticipant, index, indexPath); } return true; } public String toString() {
public boolean execute(IProgressMonitor progressMonitor) { if (this.isCancelled || progressMonitor != null && progressMonitor.isCanceled()) return true; /* ensure no concurrent write access to index */ Index index = getIndex(this.containerPath, indexLocation, true, /*reuse index file*/ true /*create if none*/); if (index == null) return true; ReadWriteMonitor monitor = index.monitor; if (monitor == null) return true; // index got deleted since acquired final Path indexPath = new Path(indexLocation.getCanonicalFilePath()); try { monitor.enterWrite(); // ask permission to write indexDocument(searchDocument, searchParticipant, index, indexPath); } finally { monitor.exitWrite(); // free write lock } if (searchDocument.shouldIndexResolvedDocument()) { indexResolvedDocument(searchDocument, searchParticipant, index, indexPath); } return true; } public String toString() {