Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 287907 | Differences between
and this patch

Collapse All | Expand All

(-)parser/org/eclipse/cdt/internal/core/pdom/PDOMWriter.java (-15 / +15 lines)
Lines 191-208 Link Here
191
			int linkageID, int configHash, HashSet<IASTPreprocessorIncludeStatement> contextIncludes,
191
			int linkageID, int configHash, HashSet<IASTPreprocessorIncludeStatement> contextIncludes,
192
			IWritableIndex index, int readlockCount, boolean flushIndex,
192
			IWritableIndex index, int readlockCount, boolean flushIndex,
193
			ArrayList<IStatus> stati, IProgressMonitor pm) throws InterruptedException, CoreException {
193
			ArrayList<IStatus> stati, IProgressMonitor pm) throws InterruptedException, CoreException {
194
		index.acquireWriteLock(readlockCount);
194
		for (int i= 0; i < ifls.length; i++) {
195
		long start= System.currentTimeMillis();
195
			if (pm.isCanceled()) 
196
		try {
196
				return;
197
			for (int i= 0; i < ifls.length; i++) {
197
198
				if (pm.isCanceled()) 
198
			final IIndexFileLocation ifl= ifls[i];
199
					return;
199
			if (ifl != null) {
200
200
				if (fShowActivity) {
201
				final IIndexFileLocation ifl= ifls[i];
201
					System.out.println("Indexer: adding " + ifl.getURI());  //$NON-NLS-1$
202
				if (ifl != null) {
202
				}
203
					if (fShowActivity) {
203
				index.acquireWriteLock(readlockCount);
204
						System.out.println("Indexer: adding " + ifl.getURI());  //$NON-NLS-1$
204
				long start= System.currentTimeMillis();
205
					}
205
				try {
206
					Throwable th= null;
206
					Throwable th= null;
207
					try {
207
					try {
208
						storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
208
						storeFileInIndex(index, ifl, symbolMap, linkageID, configHash, contextIncludes);
Lines 220-231 Link Here
220
					if (i < ifls.length - 1) {
220
					if (i < ifls.length - 1) {
221
						updateFileCount(0, 0, 1); // update header count
221
						updateFileCount(0, 0, 1); // update header count
222
					}
222
					}
223
				} finally {
224
					index.releaseWriteLock(readlockCount, flushIndex);
223
				}
225
				}
226
				fStatistics.fAddToIndexTime+= System.currentTimeMillis() - start;
224
			}
227
			}
225
		} finally {
226
			index.releaseWriteLock(readlockCount, flushIndex);
227
		}
228
		}
228
		fStatistics.fAddToIndexTime+= System.currentTimeMillis()-start;
229
	}
229
	}
230
230
231
	private void resolveNames(final Map<IIndexFileLocation, Symbols> symbolMap, IIndexFileLocation[] ifls,
231
	private void resolveNames(final Map<IIndexFileLocation, Symbols> symbolMap, IIndexFileLocation[] ifls,

Return to bug 287907