mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Changed indexChangeNotification to removeIndex
Removed Info button from indexer dialog (Bug 91001)
This commit is contained in:
parent
77f685b9ba
commit
b4a9f10228
5 changed files with 32 additions and 27 deletions
|
@ -129,10 +129,9 @@ public interface ICDTIndexer extends IIndexer {
|
|||
public IIndex getIndex(IPath path, boolean reuseExistingFile, boolean createIfMissing);
|
||||
|
||||
/**
|
||||
* Called the index manager when a project changes its indexer to a new indexer. This can be
|
||||
* used to clean up specific indexer properties.
|
||||
* Called by the index manager when this indexer is about to be removed from a project.
|
||||
* @param project
|
||||
*/
|
||||
public void indexerChangeNotification(IProject project);
|
||||
public void indexerRemoved(IProject project);
|
||||
|
||||
}
|
||||
|
|
|
@ -65,15 +65,15 @@ public class CTagsIndexer extends AbstractCExtension implements ICDTIndexer {
|
|||
public void addRequest(IProject project, IResourceDelta delta, int kind) {
|
||||
|
||||
switch (kind) {
|
||||
/*
|
||||
|
||||
case ICDTIndexer.PROJECT:
|
||||
this.indexAll(element.getCProject().getProject());
|
||||
this.indexAll(project);
|
||||
break;
|
||||
|
||||
case ICDTIndexer.FOLDER:
|
||||
/*case ICDTIndexer.FOLDER:
|
||||
this.indexSourceFolder(element.getCProject().getProject(),element.getPath(),null);
|
||||
break;
|
||||
*/
|
||||
break;*/
|
||||
|
||||
|
||||
case ICDTIndexer.COMPILATION_UNIT:
|
||||
IFile file = (IFile) delta.getResource();
|
||||
|
@ -102,22 +102,27 @@ public class CTagsIndexer extends AbstractCExtension implements ICDTIndexer {
|
|||
* @see org.eclipse.cdt.core.index.ICDTIndexer#removeRequest(org.eclipse.cdt.core.model.ICElement, org.eclipse.core.resources.IResourceDelta)
|
||||
*/
|
||||
public void removeRequest(IProject project, IResourceDelta delta, int kind) {
|
||||
|
||||
switch (kind) {
|
||||
/*
|
||||
case ICDTIndexer.PROJECT:
|
||||
this.indexAll(element.getCProject().getProject());
|
||||
break;
|
||||
|
||||
case ICDTIndexer.FOLDER:
|
||||
this.indexSourceFolder(element.getCProject().getProject(),element.getPath(),null);
|
||||
case ICDTIndexer.PROJECT :
|
||||
IPath fullPath = project.getFullPath();
|
||||
if( delta.getKind() == IResourceDelta.CHANGED )
|
||||
indexManager.discardJobs(fullPath.segment(0));
|
||||
indexStorage.removeIndexFamily(fullPath);
|
||||
// NB: Discarding index jobs belonging to this project was done during PRE_DELETE
|
||||
break;
|
||||
*/
|
||||
// NB: Update of index if project is opened, closed, or its c nature is added or removed
|
||||
// is done in updateCurrentDeltaAndIndex
|
||||
|
||||
/*
|
||||
case ICDTIndexer.FOLDER :
|
||||
this.removeSourceFolderFromIndex(project,project.getFullPath(),null);
|
||||
break;*/
|
||||
|
||||
case ICDTIndexer.COMPILATION_UNIT:
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
IFile file = (IFile) delta.getResource();
|
||||
this.remove(file.getFullPath().toString(), file.getProject().getFullPath());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
@ -361,7 +366,7 @@ public class CTagsIndexer extends AbstractCExtension implements ICDTIndexer {
|
|||
} catch (CoreException e1) {}
|
||||
}
|
||||
|
||||
public void indexerChangeNotification(IProject project) {
|
||||
public void indexerRemoved(IProject project) {
|
||||
//Remove any existing problem markers
|
||||
try {
|
||||
project.deleteMarkers(ICModelMarker.INDEXER_MARKER, true,IResource.DEPTH_ZERO);
|
||||
|
|
|
@ -653,7 +653,7 @@ public class SourceIndexer extends AbstractCExtension implements ICDTIndexer {
|
|||
this.indexAll(project);
|
||||
}
|
||||
|
||||
public void indexerChangeNotification(IProject project) {
|
||||
public void indexerRemoved(IProject project) {
|
||||
//Remove any existing problem markers
|
||||
/*try {
|
||||
IMarker[] markers = project.findMarkers(ICModelMarker.INDEXER_MARKER, true, IResource.DEPTH_INFINITE);
|
||||
|
|
|
@ -341,7 +341,7 @@ public class IndexManager extends JobManager{
|
|||
//Get rid of the old index file
|
||||
ICDTIndexer currentIndexer = getIndexerForProject(project);
|
||||
|
||||
currentIndexer.indexerChangeNotification(project);
|
||||
currentIndexer.indexerRemoved(project);
|
||||
|
||||
IIndexStorage storage = currentIndexer.getIndexStorage();
|
||||
if (storage instanceof CIndexStorage)
|
||||
|
|
|
@ -207,8 +207,9 @@ public class IndexerBlock extends AbstractCOptionPage {
|
|||
setPage();
|
||||
}
|
||||
});
|
||||
//Add button
|
||||
ControlFactory.createPushButton(group,"Info ..."); //$NON-NLS-1$
|
||||
//Make sure that the combo box takes up two cells
|
||||
GridData gridData = (GridData) indexersComboBox.getLayoutData();
|
||||
gridData.verticalSpan=2;
|
||||
|
||||
// fill the combobox and set the initial value
|
||||
for (Iterator items = getIndexerPageIdList().iterator(); items.hasNext();) {
|
||||
|
|
Loading…
Add table
Reference in a new issue