#FEATURE by cg
authorClaus Gittinger <cg@exept.de>
Tue, 21 Apr 2020 13:54:09 +0200
changeset 19580 ce40b5d1e941
parent 19579 858bdbe04f43
child 19581 4169ae666b57
#FEATURE by cg class: NewSystemBrowser added: #hasRecentlyDebuggedHistoryHolder #recentlyDebuggedHistoryMenu class: NewSystemBrowser class comment/format in: #browseMenu changed: #searchMenu
Tools__NewSystemBrowser.st
--- a/Tools__NewSystemBrowser.st	Tue Apr 21 13:46:14 2020 +0200
+++ b/Tools__NewSystemBrowser.st	Tue Apr 21 13:54:09 2020 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2000 by eXept Software AG
               All Rights Reserved
@@ -6540,6 +6542,7 @@
       )
 
     "Modified: / 18-08-2018 / 20:38:42 / Claus Gittinger"
+    "Modified: / 21-04-2020 / 13:48:39 / cg"
 !
 
 bufferBaseMenu
@@ -11389,6 +11392,11 @@
             submenuChannel: findHistoryMenu
           )
          (MenuItem
+            enabled: hasRecentlyDebuggedHistoryHolder
+            label: 'Recently Debugged'
+            submenuChannel: recentlyDebuggedHistoryMenu
+          )
+         (MenuItem
             enabled: hasChangedMethodsHolder
             label: 'Changed Methods'
             submenuChannel: changedMethodsMenu
@@ -11424,6 +11432,8 @@
         nil
         nil
       )
+
+    "Modified: / 21-04-2020 / 13:50:27 / cg"
 !
 
 searchMenuInMethodList
@@ -23586,6 +23596,12 @@
     "Created: / 4.2.2000 / 22:09:02 / cg"
 !
 
+hasRecentlyDebuggedHistoryHolder
+    ^ [ DebugView debuggedMethodHistory size ~~ 0 ]
+
+    "Created: / 21-04-2020 / 13:50:05 / cg"
+!
+
 hasRedoableOperations
     |manager|
 
@@ -49445,7 +49461,7 @@
     dummyChangeSet := ChangeSet new addAll:previousMethods; yourself.
     dummyChangeSet reverse.  "/ youngest first.
     browser := (UserPreferences current changeSetBrowserClass) openOn:dummyChangeSet.
-    browser label:(resources string:'Previous Versions of %1' with:(m whoStringWith:' » ')).
+    browser label:(resources string:'Previous Versions of %1' with:(m whoStringWith:' » ')).
     browser perform:#rightCodeLabel: with:'Previous Version' ifNotUnderstood:[].
     browser readOnly:true.
 
@@ -49672,7 +49688,7 @@
 
         self activityNotification:nil.
         browser := (UserPreferences current changeSetBrowserClass) openOn:previousMethods.
-        browser window label:(resources string:'Revisions of %1 » %2' with:mclass name with:mselector).
+        browser window label:(resources string:'Revisions of %1 » %2' with:mclass name with:mselector).
         browser readOnly:true.
     ].
 
@@ -54420,7 +54436,7 @@
                         nameShown := shortName 
                     ]
                 ].
-                lbl := (nameShown ? '???') , ' » ' , (chg selector  ? '???') allBold.
+                lbl := (nameShown ? '???') , ' » ' , (chg selector  ? '???') allBold.
                 (chg isMethodChange and:[chg changeMethod isNil]) ifTrue:[
                     lbl := lbl asText allStrikedOut,' ','(removed)' allItalic.
                 ].    
@@ -55579,6 +55595,29 @@
     "Modified: / 02-05-2014 / 17:49:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+recentlyDebuggedHistoryMenu
+    <resource: #programMenu >
+
+    ^ [
+        |m|
+
+        DebugView debuggedMethodHistory size ~~ 0 ifTrue:[
+            m := Menu new.
+            DebugView debuggedMethodHistory do:[:whoEntry |
+                |item itemLabel|
+
+                itemLabel := whoEntry methodClass name , ' >> ' , whoEntry methodSelector.
+                item := MenuItem label:itemLabel.
+                item itemValue:[ self switchToClass:whoEntry methodClass selector:whoEntry methodSelector updateHistory: false ].
+                m addItem:item.
+            ].
+        ].
+        m
+    ].
+
+    "Created: / 21-04-2020 / 13:53:35 / cg"
+!
+
 selectedClassesHierarchyMenu
     <resource: #programMenu >