#REFACTORING by cg
class: Tools::NewSystemBrowser
comment/format in:
#classInheritanceInfo
#getClassInfo
#updateInfoForChangedClassSelection
changed: #getClassInheritanceInfoForClass:
--- a/Tools__NewSystemBrowser.st Tue Mar 26 18:30:09 2019 +0100
+++ b/Tools__NewSystemBrowser.st Wed Mar 27 11:22:01 2019 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
"
COPYRIGHT (c) 2000 by eXept Software AG
All Rights Reserved
@@ -25521,6 +25523,9 @@
!
updateInfoForChangedClassSelection
+ "get some info about the currently selected class.
+ And show it in the info line at the bottom"
+
|selectedClasses singleSelectedClass categories msg|
navigationState organizerMode value == OrganizerCanvas organizerModeCategory ifTrue:[
@@ -25553,6 +25558,7 @@
"Modified: / 28-02-2012 / 16:51:46 / cg"
"Modified: / 03-03-2019 / 22:36:50 / Claus Gittinger"
+ "Modified (comment): / 27-03-2019 / 10:31:40 / Claus Gittinger"
!
updateInitSharedPoolVisibility
@@ -48961,7 +48967,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.
@@ -49188,7 +49194,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.
].
@@ -53874,7 +53880,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.
].
@@ -60797,6 +60803,9 @@
!
classInheritanceInfo
+ "get some info about the inheritance of the currently selected class.
+ To be shown in the info line at the bottom"
+
|singleSelectedClass|
self codeInfoVisible value ifFalse:[^ nil].
@@ -60807,6 +60816,8 @@
self organizerMode value == OrganizerCanvas organizerModeHierarchy ifTrue:[^ nil].
^ self getClassInheritanceInfoForClass:singleSelectedClass
+
+ "Modified (comment): / 27-03-2019 / 10:30:01 / Claus Gittinger"
!
clearInfo
@@ -61023,6 +61034,9 @@
!
getClassInfo
+ "get some info about the currently selected class.
+ To be shown in the info line at the bottom"
+
|organizerMode msg|
organizerMode := self organizerMode value.
@@ -61041,21 +61055,30 @@
^ (msg ? '').
"Modified: / 29-08-2006 / 14:20:14 / cg"
+ "Modified (comment): / 27-03-2019 / 10:30:33 / Claus Gittinger"
!
getClassInheritanceInfoForClass:aClass
- "get some inheritance info about aClass
- to be shown in the info line at the bottom"
-
- |subclasses msg|
+ "get some info about the inheritance of aClass.
+ To be shown in the info line at the bottom"
+
+ |subclasses msg nonMeta className|
subclasses := aClass subclasses.
msg := Explainer infoStringForClasses:subclasses withPrefix:'sub'.
- ^ resources string:('%1: ' , msg)
- with:aClass theNonMetaclass name
- with:subclasses size
+
+ nonMeta := aClass theNonMetaclass.
+ className := nonMeta name.
+ nonMeta isAbstract ifTrue:[
+ ^ className,' (abstract class): ',msg
+ ].
+ nonMeta isUtilityClass ifTrue:[
+ ^ className,' (utility class): ',msg
+ ].
+ ^ className,': ',msg
"Modified: / 27-07-2006 / 10:10:38 / cg"
+ "Modified: / 27-03-2019 / 11:20:16 / Claus Gittinger"
!
getMethodInfo