mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added indexed file count to Indexer View Info Dialog
This commit is contained in:
parent
6edaf6ef3c
commit
e11007b7c0
2 changed files with 14 additions and 2 deletions
|
@ -32,6 +32,7 @@ public class IndexerNodeParent extends IndexerNodeLeaf {
|
|||
private boolean sort=true;
|
||||
private boolean displayFullName=true;
|
||||
private boolean navigate=false;
|
||||
private int totalNumberOfFilesIndexed=0;
|
||||
|
||||
public IndexerNodeParent(IEntryResult result, String [] fileMap, IndexerView.ViewContentProvider view) {
|
||||
super(result, fileMap);
|
||||
|
@ -271,4 +272,12 @@ public class IndexerNodeParent extends IndexerNodeLeaf {
|
|||
public void setNavigate(boolean navigate) {
|
||||
this.navigate = navigate;
|
||||
}
|
||||
|
||||
public int getTotalNumberOfFilesIndexed() {
|
||||
return totalNumberOfFilesIndexed;
|
||||
}
|
||||
|
||||
public void setTotalNumberOfFilesIndexed(int totalNumberOfFilesIndexed) {
|
||||
this.totalNumberOfFilesIndexed = totalNumberOfFilesIndexed;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -59,8 +59,9 @@ public class IndexerView extends ViewPart {
|
|||
private static final String SWITCH_FULL_NAMES = "Switch Full Names"; //$NON-NLS-1$
|
||||
private static final String SORT_RESULTS = "Sort Results"; //$NON-NLS-1$
|
||||
private static final String SEARCH_LOCATIONS = "Search Locations"; //$NON-NLS-1$
|
||||
private static final String _TOTAL_IENTRYRESULTS = " total IEntryResults"; //$NON-NLS-1$
|
||||
private static final String _TOTAL_IENTRYRESULTS = " total IEntryResults\n"; //$NON-NLS-1$
|
||||
private static final String _FILTERED_IENTRY_RESULTS_ = " filtered IEntry Results\n"; //$NON-NLS-1$
|
||||
private static final String _TOTAL_INDEXEDFILES = " total files indexed"; //$NON-NLS-1$
|
||||
private static final String INDEXER_STATS = "Indexer Stats"; //$NON-NLS-1$
|
||||
private static final String DISPLAY_INDEX_STATS = "Display Index Stats"; //$NON-NLS-1$
|
||||
private static final String INDEXER_VIEW___ = "Indexer View - "; //$NON-NLS-1$
|
||||
|
@ -130,6 +131,8 @@ public class IndexerView extends ViewPart {
|
|||
|
||||
if (results == null) return Status.CANCEL_STATUS;
|
||||
String [] fileMap = index.getDocumentList();
|
||||
//Subtract 1 to take into account null in position 0
|
||||
invisibleRoot.setTotalNumberOfFilesIndexed(fileMap.length - 1);
|
||||
|
||||
int size = results.length;
|
||||
IndexerNodeLeaf[] children = new IndexerNodeLeaf[size];
|
||||
|
@ -440,7 +443,7 @@ public class IndexerView extends ViewPart {
|
|||
IndexerNodeParent root = ((ViewContentProvider)viewer.getContentProvider()).getInvisibleRoot();
|
||||
|
||||
MessageDialog.openInformation(getSite().getShell(), INDEXER_STATS,
|
||||
root.getFilteredCount() + _FILTERED_IENTRY_RESULTS_ + root.getFullLength() + _TOTAL_IENTRYRESULTS);
|
||||
root.getFilteredCount() + _FILTERED_IENTRY_RESULTS_ + root.getFullLength() + _TOTAL_IENTRYRESULTS + root.getTotalNumberOfFilesIndexed() + _TOTAL_INDEXEDFILES);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Reference in a new issue