@Override public void addFileContent( IIndexFragmentFile sourceFile, IncludeInformation[] includes, IASTPreprocessorStatement[] macros, IASTName[][] names, ASTFilePathResolver pathResolver, YieldableIndexLock lock) throws CoreException, InterruptedException { assert sourceFile.getIndexFragment() == this; PDOMFile pdomFile = (PDOMFile) sourceFile; pdomFile.addMacros(macros); final ASTFilePathResolver origResolver = fPathResolver; fPathResolver = pathResolver; try { pdomFile.addNames(names, lock); } finally { fPathResolver = origResolver; } // Includes expose the temporary file in the index, we must not yield the lock beyond this // point. pdomFile.addIncludesTo(includes); final IIndexFileLocation location = pdomFile.getLocation(); if (location != null) { fEvent.fClearedFiles.remove(location); fEvent.fFilesWritten.add(location); } }