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:
parent
bd08d38101
commit
881c7e3e22
1 changed files with 3 additions and 3 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue