FileIndexingState (int fileId, @NotNull IndexedFile file) { FileIndexingState baseState = IndexingStamp.isFileIndexedStateCurrent(fileId, (ID<?, ?>)myIndexId); if (baseState != FileIndexingState.UP_TO_DATE) { return baseState; } if (mySubIndexerRetriever == null) return FileIndexingState.UP_TO_DATE; if (!(file instanceof FileContent)) { if (((CompositeDataIndexer<?, ?, ?, ?>)myIndexer).requiresContentForSubIndexerEvaluation(file)) { FileIndexingState indexConfigurationState = isIndexConfigurationUpToDate(fileId, file); // baseState == UP_TO_DATE => no need to reindex this file return indexConfigurationState == FileIndexingState.OUT_DATED ? FileIndexingState.OUT_DATED : FileIndexingState.UP_TO_DATE; } } try { FileIndexingState subIndexerState = mySubIndexerRetriever.getSubIndexerState(fileId, file); if (subIndexerState == FileIndexingState.UP_TO_DATE) { if (file instanceof FileContent && ((CompositeDataIndexer<?, ?, ?, ?>)myIndexer).requiresContentForSubIndexerEvaluation(file)) { setIndexConfigurationUpToDate(fileId, file); } return FileIndexingState.UP_TO_DATE; } if (subIndexerState == FileIndexingState.NOT_INDEXED) { // baseState == UP_TO_DATE => no need to reindex this file return FileIndexingState.UP_TO_DATE; } return subIndexerState; } catch (IOException e) { LOG.error(e); return FileIndexingState.OUT_DATED; } }