mirror of https://github.com/buggins/dlangide.git
start/stop program actions, external console using xterm -e
This commit is contained in:
parent
02d5b816e6
commit
3fb4dce4a1
|
@ -70,9 +70,23 @@ class ProgramExecutionNoDebug : Thread, ProgramExecution {
|
|||
|
||||
private void threadFunc() {
|
||||
import std.stdio;
|
||||
import std.array: empty;
|
||||
|
||||
// prepare parameter list
|
||||
string[] params;
|
||||
params ~= _executableFile;
|
||||
params ~= _args;
|
||||
|
||||
// external console support
|
||||
if (!_externalConsole.empty) {
|
||||
string cmdline = escapeShellCommand(params);
|
||||
cmdline = escapeShellFileName(cmdline);
|
||||
params.length = 0;
|
||||
params ~= _externalConsole;
|
||||
params ~= "-e";
|
||||
params ~= cmdline;
|
||||
}
|
||||
|
||||
File newstdin;
|
||||
File newstdout;
|
||||
File newstderr;
|
||||
|
|
|
@ -609,8 +609,6 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener {
|
|||
case IDEActions.RebuildWorkspace:
|
||||
case IDEActions.CleanProject:
|
||||
case IDEActions.CleanWorkspace:
|
||||
case IDEActions.DebugStart:
|
||||
case IDEActions.DebugStartNoDebug:
|
||||
case IDEActions.UpdateProjectDependencies:
|
||||
case IDEActions.RefreshProject:
|
||||
case IDEActions.SetStartupProject:
|
||||
|
@ -624,6 +622,13 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener {
|
|||
case IDEActions.DebugStop:
|
||||
a.state = isExecutionActive ? ACTION_STATE_ENABLED : ACTION_STATE_DISABLE;
|
||||
return true;
|
||||
case IDEActions.DebugStart:
|
||||
case IDEActions.DebugStartNoDebug:
|
||||
if (!isExecutionActive && currentWorkspace && currentWorkspace.startupProject && !_currentBackgroundOperation)
|
||||
a.state = ACTION_STATE_ENABLED;
|
||||
else
|
||||
a.state = ACTION_STATE_DISABLE;
|
||||
return true;
|
||||
case IDEActions.DebugContinue:
|
||||
case IDEActions.DebugPause:
|
||||
a.state = isExecutionActive && _execution.isDebugger ? ACTION_STATE_ENABLED : ACTION_STATE_DISABLE;
|
||||
|
|
Loading…
Reference in New Issue