Tools__NewSystemBrowser.st
branchjv
changeset 17132 17d361c666c2
parent 16869 2ecababdd4c0
parent 16879 ccc9e3630df9
child 17133 f9f20407fbf9
--- a/Tools__NewSystemBrowser.st	Wed Sep 28 07:09:57 2016 +0200
+++ b/Tools__NewSystemBrowser.st	Mon Oct 03 15:15:56 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2000 by eXept Software AG
               All Rights Reserved
@@ -28628,13 +28630,13 @@
     "configure a just created smallLint browser"
     
     |selectedClassesHolder selectedMethodHolder methodGenerator 
-     ruleGenerator prevSelectedClasses prevMeta|
+     ruleGenerator "prevSelectedClasses" "prevMeta"|
 
     selectedClassesHolder := browser selectedClasses.
     selectedMethodHolder := browser selectedMethods.
     
     ruleGenerator :=
-        Iterator on:[:whatToDo|
+        Iterator on:[:whatToDo| 
             result failedRules do:whatToDo
         ].
 
@@ -31363,7 +31365,7 @@
 "/    Cyclomatic complexity.
 "/    Total cyclomatic complexity.
 
-    resultStream := WriteStream on:String new.
+    resultStream := WriteStream on:''.
 
     self
         selectedClassesDo:[:eachClass |
@@ -43179,7 +43181,7 @@
 "/    Cyclomatic complexity.
 "/    Total cyclomatic complexity.
 
-    resultStream := WriteStream on:String new.
+    resultStream := WriteStream on:''.
 
     self
         projectMenuWithAllClassesLoadedDo:[:module :package :classesInProject |
@@ -47113,7 +47115,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.
     ].
 
@@ -48209,7 +48211,8 @@
     (methodSelection contains:[:method | |sel|
                                 sel := method selector.
                                 ((sel startsWith:'has') and:[sel size > 3 and:[ (sel at:4) isUppercase ]])
-                                or:[ ((sel startsWith:'can') and:[sel size > 3 and:[ (sel at:4) isUppercase ]]) ]]) ifTrue:[
+                                or:[ ((sel startsWith:'can') and:[sel size > 3 and:[ (sel at:4) isUppercase ]]) 
+                                or:[ ((sel startsWith:'is') and:[sel size > 2 and:[ (sel at:3) isUppercase ]]) ]]]) ifTrue:[
         someCategories add:'queries'.
         goodCandidates add:'queries'.
     ].
@@ -48217,6 +48220,14 @@
         someCategories add:'enumeration'.
         goodCandidates add:'enumeration'.
     ].
+    (methodSelection contains:[:method | method selector startsWith:'init']) ifTrue:[
+        someCategories add:'initialization'.
+        goodCandidates add:'initialization'.
+    ].
+    (methodSelection contains:[:method | method selector startsWith:'new']) ifTrue:[
+        someCategories add:'instance creation'.
+        goodCandidates add:'instance creation'.
+    ].
 
     goodCandidates size == 1 ifTrue:[
         initialAnswer := goodCandidates anElement
@@ -48263,7 +48274,7 @@
     ].
 
     someCategories := someCategories asOrderedCollection sort.
-
+    
     newCategory := self
                         askForMethodCategory:'Move to which protocol ?'
                         title:'Change MethodCategory'
@@ -51691,7 +51702,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.
                 ].    
@@ -59053,7 +59064,6 @@
     ^ selectorCompletion
 ! !
 
-
 !NewSystemBrowser methodsFor:'private-semantic checks'!
 
 checkAcceptedMethod:aMethod inClass:aClass