mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 10:16:03 +02:00
Related to bug 169847, additional protected method for PDOMWriter.
This commit is contained in:
parent
ea528b7933
commit
9ba29c31e8
2 changed files with 16 additions and 3 deletions
|
@ -83,7 +83,8 @@ abstract public class PDOMWriter {
|
|||
* Extracts symbols from the given ast and adds them to the index. It will
|
||||
* make calls to
|
||||
* {@link #needToUpdate(IIndexFileLocation)},
|
||||
* {@link #postAddToIndex(IIndexFileLocation, IIndexFile)} and
|
||||
* {@link #postAddToIndex(IIndexFileLocation, IIndexFile)},
|
||||
* {@link #getLastModified(IIndexFileLocation)} and
|
||||
* {@link #findLocation(String)} to obtain further information.
|
||||
* @since 4.0
|
||||
*/
|
||||
|
@ -253,7 +254,7 @@ abstract public class PDOMWriter {
|
|||
} else {
|
||||
file= index.addFile(location);
|
||||
}
|
||||
file.setTimestamp(EFS.getStore(location.getURI()).fetchInfo().getLastModified());
|
||||
file.setTimestamp(getLastModified(location));
|
||||
ArrayList[] lists= (ArrayList[]) symbolMap.get(location);
|
||||
if (lists != null) {
|
||||
ArrayList list= lists[0];
|
||||
|
@ -293,4 +294,15 @@ abstract public class PDOMWriter {
|
|||
fInfo.fTotalSourcesEstimate+= totalEstimate;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtains the timestamp of an index file location.
|
||||
* @param location the location for which the timestamp is obtained.
|
||||
* @return the timestamp.
|
||||
* @throws CoreException
|
||||
* @since 4.0
|
||||
*/
|
||||
protected long getLastModified(IIndexFileLocation location) throws CoreException {
|
||||
return EFS.getStore(location.getURI()).fetchInfo().getLastModified();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,8 @@ public abstract class PDOMIndexerTask extends PDOMWriter implements IPDOMIndexer
|
|||
* {@link #createAST(ITranslationUnit, IProgressMonitor)},
|
||||
* {@link #needToUpdate(IIndexFileLocation)},
|
||||
* {@link #addSymbols(IASTTranslationUnit, IWritableIndex, int, IProgressMonitor)}
|
||||
* {@link #postAddToIndex(IIndexFileLocation, IIndexFile)} and
|
||||
* {@link #postAddToIndex(IIndexFileLocation, IIndexFile)},
|
||||
* {@link #getLastModified(IIndexFileLocation)} and
|
||||
* {@link #findLocation(String)}
|
||||
* @since 4.0
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue