Skip to content

Commit 0ca1c3e

Browse files
committed
EvaluateExpressionLineEdit
1 parent 96daa2c commit 0ca1c3e

2 files changed

Lines changed: 20 additions & 2 deletions

File tree

src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ public partial class ThreadsVariablesSubTab : Control
2121
private Tree _threadsTree = null!;
2222
private Tree _stackFramesTree = null!;
2323
private Tree _variablesTree = null!;
24+
private LineEdit _evaluateExpressionLineEdit = null!;
2425

2526
public SharpIdeProjectModel Project { get; set; } = null!;
2627
// private ThreadModel? _selectedThread = null!; // null when not at a stop point
@@ -35,15 +36,22 @@ public override void _Ready()
3536
_threadsTree = GetNode<Tree>("%ThreadsTree");
3637
_stackFramesTree = GetNode<Tree>("%StackFramesTree");
3738
_variablesTree = GetNode<Tree>("%VariablesTree");
39+
_evaluateExpressionLineEdit = GetNode<LineEdit>("%EvaluateExpressionLineEdit");
3840
_debuggerVariableCustomDrawCallable = new Callable(this, MethodName.DebuggerVariableCustomDraw);
3941
GlobalEvents.Instance.DebuggerExecutionStopped.Subscribe(OnDebuggerExecutionStopped);
4042
GlobalEvents.Instance.DebuggerExecutionContinued.Subscribe(ClearAllTrees);
4143
_threadsTree.ItemSelected += OnThreadSelected;
4244
_stackFramesTree.ItemSelected += OnStackFrameSelected;
4345
_variablesTree.ItemCollapsed += OnVariablesItemExpandedOrCollapsed;
46+
_evaluateExpressionLineEdit.TextSubmitted += EvaluateExpression;
4447
Project.ProjectStoppedRunning.Subscribe(ClearAllTrees);
4548
}
4649

50+
private void EvaluateExpression(string newText)
51+
{
52+
53+
}
54+
4755
private void OnVariablesItemExpandedOrCollapsed(TreeItem item)
4856
{
4957
var wasExpanded = item.IsCollapsed() is false;

src/SharpIDE.Godot/Features/Debug_/Tab/SubTabs/ThreadsVariablesSubTab.tscn

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,26 @@ hide_root = true
6464
unique_name_in_owner = true
6565
layout_mode = 2
6666

67-
[node name="VariablesTree" type="Tree" parent="HSplitContainer/VariablesPanel" unique_id=1453500091]
68-
unique_name_in_owner = true
67+
[node name="VBoxContainer" type="VBoxContainer" parent="HSplitContainer/VariablesPanel" unique_id=871515171]
6968
layout_mode = 1
7069
anchors_preset = 15
7170
anchor_right = 1.0
7271
anchor_bottom = 1.0
7372
grow_horizontal = 2
7473
grow_vertical = 2
74+
75+
[node name="VariablesTree" type="Tree" parent="HSplitContainer/VariablesPanel/VBoxContainer" unique_id=1453500091]
76+
unique_name_in_owner = true
77+
layout_mode = 2
78+
size_flags_vertical = 3
7579
theme_override_constants/inner_item_margin_left = 4
7680
theme_override_constants/icon_max_width = 18
7781
theme_override_constants/draw_guides = 0
7882
theme_override_styles/panel = SubResource("StyleBoxEmpty_hwpe6")
7983
hide_root = true
84+
85+
[node name="EvaluateExpressionLineEdit" type="LineEdit" parent="HSplitContainer/VariablesPanel/VBoxContainer" unique_id=1193248699]
86+
unique_name_in_owner = true
87+
visible = false
88+
layout_mode = 2
89+
placeholder_text = "> Evaluate Expression"

0 commit comments

Comments
 (0)