--- a/Tools_ClassList.st Sun Aug 07 20:39:46 2011 +0200
+++ b/Tools_ClassList.st Sun Aug 07 20:40:45 2011 +0200
@@ -17,7 +17,7 @@
instanceVariableNames:'classList classNameList meta lastSelectedClasses
selectedClassNameIndices currentNamespace hidePrivateClasses
unloadedClassesColor markApplicationsHolder classFilterBlock
- sortByNameAndInheritance'
+ sortByNameAndInheritance outGeneratorHolderForMethods'
classVariableNames:''
poolDictionaries:''
category:'Interface-Browsers-New'
@@ -193,9 +193,11 @@
#updateTrigger
#markApplicationsHolder
#showCoverageInformation
+ #outGeneratorHolderForMethods
).
"Modified: / 04-07-2011 / 18:34:44 / cg"
+ "Modified: / 07-08-2011 / 19:02:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ClassList methodsFor:'accessing'!
@@ -1064,6 +1066,63 @@
]
"Modified: / 24.2.2000 / 23:18:26 / cg"
+!
+
+makeGeneratorForMethods
+
+ ^ Iterator
+ on:[:whatToDo |
+ |allEntry classes cls already packages classIsInPackage showChanged cat |
+
+ allEntry := self class nameListEntryForALL.
+
+ classes := self selectedClasses value ? #().
+ packages := packageFilter value value.
+ (packages notNil and:[packages includes:allEntry]) ifTrue:[packages := nil].
+ showChanged := packages notNil and:[packages includes:NavigatorModel nameListEntryForChanged].
+
+ classes do:[:cls |
+ (cls notNil and:[cls ~~ allEntry]) ifTrue:[
+ classIsInPackage := packages isNil
+ or:[(packages includes:cls package)
+ or:[ showChanged and:[ChangeSet current changedClasses includes:cls]] ].
+ cls isMeta ifTrue:[
+ cat := self class nameListEntryForStatic.
+ ] ifFalse:[
+ cat := self class nameListEntryForNonStatic.
+ ].
+ cls methodDictionary keysAndValuesDo:[:sel :mthd |
+ whatToDo value:cls value:cat value:sel value:mthd.
+ ].
+
+ ].
+ ].
+ ]
+
+ "Modified: / 24-02-2000 / 23:18:26 / cg"
+ "Created: / 07-08-2011 / 19:01:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+outGeneratorHolderForMethods
+ ^ outGeneratorHolderForMethods
+!
+
+outGeneratorHolderForMethods:something
+ outGeneratorHolderForMethods := something.
+!
+
+updateOutputGenerator
+ "create a generator which enumerates my elements,
+ and place it into the outputGenerator holder"
+
+ self outGeneratorHolder value: self makeGenerator.
+ outGeneratorHolderForMethods notNil ifTrue:[
+ outGeneratorHolderForMethods value: self makeGeneratorForMethods.
+ ].
+
+ "Modified: / 04-02-2000 / 17:16:34 / cg"
+ "Created: / 05-02-2000 / 13:42:08 / cg"
+ "Created: / 07-08-2011 / 18:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
! !
!ClassList methodsFor:'private'!
@@ -1112,6 +1171,7 @@
generator do:[:cls |
|owner bucket|
+ "JV@2011-08-07: FIXME: Ugly code, hard to extend!! And duplicated in listOfClassesByInheritance !!!!!!!!"
(hidePrivate not or:[cls isPrivate not])
ifTrue:[
(nameSpaceFilter isNil
@@ -1132,7 +1192,14 @@
sortBlock:[:a :b | (a name ? '?') < (b name ? '?')] ].
bucket add:cls.
] ifFalse:[
- classesOrdered add:cls.
+ "Do not show Java anonymous classes"
+ cls isJavaClass ifTrue:[
+ cls isAnonymous ifFalse:[
+ classesOrdered add:cls.
+ ]
+ ] ifFalse:[
+ classesOrdered add:cls.
+ ]
]
]
]
@@ -1191,6 +1258,7 @@
^ classesOrdered
"Modified: / 04-07-2011 / 18:33:56 / cg"
+ "Modified (format): / 07-08-2011 / 16:02:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
listOfClassesByInheritance
@@ -1245,7 +1313,13 @@
bucket := privateClassesPerClass at:owner ifAbsentPut:[SortedCollection new sortBlock:[:a :b | a name < b name] ].
bucket add:cls.
] ifFalse:[
- classes add:cls.
+ cls isJavaClass ifTrue:[
+ cls isAnonymous ifFalse:[
+ classes add:cls.
+ ]
+ ] ifFalse:[
+ classes add:cls.
+ ]
]
]
]
@@ -1299,6 +1373,7 @@
"Modified: / 21-01-2008 / 19:43:04 / janfrog"
"Modified: / 24-08-2010 / 20:17:07 / Jan Vrany <enter your email here>"
"Created: / 04-07-2011 / 18:27:34 / cg"
+ "Modified: / 07-08-2011 / 16:14:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
makeDependent
@@ -1924,5 +1999,5 @@
!ClassList class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.55 2011-07-29 10:56:30 vrany Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/Tools_ClassList.st,v 1.56 2011-08-07 18:40:45 vrany Exp $'
! !