From 3ba846a2a2d2af8fa9364ebd45ecc2e8f84acc90 Mon Sep 17 00:00:00 2001 From: cxl Date: Mon, 8 Aug 2011 11:38:39 +0000 Subject: [PATCH] .developing umk git-svn-id: svn://ultimatepp.org/upp/trunk@3756 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/ide/Builders/Build.cpp | 12 ------------ uppsrc/ide/Builders/Build.h | 2 -- uppsrc/ide/Core/Core.cpp | 23 +++++++++++++++++++++++ uppsrc/ide/Core/Core.h | 6 ++++++ 4 files changed, 29 insertions(+), 14 deletions(-) diff --git a/uppsrc/ide/Builders/Build.cpp b/uppsrc/ide/Builders/Build.cpp index ff39b13a5..e25b84f25 100644 --- a/uppsrc/ide/Builders/Build.cpp +++ b/uppsrc/ide/Builders/Build.cpp @@ -4,18 +4,6 @@ #define LDUMP(x) // DUMP(x) -String MakeBuild::GetDefaultMethod() -{ - return LoadFile(ConfigFile("default_method")); -} - -VectorMap MakeBuild::GetMethodVars(const String& method) -{ - VectorMap map; - LoadVarFile(ConfigFile((String)~method + ".bm"), map); - return map; -} - MakeBuild::MakeBuild() { targetmode = 0; diff --git a/uppsrc/ide/Builders/Build.h b/uppsrc/ide/Builders/Build.h index 54191a2e3..9a90bfb26 100644 --- a/uppsrc/ide/Builders/Build.h +++ b/uppsrc/ide/Builders/Build.h @@ -40,8 +40,6 @@ struct MakeBuild { virtual void ReQualifyCodeBase() = 0; virtual void SetErrorEditor() = 0; virtual String GetMain() = 0; - virtual String GetDefaultMethod(); - virtual VectorMap GetMethodVars(const String& method); struct TransferFileInfo { diff --git a/uppsrc/ide/Core/Core.cpp b/uppsrc/ide/Core/Core.cpp index 300ae4b30..3fa5515c9 100644 --- a/uppsrc/ide/Core/Core.cpp +++ b/uppsrc/ide/Core/Core.cpp @@ -97,6 +97,29 @@ const Workspace& GetIdeWorkspace() return x; } +String IdeContext::GetDefaultMethod() +{ + return LoadFile(ConfigFile("default_method")); +} + +VectorMap IdeContext::GetMethodVars(const String& method) +{ + VectorMap map; + LoadVarFile(ConfigFile((String)~method + ".bm"), map); + return map; +} + + +String GetDefaultMethod() +{ + return the_ide ? the_ide->GetDefaultMethod() : String(); +} + +VectorMap GetMethodVars(const String& method) +{ + return the_ide ? the_ide->GetMethodVars(method) : VectorMap(); +} + bool IdeIsBuilding() { return the_ide && the_ide->IdeIsBuilding(); diff --git a/uppsrc/ide/Core/Core.h b/uppsrc/ide/Core/Core.h index a15827de8..a44b2ab14 100644 --- a/uppsrc/ide/Core/Core.h +++ b/uppsrc/ide/Core/Core.h @@ -74,6 +74,9 @@ public: virtual String IdeGetFileName() = 0; virtual String IdeGetNestFolder() = 0; + virtual String GetDefaultMethod(); + virtual VectorMap GetMethodVars(const String& method); + virtual ~IdeContext() {} }; @@ -98,6 +101,9 @@ void IdeConsoleEndGroup(); bool IdeConsoleWait(); void IdeGotoCodeRef(String s); +String GetDefaultMethod(); +VectorMap GetMethodVars(const String& method); + bool IdeIsDebug(); void IdeEndDebug(); void IdeSetBottom(Ctrl& ctrl);