public JrtIndexer(File jrt, SearchParticipant participant, Index index, IPath container, IndexManager indexManager) { this.jrt = jrt; this.participant = (participant != null) ? participant : SearchEngine.getDefaultSearchParticipant(); this.index = index; IndexLocation indexLocation = index.getIndexLocation(); this.indexPath = indexLocation != null ? new Path(indexLocation.getCanonicalFilePath()) : null; this.container = container; this.indexManager = indexManager; }
public JrtIndexer(File jrt, SearchParticipant participant, Index index, IPath container, IndexManager indexManager) { this.jrt = jrt; this.participant = (participant != null) ? participant : SearchEngine.getDefaultSearchParticipant(); this.index = index; IndexLocation indexLocation = index.getIndexLocation(); this.indexPath = indexLocation != null ? new Path(indexLocation.getCanonicalFilePath()) : null; this.container = container; this.indexManager = indexManager; }
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() {
@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() {
IndexLocation indexLocation; if ((indexLocation = index.getIndexLocation()) != null) { indexPath = new Path(indexLocation.getCanonicalFilePath());
IndexLocation indexLocation; if ((indexLocation = index.getIndexLocation()) != null) { indexPath = new Path(indexLocation.getCanonicalFilePath());
IndexLocation indexLocation; if ((indexLocation = index.getIndexLocation()) != null) { indexPath = new Path(indexLocation.getCanonicalFilePath());
IndexLocation indexLocation; if ((indexLocation = index.getIndexLocation()) != null) { indexPath = new Path(indexLocation.getCanonicalFilePath());
IndexLocation indexLocation; if ((indexLocation = index.getIndexLocation()) != null) { indexPath = new Path(indexLocation.getCanonicalFilePath());