From: Rejean Loyer Date: Mon, 15 Sep 2014 06:25:29 +0000 (-0400) Subject: ide: add -debug-hide-ide command line switch. X-Git-Url: http://ecere.com/cgi-bin/gitweb.cgi?p=sdk;a=commitdiff_plain;h=30e83901602ac3c47acd461f89bcfededc40bc65 ide: add -debug-hide-ide command line switch. allow debugging a program with an hidden ide. the ide will hide when execution starts. it will reappear when execution stops. --- diff --git a/ide/src/ide.ec b/ide/src/ide.ec index e1200b8..87b9ef0 100755 --- a/ide/src/ide.ec +++ b/ide/src/ide.ec @@ -1639,6 +1639,7 @@ class IDEWorkSpace : Window bool noParsing; bool debugStart; + bool debugHideIDE; #ifdef GDB_DEBUG_GUI GDBDialog gdbDialog @@ -3142,6 +3143,8 @@ class IDEWorkSpace : Window ide.noParsing = true; else if(!strcmp(app.argv[c], "-debug-start")) ide.debugStart = true; + else if(!strcmp(app.argv[c], "-debug-hide-ide")) + ide.debugHideIDE = true; else if(!strcmp(app.argv[c], "-debug-work-dir")) debugWorkDir = true; else if(!strcmp(app.argv[c], "-@")) @@ -3159,7 +3162,7 @@ class IDEWorkSpace : Window GetExtension(app.argv[c], ext); isProject = !openAsText && !strcmpi(ext, "epj"); - if(isProject && c > 1 + (ide.debugStart ? 1 : 0)) continue; + if(isProject && c > 1 + (ide.debugStart ? 1 : 0) + (ide.debugHideIDE ? 1 : 0)) continue; // Create directory for projects (only) if(((dirAttribs = FileExists(parentPath)) && dirAttribs.isDirectory) || isProject) @@ -3727,6 +3730,7 @@ class IDEApp : GuiApplication else if(!strcmp(app.argv[c], "-t")); else if(!strcmp(app.argv[c], "-no-parsing")); else if(!strcmp(app.argv[c], "-debug-start")); + else if(!strcmp(app.argv[c], "-debug-hide-ide")); else if(!strcmp(app.argv[c], "-debug-work-dir")) debugWorkDir = true; else if(!strcmp(app.argv[c], "-@")) diff --git a/ide/src/project/Workspace.ec b/ide/src/project/Workspace.ec index 8e3d56e..57876ae 100644 --- a/ide/src/project/Workspace.ec +++ b/ide/src/project/Workspace.ec @@ -148,6 +148,16 @@ public: ide.MenuDebugStart(ide.debugStartResumeItem, 0); ide.debugStart = false; } + else if(ide.debugHideIDE) + { + bool visible = ide.debugger.state != running; + if(ideMainFrame.visible != visible) + { + ideMainFrame.visible = visible; + if(visible) + ideMainFrame.Activate(); + } + } return true; } };