1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 03:45:35 +02:00

new method removeResource().

This commit is contained in:
Alain Magloire 2002-11-12 19:01:50 +00:00
parent d3a78188f1
commit a28d92aa29

View file

@ -37,6 +37,11 @@ public class IndexModel {
try { try {
if (project != null) { if (project != null) {
project.setPersistentProperty(activationKey, prop); project.setPersistentProperty(activationKey, prop);
if (on) {
addResource(project);
} else {
removeResource(project);
}
} }
} catch (CoreException e) { } catch (CoreException e) {
} }
@ -58,13 +63,20 @@ public class IndexModel {
/** /**
* Add a resource to be index. Containers(Folder, projects) * Add a resource to be index. Containers(Folder, projects)
* resources are recusively search for C Files as define by * resources are recursively search for C Files as define by
* CoreModel.isTranslationUnit(). * CoreModel.isTranslationUnit().
*/ */
public void addResource(IResource resource) { public void addResource(IResource resource) {
manager.addResource(resource); manager.addResource(resource);
} }
/**
* Remove the resource from the indexer list.
*/
public void removeResource(IResource resource) {
manager.removeResource(resource);
}
/** /**
* Add all the C files recurively going to all projects * Add all the C files recurively going to all projects
* identified as C Projects by CoreModel. * identified as C Projects by CoreModel.