#REFACTORING by exept
authorClaus Gittinger <cg@exept.de>
Sat, 28 Dec 2019 14:02:04 +0100
changeset 19379 256ba1955df7
parent 19378 8254727c72c5
child 19380 1e706be1d5b9
#REFACTORING by exept class: NewSystemBrowser class definition class: NewSystemBrowser class changed: #askForClassToSearch:single:msgTail:resources:filter:forBrowser:thenDo:
Tools__NewSystemBrowser.st
--- a/Tools__NewSystemBrowser.st	Sun Dec 22 04:27:26 2019 +0000
+++ b/Tools__NewSystemBrowser.st	Sat Dec 28 14:02:04 2019 +0100
@@ -1,5 +1,3 @@
-"{ Encoding: utf8 }"
-
 "
  COPYRIGHT (c) 2000 by eXept Software AG
               All Rights Reserved
@@ -59,7 +57,8 @@
 		ShowMethodTemplateWhenProtocolIsSelected
 		SkipCompilabilityChecksForFastCheckin SynchronousUpdate
 		ShowAboutToRewriteConfirmer AlwaysDoThisIfMethodNotInList
-		LastClassSearchPattern NewestRevisionPerClass'
+		LastClassSearchPattern NewestRevisionPerClass
+		ClassSearchPatternHistory'
 	poolDictionaries:''
 	category:'Interface-Browsers-New'
 !
@@ -19268,16 +19267,11 @@
         ].
 
     classNameHolder := '' asValue.
-    box enterField
-        model:classNameHolder;
-        immediateAccept:true.
+    box enterField model:classNameHolder; immediateAccept:true.
     classNameHolder onChangeEvaluate:updateList.
 
     box entryCompletionBlock:(DoWhatIMeanSupport classNameEntryCompletionBlock).
-    box
-        action:[:aString |
-            className := aString.
-        ].
+    box action:[:aString | className := aString ].
 
     box panelView
         addSubView:(showingWhatLabel := (Label label:(resources string:'Recently Visited:')) adjust:#left) before:nil.
@@ -19319,6 +19313,11 @@
     className isEmptyOrNil ifTrue:[^ nil "cancel"].
 
     LastClassSearchPattern := className.
+    ClassSearchPatternHistory isNil ifTrue:[ ClassSearchPatternHistory := OrderedCollection new ].
+    ClassSearchPatternHistory remove:className ifAbsent:[].
+    ClassSearchPatternHistory addFirst:className.
+    ClassSearchPatternHistory size > 20 ifTrue:[ ClassSearchPatternHistory removeLast ].
+
     LastClassSearchBoxShowedFullName := showFullNameHolder value.
     LastClassSearchBoxShowedJavaOnly := onlyShowJavaClassesHolder value.
 
@@ -49431,7 +49430,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.
 
@@ -49658,7 +49657,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.
     ].
 
@@ -54399,7 +54398,7 @@
             label:[:chg | 
                 |lbl|
                 "/ lbl := chg printString
-                lbl := (chg className ? '???') , ' » ' , (chg selector  ? '???') allBold.
+                lbl := (chg className ? '???') , ' » ' , (chg selector  ? '???') allBold.
                 (chg isMethodChange and:[chg changeMethod isNil]) ifTrue:[
                     lbl := lbl asText allStrikedOut,' ','(removed)' allItalic.
                 ].