umk console again

This commit is contained in:
Mirek Fidler 2022-08-19 13:01:18 +02:00
parent 8e8089a791
commit 716a03780b
8 changed files with 17 additions and 13 deletions

View file

@ -2,8 +2,7 @@ description "TheIDE - Android SDK/NDK spport module\377B";
uses
ide/Core,
plugin/pcre,
ide\clang;
plugin/pcre;
file
Android.h,

View file

@ -219,8 +219,8 @@ public:
virtual ~IdeContext() {}
};
Ide *TheIde();
void TheIde(Ide *context);
IdeContext *TheIdeContext();
void SetTheIde(IdeContext *context);
bool IsVerbose();
void PutConsole(const char *s);

View file

@ -1,9 +1,9 @@
#include <ide/ide.h>
#include "Core.h"
static Ide *the_ide;
static IdeContext *the_ide;
Ide *TheIde() { return the_ide; }
void TheIde(Ide *context) { the_ide = context; }
IdeContext *TheIdeContext() { return the_ide; }
void SetTheIde(IdeContext *context) { the_ide = context; }
bool IsVerbose() { return the_ide ? the_ide->IsVerbose() : false; }
void PutConsole(const char *s) { if(the_ide) the_ide->PutConsole(s); }

View file

@ -153,6 +153,8 @@ ISUES:
- Macros with PPInfo
- Heap leaks in Linux
NONCLANG:
- Debugger Threads should show active threads first

View file

@ -1248,7 +1248,9 @@ public:
~Ide();
};
inline void ShowConsole() { if(TheIde()) ((Ide *)TheIde())->ShowConsole(); }
inline Ide *TheIde() { return (Ide *)TheIdeContext(); }
inline void ShowConsole() { if(TheIde()) TheIde()->ShowConsole(); }
void InstantSetup();

View file

@ -21,7 +21,8 @@ uses
ide/MacroManager,
Report,
Core/SSL,
plugin/md;
plugin/md,
ide/clang;
file
IDE readonly separator,

View file

@ -587,7 +587,7 @@ Ide::Ide()
default_charset = CHARSET_UTF8;
TheIde(this);
SetTheIde(this);
targetmode = 0;
@ -648,7 +648,7 @@ Ide::Ide()
Ide::~Ide()
{
TheIde(NULL);
SetTheIde(NULL);
}
void Ide::Paint(Draw&) {}

View file

@ -65,7 +65,7 @@ CONSOLE_APP_MAIN
#endif
Ide ide;
TheIde(&ide);
SetTheIde(&ide);
ide.console.SetSlots(CPU_Cores());
ide.console.console = true;