diff --git a/uppsrc/CppBase/CppBase.h b/uppsrc/CppBase/CppBase.h index 1f31ab2df..39aaea959 100644 --- a/uppsrc/CppBase/CppBase.h +++ b/uppsrc/CppBase/CppBase.h @@ -111,6 +111,7 @@ void ClearSources(); const Index& GetAllSources(); void GatherSources(const String& master_path, const String& path_); String GetMasterFile(const String& file); +const VectorMap& GetAllSourceMasters(); struct Cpp { static Index kw; diff --git a/uppsrc/CppBase/srcfiles.cpp b/uppsrc/CppBase/srcfiles.cpp index 6a8e64830..9f285e352 100644 --- a/uppsrc/CppBase/srcfiles.cpp +++ b/uppsrc/CppBase/srcfiles.cpp @@ -18,6 +18,11 @@ const Index& GetAllSources() return sSrcFile.GetIndex(); } +const VectorMap& GetAllSourceMasters() +{ + return sSrcFile; +} + void GatherSources(const String& master_path, const String& path_, Vector& parents) { RHITCOUNT("GatherSources"); diff --git a/uppsrc/ide/Browser/Base.cpp b/uppsrc/ide/Browser/Base.cpp index f821ca951..b78587cff 100644 --- a/uppsrc/ide/Browser/Base.cpp +++ b/uppsrc/ide/Browser/Base.cpp @@ -138,18 +138,13 @@ void FinishCodeBase() Qualify(CodeBase()); } -void BaseInfoSync(Progress& pi) -{ // clears temporary caches (file times etc..) - PPSync(TheIde()->IdeGetIncludePath()); - - LTIMESTOP("Gathering files"); - ClearSources(); - const Workspace& wspc = GetIdeWorkspace(); - LTIMING("Gathering files"); +void LoadDefs() +{ + LTIMING("LoadDefs"); Vector defs; defs.Add(ConfigFile("global.defs")); + const Workspace& wspc = GetIdeWorkspace(); for(int i = 0; i < wspc.GetCount(); i++) { - pi.Step(); const Package& pk = wspc.GetPackage(i); String n = wspc[i]; for(int i = 0; i < pk.file.GetCount(); i++) { @@ -171,7 +166,17 @@ void BaseInfoSync(Progress& pi) h << LoadFile(defs[i]) << "\n"; SetPPDefs(h); } +} +void BaseInfoSync(Progress& pi) +{ // clears temporary caches (file times etc..) + PPSync(TheIde()->IdeGetIncludePath()); + + LTIMESTOP("Gathering files"); + ClearSources(); + LoadDefs(); + const Workspace& wspc = GetIdeWorkspace(); + LTIMING("Gathering files"); pi.SetText("Gathering files"); pi.SetTotal(wspc.GetCount()); for(int pass = 0; pass < 2; pass++)