1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-09 18:56:02 +02:00

make sure type cache is up to date

This commit is contained in:
Chris Wiebe 2004-08-25 18:11:46 +00:00
parent 4377ae355f
commit 7c40c75c30

View file

@ -262,6 +262,9 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate {
int[] types= {ICElement.C_CLASS, ICElement.C_UNION, ICElement.C_STRUCT, ICElement.C_ENUMERATION, ICElement.C_TYPEDEF}; int[] types= {ICElement.C_CLASS, ICElement.C_UNION, ICElement.C_STRUCT, ICElement.C_ENUMERATION, ICElement.C_TYPEDEF};
ITypeSearchScope scope = new TypeSearchScope(); ITypeSearchScope scope = new TypeSearchScope();
scope.add(unit.getCProject().getProject()); scope.add(unit.getCProject().getProject());
if (!AllTypesCache.isCacheUpToDate(scope)) {
AllTypesCache.updateCache(scope, monitor);
}
infos[0] = AllTypesCache.getTypes(scope, new QualifiedTypeName(name), types); infos[0] = AllTypesCache.getTypes(scope, new QualifiedTypeName(name), types);
} }
}; };