1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Fix for 191981 by Mikhail Sennikovsky, indexer not running on new projects.

This commit is contained in:
Markus Schorn 2007-06-13 13:23:30 +00:00
parent bd08d38101
commit 881c7e3e22

View file

@ -30,14 +30,14 @@ public class CProjectDescriptionListener implements ICProjectDescriptionListener
public void handleEvent(CProjectDescriptionEvent event) {
ICProjectDescription old= event.getOldCProjectDescription();
ICProjectDescription act= event.getNewCProjectDescription();
if (old != null && act != null) {
if (act != null) {
if (completedProjectCreation(old, act)) {
ICProject project= getProject(event);
if (project != null) {
fIndexManager.addProject(project);
}
}
else if (changedDefaultSettingConfiguration(old, act)) {
else if (old != null && changedDefaultSettingConfiguration(old, act)) {
ICProject project= getProject(event);
if (project != null) {
fIndexManager.reindex(project);
@ -70,6 +70,6 @@ public class CProjectDescriptionListener implements ICProjectDescriptionListener
}
private boolean completedProjectCreation(ICProjectDescription old, ICProjectDescription act) {
return old.isCdtProjectCreating() && !act.isCdtProjectCreating();
return (old == null || old.isCdtProjectCreating()) && !act.isCdtProjectCreating();
}
}