/
n-dimens
/
pascalabcnet
Обзор
Документация
Войти
/
n-dimens
/
pascalabcnet
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
VisualPascalABCNETLinux/IB/Debugger/Immediate.cs
36 строк
1 KB
Mikhalkovich Stanislav
Для Linux-версии исправлен DockContent, редактор (показ всплывающего окна)
30 июн 2022, 09:47
30 июн 2022, 09:47
3072383
Код
Авторство
О чём код?
// Copyright (c) Ivan Bondarev, Stanislav Mikhalkovich (for details please see \doc\copyright.txt) // This code is distributed under the GNU LGPL (for details please see \doc\license.txt) using System; using System.Collections.Generic; using PascalABCCompiler.SyntaxTree; using System.Text; using Debugger; namespace VisualPascalABC { public class ImmediateEvaluateAction : ICSharpCode.TextEditor.Actions.AbstractEditAction { public override void Execute(ICSharpCode.TextEditor.TextArea textArea) { if (WorkbenchServiceFactory.DebuggerManager.IsRunning) { int line = textArea.Caret.Line; string val = WorkbenchServiceFactory.DebuggerManager.ExecuteImmediate (textArea.Document.GetText(textArea.Document.GetLineSegment(textArea.Caret.Line))); if (val != null) { textArea.Document.TextContent += Environment.NewLine+val+Environment.NewLine; textArea.Caret.Line = line + 2; textArea.Caret.Column = 0; } } else { int line = textArea.Caret.Line; textArea.Document.TextContent += Environment.NewLine; textArea.Caret.Line = line + 1; textArea.Caret.Column = 0; } } } }