mirror of https://github.com/buggins/dlangide.git
disable terminal widget on windows
This commit is contained in:
parent
d00d3b032f
commit
5abc7bf27c
|
@ -292,6 +292,9 @@ class DebuggerProxy : Debugger, DebuggerCallback {
|
|||
|
||||
/// returns true if it's debugger
|
||||
@property bool isDebugger() { return true; }
|
||||
/// returns true if it's mago debugger
|
||||
@property bool isMagoDebugger() { return _debugger.isMagoDebugger; }
|
||||
|
||||
/// executable file
|
||||
@property string executableFile() { return _debugger.executableFile; }
|
||||
/// returns execution status
|
||||
|
@ -434,6 +437,13 @@ abstract class DebuggerBase : Thread, Debugger {
|
|||
_debuggerExecutable = debuggerExecutable;
|
||||
}
|
||||
|
||||
/// returns true if it's mago debugger
|
||||
@property bool isMagoDebugger() {
|
||||
import std.string;
|
||||
return _debuggerExecutable.indexOf("mago-mi") >= 0;
|
||||
}
|
||||
|
||||
|
||||
@property bool isDebugger() { return true; }
|
||||
|
||||
@property string executableFile() {
|
||||
|
|
|
@ -28,6 +28,8 @@ interface ProgramExecution {
|
|||
|
||||
/// returns true if it's debugger
|
||||
@property bool isDebugger();
|
||||
/// returns true if it's mago debugger
|
||||
@property bool isMagoDebugger();
|
||||
/// executable file
|
||||
@property string executableFile();
|
||||
/// returns execution status
|
||||
|
|
|
@ -137,6 +137,9 @@ exit $exit_code
|
|||
/// returns true if it's debugger
|
||||
@property bool isDebugger() { return false; }
|
||||
|
||||
/// returns true if it's mago debugger
|
||||
@property bool isMagoDebugger() { return false; }
|
||||
|
||||
/// executable file
|
||||
@property string executableFile() { return _executableFile; }
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ import std.path;
|
|||
|
||||
immutable string HELP_PAGE_URL = "https://github.com/buggins/dlangide/wiki";
|
||||
// TODO: get version from GIT commit
|
||||
immutable dstring DLANGIDE_VERSION = "v0.6.8"d;
|
||||
immutable dstring DLANGIDE_VERSION = "v0.6.12"d;
|
||||
|
||||
bool isSupportedSourceTextFileFormat(string filename) {
|
||||
return (filename.endsWith(".d") || filename.endsWith(".txt") || filename.endsWith(".cpp") || filename.endsWith(".h") || filename.endsWith(".c")
|
||||
|
@ -215,8 +215,8 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
|
||||
GDBInterface program = new GDBInterface();
|
||||
DebuggerProxy debuggerProxy = new DebuggerProxy(program, &executeInUiThread);
|
||||
setExecutableParameters(debuggerProxy, project, executableFileName);
|
||||
debuggerProxy.setDebuggerExecutable(debuggerExecutable);
|
||||
setExecutableParameters(debuggerProxy, project, executableFileName);
|
||||
_execution = debuggerProxy;
|
||||
_debugHandler = new DebuggerUIHandler(this, debuggerProxy);
|
||||
_debugHandler.onBreakpointListUpdated(currentWorkspace.getBreakpoints());
|
||||
|
@ -263,8 +263,11 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
string[] args;
|
||||
string externalConsoleExecutable = null;
|
||||
string workingDirectory = project.workingDirectory;
|
||||
string tty = _logPanel.terminalDeviceName;
|
||||
if (project.runInExternalConsole) {
|
||||
version(Windows) {
|
||||
if (program.isMagoDebugger)
|
||||
tty = "external-console";
|
||||
} else {
|
||||
externalConsoleExecutable = _settings.terminalExecutable;
|
||||
}
|
||||
|
@ -275,12 +278,12 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
_logPanel.logLine("Starting debugger for " ~ executableFileName);
|
||||
_statusLine.setBackgroundOperationStatus("debug-run", program.isDebugger ? "debugging..."d : "running..."d);
|
||||
string[string] env;
|
||||
string tty = _logPanel.terminalDeviceName;
|
||||
program.setExecutableParams(executableFileName, args, workingDirectory, env);
|
||||
if (!tty.empty) {
|
||||
Log.d("Terminal window device name: ", tty);
|
||||
program.setTerminalTty(tty);
|
||||
_logPanel.activateTerminalTab(true);
|
||||
if (tty != "external-console")
|
||||
_logPanel.activateTerminalTab(true);
|
||||
} else
|
||||
program.setTerminalExecutable(externalConsoleExecutable);
|
||||
return true;
|
||||
|
@ -365,7 +368,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
import std.conv:to;
|
||||
openSourceFile(to!string(filename));
|
||||
|
||||
currentEditor().setCaretPos(line-1,column);
|
||||
currentEditor().setCaretPos(line, column);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue