mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
a33ed9c492
commit
78f658d473
4 changed files with 8 additions and 9 deletions
|
@ -202,7 +202,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
|||
fIsFastIndexer= fastIndexer;
|
||||
fFilesToUpdate= filesToUpdate;
|
||||
Collections.addAll(fFilesToRemove, filesToRemove);
|
||||
updateRequestedFiles(fFilesToUpdate.length + fFilesToRemove.size());
|
||||
incrementRequestedFilesCount(fFilesToUpdate.length + fFilesToRemove.size());
|
||||
fUrgentTasks = new LinkedList<AbstractIndexerTask>();
|
||||
}
|
||||
|
||||
|
@ -402,7 +402,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
|||
fFilesToUpdate = urgentTask.fFilesToUpdate;
|
||||
fForceNumberFiles = urgentTask.fForceNumberFiles;
|
||||
fFilesToRemove = urgentTask.fFilesToRemove;
|
||||
updateRequestedFiles(fFilesToUpdate.length + fFilesToRemove.size());
|
||||
incrementRequestedFilesCount(fFilesToUpdate.length + fFilesToRemove.size());
|
||||
extractFiles(files, indexFilesToRemove, monitor);
|
||||
removeFilesInIndex(fFilesToRemove, indexFilesToRemove, monitor);
|
||||
}
|
||||
|
@ -535,7 +535,7 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
|||
}
|
||||
}
|
||||
synchronized (this) {
|
||||
updateRequestedFiles(count - fFilesToUpdate.length);
|
||||
incrementRequestedFilesCount(count - fFilesToUpdate.length);
|
||||
fFilesToUpdate= null;
|
||||
}
|
||||
}
|
||||
|
@ -644,14 +644,14 @@ public abstract class AbstractIndexerTask extends PDOMWriter {
|
|||
for (IIndexFragmentFile ifile : ifiles) {
|
||||
fIndex.clearFile(ifile, null);
|
||||
}
|
||||
updateRequestedFiles(-1);
|
||||
incrementRequestedFilesCount(-1);
|
||||
}
|
||||
for (IIndexFragmentFile ifile : indexFilesToRemove) {
|
||||
if (monitor.isCanceled()) {
|
||||
return;
|
||||
}
|
||||
fIndex.clearFile(ifile, null);
|
||||
updateRequestedFiles(-1);
|
||||
incrementRequestedFilesCount(-1);
|
||||
}
|
||||
} finally {
|
||||
fIndex.releaseWriteLock(1);
|
||||
|
|
|
@ -531,7 +531,7 @@ abstract public class PDOMWriter {
|
|||
/**
|
||||
* Updates current progress information with the provided delta.
|
||||
*/
|
||||
protected final void updateRequestedFiles(int delta) {
|
||||
protected final void incrementRequestedFilesCount(int delta) {
|
||||
synchronized (fInfo) {
|
||||
fInfo.fRequestedFilesCount += delta;
|
||||
}
|
||||
|
|
|
@ -52,8 +52,8 @@ public class WritablePDOM extends PDOM implements IWritableIndexFragment {
|
|||
this(dbPath, locationConverter, ChunkCache.getSharedInstance(), linkageFactoryMappings);
|
||||
}
|
||||
|
||||
public WritablePDOM(File dbPath, IIndexLocationConverter locationConverter, ChunkCache cache, Map<String,
|
||||
IPDOMLinkageFactory> linkageFactoryMappings) throws CoreException {
|
||||
public WritablePDOM(File dbPath, IIndexLocationConverter locationConverter, ChunkCache cache,
|
||||
Map<String, IPDOMLinkageFactory> linkageFactoryMappings) throws CoreException {
|
||||
super(dbPath, locationConverter, cache, linkageFactoryMappings);
|
||||
}
|
||||
|
||||
|
|
|
@ -272,7 +272,6 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IC
|
|||
// look up the current range of the marker when the document has been edited
|
||||
IAnnotationModel model= getDocumentProvider().getAnnotationModel(getEditorInput());
|
||||
if (model instanceof AbstractMarkerAnnotationModel) {
|
||||
|
||||
AbstractMarkerAnnotationModel markerModel= (AbstractMarkerAnnotationModel) model;
|
||||
Position pos= markerModel.getMarkerPosition(marker);
|
||||
if (pos != null && !pos.isDeleted()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue