UX: remember last working (range) expression in disassembly view
authorJan Vrany <jan.vrany@labware.com>
Thu, 14 Oct 2021 14:25:12 +0200
changeset 231 512bcb619333
parent 230 f4495a7fdec1
child 232 55486086aa29
UX: remember last working (range) expression in disassembly view
VDBDisassemblyApplication.st
--- a/VDBDisassemblyApplication.st	Thu Oct 14 13:58:22 2021 +0200
+++ b/VDBDisassemblyApplication.st	Thu Oct 14 14:25:12 2021 +0200
@@ -1,6 +1,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2021 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -12,7 +13,7 @@
 
 VDBAbstractContentsApplication subclass:#VDBDisassemblyApplication
 	instanceVariableNames:'disassemblableHolder expressionHolder frameHolder'
-	classVariableNames:''
+	classVariableNames:'LastExpression'
 	poolDictionaries:''
 	category:'VDB-UI-Others'
 !
@@ -23,6 +24,7 @@
 "
 jv:vdb - Visual / VM Debugger
 Copyright (C) 2015-now Jan Vrany
+Copyright (C) 2021 LabWare
 
 This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
 
@@ -227,13 +229,15 @@
     "return/create the 'expressionHolder' value holder (automatically generated)"
 
     expressionHolder isNil ifTrue:[
-        expressionHolder := ValueHolder new.
+        expressionHolder := ValueHolder with: LastExpression.
         expressionHolder addDependent:self.
     ].
     ^ expressionHolder
+
+    "Modified: / 14-10-2021 / 13:25:39 / Jan Vrany <jan.vrany@labware.com>"
 !
 
-expressionHolder:something
+expressionHolder:aValueModel
     "set the 'expressionHolder' value holder (automatically generated)"
 
     |oldValue newValue|
@@ -242,7 +246,7 @@
         oldValue := expressionHolder value.
         expressionHolder removeDependent:self.
     ].
-    expressionHolder := something.
+    expressionHolder := aValueModel.
     expressionHolder notNil ifTrue:[
         expressionHolder addDependent:self.
     ].
@@ -309,6 +313,7 @@
             disassemblable isPetitFailure ifTrue:[ 
                 disassemblable := nil.
             ] ifFalse:[
+                LastExpression := expression.
                 disassemblable setDebugger: debugger.
             ].
         ].
@@ -316,6 +321,7 @@
     ].
 
     "Modified: / 10-11-2019 / 23:37:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 14-10-2021 / 13:26:39 / Jan Vrany <jan.vrany@labware.com>"
 ! !
 
 !VDBDisassemblyApplication methodsFor:'drag & drop'!
@@ -328,3 +334,10 @@
     ^ self shouldImplement
 ! !
 
+!VDBDisassemblyApplication class methodsFor:'documentation'!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
+! !
+