1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-11-12 11:57:47 -08:00
parent a48e822d59
commit 9883a156f5
3 changed files with 22 additions and 28 deletions

View file

@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.index;
import org.eclipse.cdt.core.index.IIndexManager;
@ -16,7 +15,6 @@ import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.core.runtime.CoreException;
public interface IWritableIndexManager extends IIndexManager {
/**
* Returns a writable index or <code>null</code> if the project does not exist or is not yet
* registered with the pdom manager.

View file

@ -8,16 +8,14 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.core.pdom;
public class IndexerProgress {
public int fRequestedFilesCount;
public int fCompletedSources;
public int fPrimaryHeaderCount; // headers parsed that were actually requested
public int fCompletedHeaders; // all headers including those found through inclusions
public int fTimeEstimate; // fall-back for the time where no file-count is available
public int fPrimaryHeaderCount; // Headers parsed that were actually requested
public int fCompletedHeaders; // All headers including those found through inclusions
public int fTimeEstimate; // Fall-back for the time where no file-count is available
public IndexerProgress() {
}

View file

@ -111,9 +111,7 @@ import org.eclipse.core.runtime.preferences.InstanceScope;
import com.ibm.icu.text.MessageFormat;
/**
* The PDOM Provider. This is likely temporary since I hope
* to integrate the PDOM directly into the core once it has
* stabilized.
* Manages PDOM updates and events associated with them. Provides methods for index access.
*/
public class PDOMManager implements IWritableIndexManager, IListener {
private static final String TRACE_INDEXER_SETUP = CCorePlugin.PLUGIN_ID + "/debug/indexer/setup"; //$NON-NLS-1$
@ -1138,24 +1136,24 @@ public class PDOMManager implements IWritableIndexManager, IListener {
int sourceCount, sourceEstimate, headerCount, tickCount, tickEstimate;
String detail= null;
synchronized (fTaskQueue) {
// add historic data
// Add historic data.
sourceCount= sourceEstimate= fSourceCount;
headerCount= fHeaderCount;
tickCount= tickEstimate= fTickCount;
// add future data
// Add future data.
for (IPDOMIndexerTask task : fTaskQueue) {
final IndexerProgress info= task.getProgressInformation();
sourceEstimate += info.fRequestedFilesCount;
tickEstimate += info.getEstimatedTicks();
}
// add current data
// Add current data.
if (fCurrentTask != null) {
final IndexerProgress info= fCurrentTask.getProgressInformation();
sourceCount += info.fCompletedSources;
sourceEstimate += info.fRequestedFilesCount - info.fPrimaryHeaderCount;
headerCount += info.fCompletedHeaders;
// for the ticks we don't consider additional headers
// For the ticks we don't consider additional headers.
tickCount += info.fCompletedSources + info.fPrimaryHeaderCount;
tickEstimate += info.getEstimatedTicks();
detail= PDOMIndexerJob.sMonitorDetail;